Advertisement

Fullscreen GDI

Started by February 10, 2002 08:30 AM
5 comments, last by ank2 22 years, 7 months ago
I have learnt about the basics of windows and now want to go to the next stage, GDI. So can anyone tell me the easiest way to go into fullscreen GDI.
Group Who
i don''t know if this is really fullscreen per se, in creating a window, you can specify the windows width and height by using the function, GetSystemMetrics(SM_CXSCREEN) and GetSystemMetrics(SM_CYSCREEN)
http://www.dualforcesolutions.comProfessional website designs and development, customized business systems, etc.,
Advertisement
You also need to hide the Non-Client areas of the window. You do that by setting the window style and extended style. Here is some C code - it''s not quite fullscreen as it leaves the taskbar showing. You can make the needed changes to go fullscreen.

  	// get current screen dimensions	SystemParametersInfo(SPI_GETWORKAREA, sizeof(RECT), &WorkArea, 0);	// create main window	if ( !( hwnd = CreateWindowEx(WS_EX_APPWINDOW		    , WINDOW_CLASS_NAME		    , WINDOW_TITLE		    , WS_POPUPWINDOW | WS_VISIBLE			, 0, 0, WorkArea.right, WorkArea.bottom		    , HWND_DESKTOP, NULL, hinstance, NULL) ) )	{		return(0);	}  
"I thought what I'd do was, I'd pretend I was one of those deaf-mutes." - the Laughing Man
when creating the window, set the style flag to WS_POPUP and it should work

[Edited by - kmsixpence on October 17, 2005 7:23:59 PM]
Can you give me some info about the WorkArea structure please?
Thanks.
Group Who
That''s a RECT structure.

"I thought what I'd do was, I'd pretend I was one of those deaf-mutes." - the Laughing Man
Advertisement
Wow, that was quick. Thanks.
Group Who

This topic is closed to new replies.

Advertisement