/////////////////////////////////////////////////////////////// // // CVideoModeManager::PostReset // // // /////////////////////////////////////////////////////////////// void CVideoModeManager::PostReset ( D3DPRESENT_PARAMETERS* pp ) { if ( pp->Windowed ) { // Add frame LONG Style = WS_VISIBLE | WS_CLIPSIBLINGS | WS_SYSMENU | WS_MINIMIZEBOX; if ( IsDisplayModeWindowed() ) Style |= WS_BORDER | WS_DLGFRAME; SetWindowLong ( m_hDeviceWindow, GWL_STYLE, Style ); LONG ExStyle = 0;//WS_EX_WINDOWEDGE; SetWindowLong ( m_hDeviceWindow, GWL_EXSTYLE, ExStyle ); // Ensure client area of window is correct size RECT ClientRect = { 0, 0, pp->BackBufferWidth, pp->BackBufferHeight }; AdjustWindowRect( &ClientRect, GetWindowLong(m_hDeviceWindow,GWL_STYLE), FALSE ); int SizeX = ClientRect.right - ClientRect.left; int SizeY = ClientRect.bottom - ClientRect.top; SetWindowPos( m_hDeviceWindow, HWND_NOTOPMOST, 0, 0, SizeX, SizeY, SWP_NOMOVE | SWP_FRAMECHANGED ); if ( m_bPendingGainFocus ) OnGainFocus(); } }
void Platform_Win32_Screen::OnCustomEvent(const char* eventId, void* userData) { if (stricmp(eventId,"OnGainFocus")==0) { OnGainFocus(); return; } if (stricmp(eventId,"OnLoseFocus")==0) { OnLoseFocus(); return; } if (stricmp(eventId,"OnRestore")==0) { OnRestore(); return; } if (stricmp(eventId,"OnMinimize")==0) { OnMinimize(); return; } if (stricmp(eventId,"OnWmSize")==0) { int width=*(static_cast<int*>(userData)); int height=*((static_cast<int*>(userData))+1); OnWmSize(width,height); return; } }