How to hide the dialog CLOSE icon
-
J have an application in MFC. There is one dialog window. I want to hide the icon "close" which is inthe right upper corner of the window. What I have to do in my programm? Regards
-
take the properties of the dialog in resources.. in the style tab uncheck the System menu check box..;) nave
-
take the properties of the dialog in resources.. in the style tab uncheck the System menu check box..;) nave
When you want the Sysmenu to be visible
SetWindowLong(GetSafeHwnd(),GWL_STYLE,WS_SYSMENU | GetWindowLong(GetSafeHwnd(),GWL_STYLE));
RedrawWindow(NULL, NULL,RDW_ERASE | RDW_INVALIDATE | RDW_FRAME | RDW_ALLCHILDREN);When you don't want the Sysmenu to be visible
SetWindowLong(GetSafeHwnd(),GWL_STYLE,~WS_SYSMENU & GetWindowLong(GetSafeHwnd(),GWL_STYLE));
RedrawWindow(NULL, NULL,RDW_ERASE | RDW_INVALIDATE | RDW_FRAME | RDW_ALLCHILDREN);Hope this helps you :) Knock out 'T' from CAN'T , You 'CAN' if you think you 'CAN' :cool: