Software Archive
Read-only legacy content
17061 Discussions

Upper right close box doesn't work

hbell
Beginner
329 Views
I can't get my Window to close when I click the upper right "X" close box. Is there something I need to check in order to make this functional?

Harry Bell
0 Kudos
2 Replies
Jugoslav_Dujic
Valued Contributor II
329 Views
Harry, please,

Which type of project? Which compiler? As you posted it, we
could only guess if you're unable to make the X button work in your Win32 application or you can't close browser on a Linux?

(Educated guess) A Win32 application (with standard message loop) should handle WM_DESTROY message in the frame window procedure
like this:

 
SELECT CASE(Msg) 
... 
CASE (WM_DESTROY) 
      CALL PostQuitMessage(wParam) 
... 


I hope that's the answer,

Regards,

Jugoslav
0 Kudos
hbell
Beginner
329 Views
I discovered how to close a window by clicking the the upper right box from a dialog window: One of the control IDs must be "IDCANCEL". If at least one of the controls in the dialog window is named exactly "IDCANCEL" then clicking the upper right box will invoke this control with a cancel signal. Obscure indeed.
0 Kudos
Reply