detect if extended desktop is to the left or to the right

Posted by bobobobo on Stack Overflow See other posts from Stack Overflow or by bobobobo
Published on 2010-04-19T20:10:37Z Indexed on 2010/04/19 20:13 UTC
Read the original article Hit count: 222

Filed under:
|
|
|

So, I have a screen capture utility (it takes full screen shots and saves it to png files) I've written, and it uses SM_CXVIRTUALSCREEN and SM_CYVIRTUALSCREEN to determine the width and height of the desktop.

I then get the desktop DC and copy out the bits and save them as png.

    BitBlt(
      backDC, 0, 0,
      backBufferCX, backBufferCX,
      desktopDC, X_SRC, 0, SRCCOPY );

Here X_SRC is usually 0, UNLESS THE DESKTOP HAS BEEN EXTENDED "TO THE LEFT". In that case it needs to be -1280px, for example, if the left monitor measures 1280px.

How can I determine if the desktop's starting point is negative (if the user has extended his desktop to the left?)

© Stack Overflow or respective owner

Related posts about Windows

Related posts about c++