CodeGuru Home VC++ / MFC / C++ .NET / C# Visual Basic VB Forums Developer.com
Results 1 to 6 of 6
  1. #1
    Join Date
    May 1999
    Posts
    25

    WM_CLOSE doest not get at CPropertySheet

    Dear All,,,


    I have a simple property sheet dialog box. Derived from CPropertySheet.
    Each page is derived from CPropertyPage. I want to get WM_CLOSE message in
    CPropertySheet derived class when user click on Top right close button or when
    user select Close menu option of control menu.

    Pl reply....

    Regards,
    Kareem.


  2. #2
    Join Date
    May 1999
    Location
    Paris, France
    Posts
    216

    Re: WM_CLOSE doest not get at CPropertySheet

    WM_DESTROY should work no ?


  3. #3
    Join Date
    May 1999
    Posts
    25

    Re: WM_CLOSE doest not get at CPropertySheet

    Hi ...

    Thanks for reply.. but I want WM_CLOSE. There are some difference between WM_CLOSE and WM_DETROY. I want to get message before delete window.


    PL reply.
    Thanks in advance
    kareem


  4. #4
    Join Date
    May 1999
    Location
    UK
    Posts
    65

    Re: WM_CLOSE doest not get at CPropertySheet

    WM_CLOSE does not seem to be handled or called for a property page. Therefore I add my handlers for saving files, data etc in WM_DESTROY before the call to CPropertyPage::OnDestroy() this way my variables are still in tact!




  5. #5
    Join Date
    May 1999
    Posts
    25

    Re: WM_CLOSE doest not get at CPropertySheet

    Thanks for ur reply.

    But , Is possible to map WM_CLOSE to CPropertySheet window. Because. My I application is multithreaded program. The secondary thread is doing some downloading work. It will take up to 10 minute. at that time main thread handle GIU. When user perssing the top right exit button, while downloading is on going, I want abort the operation. I mean user dont permit to delete or exit the window when downloading is on going. For that I am trying to map WM_CLOSE message to my property sheet window. WM_DESTROY is ok . It will come after deleting window. WM_CLOSE will come before that in normal case.

    Or How I can disable the top right close of property sheet?

    Thanks in advance.
    Kareem.


  6. #6
    Guest

    Re: WM_CLOSE doest not get at CPropertySheet

    use CWnd
    ModifyStyle() documentation


Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  





Click Here to Expand Forum to Full Width

Featured