Hello everybody,

Anybody know how to get rid of '?' displayed in the property sheets title bar.  The WS_EX_CONTEXTHELP style must be set by default. 

Any ideas appreciated.

best regards,

czDrillard
Posted on 2006-08-03 23:41:33 by czDrillard
Hi
Look for the SetWindowContextHelpId API and the WM_HELP message send to the parent window.

Regards,

Biterider
Posted on 2006-08-04 01:28:12 by Biterider
Thanks for your reply Biterider.  I tried using SetWindowContextHelpId and set the value of dwContextHelpId to NULL but that didn't do it.

best regards,

czDrillard
Posted on 2006-08-04 08:33:38 by czDrillard
Hi czDrillard
The SetWindowContextHelpId api is only to setup an HelpID for a given Window. Use something like that:

        invoke GetDlgItem, .Dlg.hWnd, IDC_CHECK1
        invoke SetWindowContextHelpId, eax, IDH_CHECK1


Now, the important thing you have to do is to catch the WM_HELP message sent to the parent window of the dialog. The lParam contains a pointer to a HELPINFO structure that gives you the information you need to output the required help string or whatever you want to do.

Method DemoApp03.OnHelp, uses esi, wParam:dword, lParam:dword
    SetObject esi
    mov eax, lParam
    DbgHex .HELPINFO.iContextType
    DbgDec .HELPINFO.iCtrlId
    DbgHex .HELPINFO.hItemHandle
    DbgDec .HELPINFO.dwContextId
MethodEnd


I attached a modified version of Demo03 of OA32 package if you want to take a look into.

Regards

Biterider


Attachments:
Posted on 2006-08-04 09:22:08 by Biterider
Thanks for the demo package Biterider I'll keep it for future reference.  However I'm trying to get rid of the question mark (?) displayed in the dialog box, not process the WM_HELP messages.  My apologies for any misunderstandings.

best regards,

czDrillard
Posted on 2006-08-04 20:23:11 by czDrillard
czDrillard,

http://windowssdk.msdn.microsoft.com/en-us/library/ms652415.aspx#Help_Button

I hope that helps. Removing it looks like fun ;)
Posted on 2006-08-04 20:34:38 by JimmyClif
Hello JimmyClif,

Thanks for the link.  I,m familiar with the PSH_NOCONTEXTHELP and the callback function, just can't implement either one.  The PSH_NOCONTEXTHELP for some reason causes the Apply button to disappear on my property sheet so I tried the callback function but don't know how to  translate
((LPDLGTEMPLATE)lParam)->style 
;//            &= ~DS_CONTEXTHELP;

into assembly. 

best regards,

czDrillard
Posted on 2006-08-05 14:50:35 by czDrillard
I believe that is the following:


mov eax, lParam ; DLGTEMPLATE
and .DLGTEMPLATE.style, NOT DS_CONTEXTHELP


Posted on 2006-08-05 15:13:39 by JimmyClif
Hello JimmyClif,

That did it!

much thanks,

czDrillard
Posted on 2006-08-05 19:32:18 by czDrillard