15 мая 2023 года "Исходники.РУ" отмечают своё 23-летие!
Поздравляем всех причастных и неравнодушных с этим событием!
И огромное спасибо всем, кто был и остаётся с нами все эти годы!

Главная Форум Журнал Wiki DRKB Discuz!ML Помощь проекту


Property Sheet/Page Help Button

Carl Downs -- cdowns@dev.tivoli.com
Thursday, July 25, 1996

Enviroment: VC++ 4.0 and Windows NT 3.51

I'm having trouble getting the help button to work
on property sheet/pages.  

Calling code looks like:

DaClass::DaMethod()
{
        CSheet cSheet ("Caption");
	CPage *pPage = (CPage *) cSheet.GetPage (0);

        // turn on the help button.  This
        // gets it to show up, but its *grayed out*.

	cSheet.m_psh.dwFlags |= PSH_HASHELP;
	cPage->m_psp.dwFlags |= PSH_HASHELP;

        if (cSheet.DoModal() == IDOK)
        {
          ...
        }
}

Online help says that a WM_NOTIFY carrying a PSN_HELP 
will be sent to my page when then help button is pressed.

How do I intercept this message?  

A assumed the problem was that I didn;t have a handler, so I tried 
to put a WM_NOTIFY manually in my page MESSAGE_MAP but got a syntax error
indicating I was missing some params.  A WM_NOTIFY specific
to PSN_HELP is *not* provided by Class Wizard (for me atleast).

How do I get the property sheet help button to activate? 

Thanks..Carl





Robertson David -- davidr@devmail.sps.mot.com
Monday, July 29, 1996

[Mini-digest: 3 responses]


     In my experience, the help button is only enabled if the application
     main frame has a ON_COMMAND(ID_HELP, OnHelp) handler.
-----From: Brian_Dormer@ftdetrck-ccmail.army.mil

     I think your problem is that you are fiddling with the button on the 
     property sheet before you should.  Try moving the code to activate the 
     button into the OnCreate method of the PropertySheet.
     
     I've run into many problems with PropertySheet - it always seems to 
     come down to doing things at the right time.
     
     bd


-----From: Hakan Carlsson 

Hi Carl,=20

I don't know if this will get you any further, but the flag to OR to=20
cPage->m_psp.dwFlags is PSP_HASHELP not PSH_HASHELP.

/H=E5kan





| Вернуться в корень Архива |