Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • World
  • Users
  • Groups
Skins
  • Light
  • Cerulean
  • Cosmo
  • Flatly
  • Journal
  • Litera
  • Lumen
  • Lux
  • Materia
  • Minty
  • Morph
  • Pulse
  • Sandstone
  • Simplex
  • Sketchy
  • Spacelab
  • United
  • Yeti
  • Zephyr
  • Dark
  • Cyborg
  • Darkly
  • Quartz
  • Slate
  • Solar
  • Superhero
  • Vapor

  • Default (No Skin)
  • No Skin
Collapse
Code Project
  1. Home
  2. General Programming
  3. C / C++ / MFC
  4. Resolution Problems

Resolution Problems

Scheduled Pinned Locked Moved C / C++ / MFC
question
1 Posts 1 Posters 0 Views 1 Watching
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • B Offline
    B Offline
    Bernhard
    wrote on last edited by
    #1

    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

    1 Reply Last reply
    0
    Reply
    • Reply as topic
    Log in to reply
    • Oldest to Newest
    • Newest to Oldest
    • Most Votes


    • Login

    • Don't have an account? Register

    • Login or register to search.
    • First post
      Last post
    0
    • Categories
    • Recent
    • Tags
    • Popular
    • World
    • Users
    • Groups