PDA

View Full Version : How do I create a full screen window on...


Scottso
04-05-2007, 03:55 AM
...windows? I have read through the msdn documentation on the WNDCLASSEX structure and the CreateWindowEx() function, and I cannot figure out how to create a full screen window. I read through the window style flags and they didn't seem to help either. Help me please, thx.
Ok I didn't think I had to specify that I meant programmatically, but I do. And f11 is just for internet explorer and the like, and it is for maximizing it, not making it full screen, so that answer just plain old sucks lol.
o right i meant c++, that i shud have specified XD

Dale w
04-05-2007, 04:55 AM
F11
thats all.
Can i have my 10 points now please?

Greg
04-05-2007, 05:55 PM
What language? VB 2005 would be


Me.WindowState = FormWindowState.Maximized

and you would have something simmiliar for C++


Microsoft Visual Studio 2005 Help Group
http://tech.groups.yahoo.com/group/MicrosoftVisualStudio2005/

Walt Kolo
04-05-2007, 08:55 PM
First, you get the dimensions. Divided by 1, it retains the full dimensions of your desktop. Should work --

winMain()
{

short Width=GetSystemMetrics(SM_CXSCREEN)/1;
short Height=GetSystemMetrics(SM_CYSCREEN)/1;

(SM_CXSCREEN)/1; *in case sentence got cut off.

Then, apply that to your window in lieu of of specifying width and height by pixels.


hwnd = CreateWindowEx (
0,
szClassName,
"Windows App",
WS_OVERLAPPEDWINDOW,
CW_USEDEFAULT,
CW_USEDEFAULT,
Width, /* The programs width */
Height, /* and height in pixels */
HWND_DESKTOP,
NULL,
hThisInstance,
NULL
);