class CWindow{
public:
CWindow ();
void WSetMainSettings(int w, int h, bool fs);
bool WRegister ();
HWND WCreate ();
void WChangeToFullScreen();
bool WReturnFullScreen();
void WKillPartial ();
void WKillAbsolute();
I have implemented the switch (only for test) at the WM_KEYDOWN -> VK_TAB. I have included an if like that :
if (!Window.WReturnFullScreen())
WReturnFullScreen returns true if Window is in FullScreen mode, and false if it''s in Windowed mode. Then I Kill partially the window (Without unregister), set new settings and create. The problem appears when setting from fullscreen to window, and the result is a bit hard of explain.
When I hit TAB it creates the window, in the windowed mode, perfecly but (There''s always an but) appears a white screen behind, and it is not possible to see the desktop!!!
I hope that my explanations are clearly enough. Always, thanks for reading :D.
Jacob.
PS: This is how I delete the window:
wglMakeCurrent(NULL, NULL);
wglDeleteContext(g_hRC);
ReleaseDC(g_hWnd, g_hDC);
if(mFullScreen){
ChangeDisplaySettings(NULL,0);
}
UnregisterClass("CWindow",g_hInstance);
Building my own Window Class
Hi , I''ve posted this msg over the begginer''s forum without luck.Maybe it''s better in this forum.
======
I''m just loosing my time trying to build a very simple, but powerfull enough Window Class for Windows . (It will include full OpenGL support soon).
But I''ve found a little problem when programming the part of the class that switches Window->FullScreen and viceversa. Here you have some part of the declaration code:
i dont know much about opengl but shouldn''t u release the 3d device and restart it ? iam a newb myself so i could be completly wrong :/
Hang on, so is the problem when switching to fullscreen or from fullscreen? It sounds like you''re switching to fullscreen, in which case it makes sense you can''t see the desktop (although it highly depends on your card & driver combo).
Or do you mean you''re creating the GL window in windowed mode and you''re losing your desktop? (that could be card/driver related)
If it''s the second one, try posting your window/GL setup code.
Or do you mean you''re creating the GL window in windowed mode and you''re losing your desktop? (that could be card/driver related)
If it''s the second one, try posting your window/GL setup code.
http://www.gamedev.net/community/forums/topic.asp?topic_id=172908 <-- I put the answear there... ( also please don''t double post )
This topic is closed to new replies.
Advertisement
Popular Topics
Advertisement