summaryrefslogtreecommitdiff
path: root/fpicker
diff options
context:
space:
mode:
authorTino Rachui <tra@openoffice.org>2001-08-03 13:07:53 +0000
committerTino Rachui <tra@openoffice.org>2001-08-03 13:07:53 +0000
commit6b87984bd37c645a100dc4f18d0955aaf0ebf301 (patch)
treea3f04400dd9afe7065a529c1bacc54bb091a6ff4 /fpicker
parentd203744764e09cf162375173dbb5802ac404f8cb (diff)
#89507#using help popup window to show help
Diffstat (limited to 'fpicker')
-rw-r--r--fpicker/source/win32/filepicker/WinFileOpenImpl.cxx37
-rw-r--r--fpicker/source/win32/filepicker/WinFileOpenImpl.hxx9
2 files changed, 39 insertions, 7 deletions
diff --git a/fpicker/source/win32/filepicker/WinFileOpenImpl.cxx b/fpicker/source/win32/filepicker/WinFileOpenImpl.cxx
index af840b087592..89885b07b8aa 100644
--- a/fpicker/source/win32/filepicker/WinFileOpenImpl.cxx
+++ b/fpicker/source/win32/filepicker/WinFileOpenImpl.cxx
@@ -2,9 +2,9 @@
*
* $RCSfile: WinFileOpenImpl.cxx,v $
*
- * $Revision: 1.6 $
+ * $Revision: 1.7 $
*
- * last change: $Author: tra $ $Date: 2001-07-30 07:28:38 $
+ * last change: $Author: tra $ $Date: 2001-08-03 14:07:53 $
*
* The Contents of this file are made available subject to the terms of
* either of the following licenses
@@ -199,7 +199,8 @@ CWinFileOpenImpl::CWinFileOpenImpl(
m_FilePicker( aFilePicker ),
m_bPreviewExists( sal_False ),
m_bInExecuteMode( sal_False ),
- m_bInitialSelChanged( sal_True )
+ m_bInitialSelChanged( sal_True ),
+ m_HelpPopupWindow( hInstance, m_hwndFileOpenDlg )
{
}
@@ -792,8 +793,31 @@ unsigned int CALLBACK CWinFileOpenImpl::SubClassFunc(
{
case WM_HELP:
{
- FilePickerEvent evt;
- pImpl->m_FilePicker->helpRequested( evt );
+ LPHELPINFO lphi = reinterpret_cast< LPHELPINFO >( lParam );
+
+ // we handle only our own elements ourself
+ if ( (lphi->iCtrlId != IDOK) && (lphi->iCtrlId != IDCANCEL) && (lphi->iCtrlId < ctlFirst) )
+ {
+ FilePickerEvent evt;
+ evt.ElementId = lphi->iCtrlId;
+
+ OUString aPopupHelpText = pImpl->m_FilePicker->helpRequested( evt );
+
+ if ( aPopupHelpText.getLength( ) )
+ {
+ pImpl->m_HelpPopupWindow.setText( aPopupHelpText );
+
+ DWORD dwMsgPos = GetMessagePos( );
+ pImpl->m_HelpPopupWindow.show( LOWORD( dwMsgPos ), HIWORD( dwMsgPos ) );
+ }
+ }
+ else // call the standard help
+ lResult = CallWindowProcA(
+ reinterpret_cast< WNDPROC >( pImpl->m_pfnOldDlgProc ),
+ hWnd,
+ wMessage,
+ wParam,
+ lParam );
}
break;
@@ -1090,6 +1114,9 @@ void SAL_CALL CWinFileOpenImpl::onInitDone()
(LPARAM)&enumParam );
SetDefaultExtension( );
+
+ // but now we have a valid parent handle
+ m_HelpPopupWindow.setParent( m_hwndFileOpenDlg );
}
//-----------------------------------------------------------------
diff --git a/fpicker/source/win32/filepicker/WinFileOpenImpl.hxx b/fpicker/source/win32/filepicker/WinFileOpenImpl.hxx
index 4ddbfb6518b2..2b268d13cbd0 100644
--- a/fpicker/source/win32/filepicker/WinFileOpenImpl.hxx
+++ b/fpicker/source/win32/filepicker/WinFileOpenImpl.hxx
@@ -2,9 +2,9 @@
*
* $RCSfile: WinFileOpenImpl.hxx,v $
*
- * $Revision: 1.4 $
+ * $Revision: 1.5 $
*
- * last change: $Author: tra $ $Date: 2001-07-30 07:28:38 $
+ * last change: $Author: tra $ $Date: 2001-08-03 14:07:53 $
*
* The Contents of this file are made available subject to the terms of
* either of the following licenses
@@ -87,6 +87,10 @@
#include "dibpreview.hxx"
#endif
+#ifndef _HELPPOPUPWINDOW_HXX_
+#include "helppopupwindow.hxx"
+#endif
+
#include <utility>
#include <memory>
#include <vector>
@@ -264,6 +268,7 @@ private:
sal_Bool m_bInExecuteMode;
ControlCache_T m_ControlCache;
sal_Bool m_bInitialSelChanged;
+ CHelpPopupWindow m_HelpPopupWindow;
};