Click to See Complete Forum and Search --> : WM_CLOSE doest not get at CPropertySheet


abkareem
May 19th, 1999, 09:33 AM
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.

olivier
May 19th, 1999, 09:54 AM
WM_DESTROY should work no ?

abkareem
May 19th, 1999, 10:19 AM
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

Jason Brooks
May 19th, 1999, 12:28 PM
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!

abkareem
May 20th, 1999, 02:56 AM
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.

May 20th, 1999, 09:42 AM
use CWnd
ModifyStyle() documentation