Changing Resolution

Started by
2 comments, last by Metus 22 years, 9 months ago
I''m writing a OpenGL Version of the Snes emulator Zsnes and got a problem; When Changing from Fullscreen (WS_POPUP) to Windowed (WS_POPUP) I''ve got 2 Instances.. My basic code is: if(hWnd) { CloseWindow(hWnd) UnregisterClass("Zsnes", hInst) } InitOpenGL(Width, Height, Depth, Fullscreen (true/false)) any ideas that''s wring
Ethereal
Advertisement
Do you not have to destroy the window and other stuff?
Check the NeHe base code.
quote:Original post by Obelix
Do you not have to destroy the window and other stuff?
Check the NeHe base code.


I''ve been looking to NeHe''s base code, and it''s similar to mine, though he works and mine not!

If i Destroy the Window, Nothing happens at all..=
Well. i think there is no need of destroying the Window...
you can change the WindowStyles "on the fly". youll just have to repaint your window.
but since you are going to change the resolution you are going to repaint it anyway.

  SetWindowLong(hWnd,GWL_EXSTYLE,WndStyle[_ffullscreen].ExWndStyle);   SetWindowLong(hWnd,GWL_STYLE,WndStyle[_ffullscreen].WndStyle);  


Well WndStyle is an instance of a structure i made wich holds the windowStyles...

Hmm i dont know if this helps. but maybe..

cu

GDG

This topic is closed to new replies.

Advertisement