Switching fullscreen to windowed in DX8
Hi all,
Long time since I last post here
Well, my problem is, I''m trying to switch from fullscreen to windowed and it''s not fully working...
It switches but the window controls (Title bar, close button, border, etc) doesn''t appear, so I have to right click on the task bar and minimize the window, when I maximize it the controls appear.
What could be happening ?
Thanks for any answer...
"Eu sou, na verdade, a sombra do que quero ser."
Nepheus
Here''s what I''m doing:
// if changing TO windowed...
if (blModoJanela)
{
SetWindowLong(p_stSistema->Janela, GWL_STYLE, WS_POPUP | WS_OVERLAPPEDWINDOW);
SetWindowPos(p_stSistema->Janela, HWND_TOP, 0, 0, ptTamanho.X, ptTamanho.Y, SWP_SHOWWINDOW);
}
else // if changing FROM windowed TO fullscreen
{
SetWindowLong(p_stSistema->Janela, GWL_STYLE, WS_POPUP);
SetWindowPos(p_stSistema->Janela, HWND_TOPMOST, 0, 0, LarguraModoVideo(mvModoVideo), AlturaModoVideo(mvModoVideo), SWP_SHOWWINDOW);
}
Obs: (some translations
p_stSistema->Janela = HWND Window
ptTamanho.X & .Y = ptSize.X & Y
blModoJanela = blWindowedMode
LarguraModoVideo(mvModoVideo) = returns the Screen Width
AlturaModoVideo(mvModoVideo) = returns the Screen Height
Thanks
// if changing TO windowed...
if (blModoJanela)
{
SetWindowLong(p_stSistema->Janela, GWL_STYLE, WS_POPUP | WS_OVERLAPPEDWINDOW);
SetWindowPos(p_stSistema->Janela, HWND_TOP, 0, 0, ptTamanho.X, ptTamanho.Y, SWP_SHOWWINDOW);
}
else // if changing FROM windowed TO fullscreen
{
SetWindowLong(p_stSistema->Janela, GWL_STYLE, WS_POPUP);
SetWindowPos(p_stSistema->Janela, HWND_TOPMOST, 0, 0, LarguraModoVideo(mvModoVideo), AlturaModoVideo(mvModoVideo), SWP_SHOWWINDOW);
}
Obs: (some translations
p_stSistema->Janela = HWND Window
ptTamanho.X & .Y = ptSize.X & Y
blModoJanela = blWindowedMode
LarguraModoVideo(mvModoVideo) = returns the Screen Width
AlturaModoVideo(mvModoVideo) = returns the Screen Height
Thanks
I''m not sure if this has anything to do with it, but have you tried handling the WM_PAINT message?
This topic is closed to new replies.
Advertisement
Popular Topics
Advertisement