Original Post
🔒 Locked
how do i?
Advertisement
try using a better subject title. most people here are asking how to do things, so calling your post ''how do i?'' doesn''t attract the eye in the same way as ''going fullscreen'' would.
in answer to you question, I don''t know.
in answer to you question, I don''t know.
quote:
Original post by KingMXF
how do i make a window FULLSCREEN in WIN32?
I think you would succeed with
ShowWindow(hWnd, SW_MAXIMIZE)
quote:
why is it bad to have your HWND a global?
As others have already said, global variables are generally
dangerous because you can''t control who can access them.
In other words, you will learn not to use globals after you first
spend some hours searching for who the hell is overwriting
that variable...
I got this function from somewhere:
dDraw is of type LPDIRECTDRAW, you should store it until you''re switching back to windows:
bool DDrawFullScreen()
{
HRESULT ddrval;
ddrval=DirectDrawCreate(NULL,&dDraw,NULL);
if (ddrval!=DD_OK) return false;
ddrval=dDraw->SetCooperativeLevel(hwnd,DDSCL_EXCLUSIVE|DDSCL_FULLSCREEN);
if (ddrval!=DD_OK) return false;
ddrval=dDraw->SetDisplayMode(scr_x, scr_y, 32);
if (ddrval!=DD_OK ) return false;
// Workaround for RIVA 128
ddrval=dDraw->SetCooperativeLevel(hwnd,DDSCL_EXCLUSIVE|DDSCL_FULLSCREEN);
if (ddrval != DD_OK) return false;
return true;
}
dDraw is of type LPDIRECTDRAW, you should store it until you''re switching back to windows:
void DDShut()
{
dDraw->Release();
dDraw = NULL;
}
Topic Locked
This topic has been locked by a moderator. New replies are not allowed.
Sign in to reply to this topic.
Advertisement