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
CODE PROJECT For Those Who Code
  • Home
  • Articles
  • FAQ
Community
V

vg8open

@vg8open
About
Posts
1
Topics
1
Shares
0
Groups
0
Followers
0
Following
0

Posts

Recent Best Controversial

  • Detect working area of primary monitor
    V vg8open

    I have a program that display a popup dialog above the notification area of the task bar. I am using the following function to get the work area of the primary monitor. CRect rcDesktop; ::SystemParametersInfo(SPI_GETWORKAREA,0,&rcDesktop,0); CRect rc; GetWindowRect(rc); ScreenToClient(rc); unsigned int m_nStartPosX = rcDesktop.right - rc.Width() - 1; unsigned int m_nStartPosY = rcDesktop.bottom - rc.Height(); SetWindowPos( &wndTop, m_nStartPosX, m_nStartPosY, rc.Width(), rc.Height(), SWP_NOOWNERZORDER | SWP_NOACTIVATE); I tested my program on my single/dual monitor setups and it's working correctly, but one of my users reported that on his three monitor setup, the popup dialog is displaying on the wrong monitor. It seems like SystemParametersInfo() can't get the correct working area on his system. Does anyone know any other way to get the working area of the primary monitor?

    C / C++ / MFC question workspace
  • Login

  • Don't have an account? Register

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