Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • World
  • Users
  • Groups
Skins
  • Light
  • Cerulean
  • Cosmo
  • Flatly
  • Journal
  • Litera
  • Lumen
  • Lux
  • Materia
  • Minty
  • Morph
  • Pulse
  • Sandstone
  • Simplex
  • Sketchy
  • Spacelab
  • United
  • Yeti
  • Zephyr
  • Dark
  • Cyborg
  • Darkly
  • Quartz
  • Slate
  • Solar
  • Superhero
  • Vapor

  • Default (No Skin)
  • No Skin
Collapse
Code Project
  1. Home
  2. General Programming
  3. C / C++ / MFC
  4. I'm puzzled

I'm puzzled

Scheduled Pinned Locked Moved C / C++ / MFC
question
2 Posts 2 Posters 0 Views 1 Watching
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • G Offline
    G Offline
    g3e
    wrote on last edited by
    #1

    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 ?

    PJ ArendsP 1 Reply Last reply
    0
    • G g3e

      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 ?

      PJ ArendsP Offline
      PJ ArendsP Offline
      PJ Arends
      wrote on last edited by
      #2

      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

      Within you lies the power for good; Use it!

      1 Reply Last reply
      0
      Reply
      • Reply as topic
      Log in to reply
      • Oldest to Newest
      • Newest to Oldest
      • Most Votes


      • Login

      • Don't have an account? Register

      • Login or register to search.
      • First post
        Last post
      0
      • Categories
      • Recent
      • Tags
      • Popular
      • World
      • Users
      • Groups