MFC General: How to change frame and caption window styles at run-time?
Q: How to change frame and caption window styles at run-time?
I want to remove at run-time the window caption (title bar). I called GetWindowLong to get the old style, removed the WS_CAPTION flag, then called SetWindowLong to set the new style. But this seems to have no effect. What must be done?
A: After 'SetWindowLong()' to set the new style you must call 'SetWindowPos()' with 'SWP_DRAWFRAME' or 'SWP_FRAMECHANGED' flag set.