jhunt
asked on
Full screen in MFC
How do I make a Visual C++ looking full screen with the least hassle?
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
I am assuming that you want to control the attributes of the main frame window in a MFC application. the easiest way to do that is to overide the
FrameWnd::PreCreateWindow with your own and set the style and size
using the cs structure.
cs.style = WS_OVERLAPPED | WS_CAPTION & ~FWS_ADDTOTITLE
| FWS_PREFIXTITLE | WS_THICKFRAME | WS_SYSMENU
| WS_MAXIMIZE & ~WS_VISIBLE;
// Size the window to full screen size
cs.cy = ::GetSystemMetrics( SM_CYSCREEN );
cs.cx = ::GetSystemMetrics( SM_CXSCREEN );
cs.y = 0;
cs.x = 0;
FrameWnd::PreCreateWindow with your own and set the style and size
using the cs structure.
cs.style = WS_OVERLAPPED | WS_CAPTION & ~FWS_ADDTOTITLE
| FWS_PREFIXTITLE | WS_THICKFRAME | WS_SYSMENU
| WS_MAXIMIZE & ~WS_VISIBLE;
// Size the window to full screen size
cs.cy = ::GetSystemMetrics( SM_CYSCREEN );
cs.cx = ::GetSystemMetrics( SM_CXSCREEN );
cs.y = 0;
cs.x = 0;
???