I'm puzzled
-
I've implemented a wizard using the CPropertySheet and CPropertyPage classes. When i'm in a particular page of the wizard, when i click the "Cancel" button or press ESC or close the page by clicking on the "X" in the right top corner, the CANCEL message gets fired and control comes to the OnCancel command handler. At this point the PSN_WIZFINISH notification is not sent. void CMyPropertyPage::OnCancel() { ASSERT(m_pSheet != NULL); m_pSheet->EndDialog(IDCANCEL); } Now I have a scenario where i have to forcefully close the wizard by sending SendMessage(WM_COMMAND,IDCANCEL); Now after the CANCEL message being sent, the PSN_WIZFINISH notification is also sent . :confused: In my class, i've overridden the OnWizardFinish to do some functionality.. So when i do a "SendMessage" i dont want the PSN_WIZFINISH to be sent .. why does it work this way and how do i avoid it ?
-
I've implemented a wizard using the CPropertySheet and CPropertyPage classes. When i'm in a particular page of the wizard, when i click the "Cancel" button or press ESC or close the page by clicking on the "X" in the right top corner, the CANCEL message gets fired and control comes to the OnCancel command handler. At this point the PSN_WIZFINISH notification is not sent. void CMyPropertyPage::OnCancel() { ASSERT(m_pSheet != NULL); m_pSheet->EndDialog(IDCANCEL); } Now I have a scenario where i have to forcefully close the wizard by sending SendMessage(WM_COMMAND,IDCANCEL); Now after the CANCEL message being sent, the PSN_WIZFINISH notification is also sent . :confused: In my class, i've overridden the OnWizardFinish to do some functionality.. So when i do a "SendMessage" i dont want the PSN_WIZFINISH to be sent .. why does it work this way and how do i avoid it ?
Look up WM_COMMAND in MSDN to learn how to properly format a WM_COMMAND message. The wParam and lParam parameters have special meanings that you are ignoring.
"You're obviously a superstar." - Christian Graus about me - 12 Feb '03 "Obviously ??? You're definitely a superstar!!!" mYkel - 21 Jun '04 Within you lies the power for good - Use it!
Honoured as one of The Most Helpful Members of 2004