speeddownloadbicycle.blogg.se

How to get the screen off a window
How to get the screen off a window




  • MSDN has some sample code for Positioning Objects on a Multiple Display Setup.
  • There are a few samples of this to be found around the Internet: To do this right, you'll need to enumerate all of the monitors a user has connected to the system and retrieve the working area of each using GetMonitorInfo. It fills in a structure called MONITORINFOEX that contains the member rcWork that defines the working area of that monitor, again expressed in virtual screen coordinates as a RECT structure. The documentation for SystemParametersInfo suggests that you need to call the GetMonitorInfo function instead to get the working area of a monitor other than the primary. The desire to support multiple monitors makes things slightly more complicated. Once you've got the coordinates that describe the working area, it's a simple matter of comparing those to the current position of your application's window to determine if it lies within those bounds.

    how to get the screen off a window how to get the screen off a window

    The pvParam parameter should point to a RECT structure that will receive the coordinates of the working area in virtual screen coordinates. Call the SystemParametersInfo function and specify the SPI_GETWORKAREA flag for the first parameter ( uiAction). Windows makes it relatively simple to determine the size of a user's working area on the primary monitor (i.e., the area of the screen not obscured by the taskbar).






    How to get the screen off a window