From: William Dauchy on
Hello,

I have created a wizard using CPropertySheet and adding CPropertyPage
to it.
It displays a help button.
-> first, how to disable this button? and disable F1 mapping just for
my wizard? I've tested to catch it with ON_COMMAND(ID_HELP, [...]) but
it didn't work.
-> second, how to tell F1 or help button where the help file should be
found.

Regards,
--
William
From: AliR (VC++ MVP) on
You can remove the button by removing the PSH_HASHELP flag from the dwFlags
fo the m_psh member of the Sheet, and m_psp.dwFlags of the pages.
Or GetDlgItem(IDHELP)->ShowWindow(SW_HIDE); But this will leave a blank
spot where the help button was.

You can turn of the F1 key by catching the WM_HELP message in the sheet and
doing nothing.


AliR.


"William Dauchy" <wdauchy(a)gmail.com> wrote in message
news:c246de4f-af2a-49b6-95d1-5e9ca20a642b(a)i76g2000hsf.googlegroups.com...
> Hello,
>
> I have created a wizard using CPropertySheet and adding CPropertyPage
> to it.
> It displays a help button.
> -> first, how to disable this button? and disable F1 mapping just for
> my wizard? I've tested to catch it with ON_COMMAND(ID_HELP, [...]) but
> it didn't work.
> -> second, how to tell F1 or help button where the help file should be
> found.
>
> Regards,
> --
> William


From: William Dauchy on
On Jun 5, 6:05 pm, "AliR \(VC++ MVP\)" <A...(a)online.nospam> wrote:
> You can remove the button by removing the PSH_HASHELP flag from the dwFlags
> fo the m_psh member of the Sheet, and m_psp.dwFlags of the pages.

it works.
just for information, I've used this help page
http://msdn.microsoft.com/en-us/library/37k4h0bh(VS.71).aspx

> You can turn of the F1 key by catching the WM_HELP message in the sheet and
> doing nothing.

Is it possible to catch this message without overloading
CPropertySheet?
--
William
From: AliR (VC++ MVP) on
I'm not sure what overloading CPropertySheet means.
But you have to create CPropertySheet derived class, and catch it there.

AliR.


"William Dauchy" <wdauchy(a)gmail.com> wrote in message
news:58dcdb0b-711e-452f-9cc0-b2476ab4cad6(a)z66g2000hsc.googlegroups.com...
On Jun 5, 6:05 pm, "AliR \(VC++ MVP\)" <A...(a)online.nospam> wrote:
> You can remove the button by removing the PSH_HASHELP flag from the
> dwFlags
> fo the m_psh member of the Sheet, and m_psp.dwFlags of the pages.

it works.
just for information, I've used this help page
http://msdn.microsoft.com/en-us/library/37k4h0bh(VS.71).aspx

> You can turn of the F1 key by catching the WM_HELP message in the sheet
> and
> doing nothing.

Is it possible to catch this message without overloading
CPropertySheet?
--
William


From: William Dauchy on
On Jun 6, 4:12 pm, "AliR \(VC++ MVP\)" <A...(a)online.nospam> wrote:
> I'm not sure what overloading CPropertySheet means.
> But you have to create CPropertySheet derived class, and catch it there.

yes ok; vocabulary mistake.
I've put ON_MESSAGE(WM_HELP, &Wizard::OnHelpMessage)
with LRESULT Wizard::OnHelpMessage(WPARAM wparam, LPARAM lparam)
and it works.

What I find strange, is in the manual of CWinApp::OnHelp (http://
msdn.microsoft.com/en-us/library/8874ckw0(VS.80).aspx ) it's written
"Usually you will also add an accelerator-key entry for the F1 key.".
So I thought first I just have to put ON_COMMAND( ID_HELP, OnHelp ).
But it didn't work. So what is the difference between WM_HELP and
ID_HELP?

Regards,
--
William