Resolution Problems
-
Well... in our application, we've changed the resolution dynamically, when the resolution was too small to show the whole dialog. In WinNt4.0 there weren't any problems, in Win2k strange things occur (it seems that the WM_DISPLAYCHANGE message isn't sent.. cause the toolbar stays at the position [looks like it is floating around on the screen) the code [pre] void CMainFrame::OnActivate(UINT nState, CWnd* pWndOther, BOOL bMinimized) { CFrameWnd::OnActivate(nState, pWndOther, bMinimized); // TODO: Add your message handler code here if(nState == WA_INACTIVE) ChangeDisplaySettings(NULL, 0); if(nState != WA_INACTIVE){ DEVMODE* pDevMode; pDevMode = new DEVMODE; pDevMode->dmSize = sizeof(DEVMODE); // dm.dmDriverExtra = 800; if(EnumDisplaySettings(NULL,ENUM_CURRENT_SETTINGS, pDevMode )){ DWORD dw_width = pDevMode->dmPelsWidth; DWORD dw_height= pDevMode->dmPelsHeight; if(dw_width < (unsigned int)pParameter->GetInt ("XPixel")){ pDevMode->dmPelsWidth = pParameter->GetInt ("XPixel"); pDevMode->dmPelsHeight = pParameter->GetInt ("YPixel"); long l = ChangeDisplaySettings(pDevMode, 0); } delete pDevMode; } }//if(!WA_INACTIVE } [/pre] Any ideas ?
"I'm from the South Bronx, and I don't care what you say: those cows look dangerous."
U.S. Secretary of State Colin Powell at George Bush's ranch in Texas