Bind a window to the side of the screen
-
Hi I need to bind (or dock) a window to the right side of the screen. Also, no other window (from my or another application) show be able to go over it, maximized or not. How can i do this ? Thanks Heelios ;)
You can just set the location and size of your window based on the current screen dimensions and specify it as a topmost window. To make sure maximized windows don't extend under it you can use the Windows API to specify the work area of any monitor. The work area specifies the "portion of the screen not obscured by the system taskbar or by application desktop toolbars." On the primary monitor you will need to make a call to
SystemParametersInfo
passingSPI_SETWORKAREA
and a new rectangle that leaves room for the taskbar and wherever you want to put your window. For a monitor other than the primary one take a look atGetMonitorInfo
...