Click here to Skip to main content
15,879,239 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
Hi,

can anybody tell me how to implement a close button (cross icon) in a property sheet MFC application? I'm also trying WM_CLOSE message handler but I want yes/no option in close button.

Please help me.

Thanks
Vivek chauhan
Posted
Updated 29-May-10 1:56am
v7

1 solution

If you mean, you want to simulate the close button click, PostMessage WM_CLOSE to your main frame window.

AfxGetMainWnd()->PostMessage(WM_CLOSE);


On the other hand, if you mean you want to handle the Close button click, just add a message handler for WM_CLOSE.
 
Share this answer
 

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900