Huw Davies : oledlg:
Post OLEUI_MSG_HELP when the Help button is pressed and hide the Help
button if the app doesn 't want it.
Alexandre Julliard
julliard at wine.codeweavers.com
Fri Oct 20 04:45:59 CDT 2006
Module: wine
Branch: master
Commit: 45a3b1738fc7ff737d9fbceb95ca8c815ff9f2e6
URL: http://source.winehq.org/git/wine.git/?a=commit;h=45a3b1738fc7ff737d9fbceb95ca8c815ff9f2e6
Author: Huw Davies <huw at codeweavers.com>
Date: Wed Oct 18 22:08:10 2006 +0100
oledlg: Post OLEUI_MSG_HELP when the Help button is pressed and hide the Help button if the app doesn't want it.
---
dlls/oledlg/pastespl.c | 22 +++++++++++++++++++++-
1 files changed, 21 insertions(+), 1 deletions(-)
diff --git a/dlls/oledlg/pastespl.c b/dlls/oledlg/pastespl.c
index c34a97c..23c9985 100644
--- a/dlls/oledlg/pastespl.c
+++ b/dlls/oledlg/pastespl.c
@@ -288,6 +288,11 @@ static void init_lists(HWND hdlg, ps_str
EnableWindow(GetDlgItem(hdlg, IDOK), 0);
}
+static void post_help_msg(HWND hdlg, ps_struct_t *ps_struct)
+{
+ PostMessageW(ps_struct->ps->hWndOwner, oleui_msg_help, (WPARAM)hdlg, IDD_PASTESPECIAL);
+}
+
static void send_end_dialog_msg(HWND hdlg, ps_struct_t *ps_struct, UINT id)
{
SendMessageW(hdlg, oleui_msg_enddialog, id, 0);
@@ -331,7 +336,13 @@ static INT_PTR CALLBACK ps_dlg_proc(HWND
SetPropW(hdlg, prop_name, ps_struct);
- if(ps_struct->ps->lpszCaption)
+ if(!(ps_struct->ps->dwFlags & PSF_SHOWHELP))
+ {
+ ShowWindow(GetDlgItem(hdlg, IDC_OLEUIHELP), SW_HIDE);
+ EnableWindow(GetDlgItem(hdlg, IDC_OLEUIHELP), 0);
+ }
+
+ if(ps_struct->ps->lpszCaption)
SetWindowTextW(hdlg, ps_struct->ps->lpszCaption);
init_lists(hdlg, ps_struct);
@@ -341,6 +352,15 @@ static INT_PTR CALLBACK ps_dlg_proc(HWND
case WM_COMMAND:
switch(LOWORD(wp))
{
+ case IDC_OLEUIHELP:
+ switch(HIWORD(wp))
+ {
+ case BN_CLICKED:
+ post_help_msg(hdlg, ps_struct);
+ return FALSE;
+ default:
+ return FALSE;
+ }
case IDOK:
case IDCANCEL:
send_end_dialog_msg(hdlg, ps_struct, LOWORD(wp));
More information about the wine-cvs
mailing list