Click to See Complete Forum and Search --> : Desktop Size Minus Bars
Jason Teagle
May 7th, 1999, 04:41 AM
I seem to remember somewhere a call to find out the size of the desktop excluding the task bar and any bars such as Microsoft Office - but I can't remember or find it. Anyone know? Or how to get the size of a window if it was maximised (same effect)?
BrianOG
May 7th, 1999, 04:46 AM
RECT rectWorkArea;
SystemParametersInfo(SPI_GETWORKAREA, 0, &rectWorkArea, 0);
will the the size of the screen minus any registered appbars (e.g. OfficeBar) and taskbars.
Paul McKenzie
May 7th, 1999, 04:49 AM
Capture the WM_GETMINMAXINFO message, or if you use MFC, add ON_WM_GETMINMAXINFO to the message map with the call to OnGetMinMaxInfo()
Regards,
Paul McKenzie
Jason Teagle
May 7th, 1999, 04:52 AM
Thanks for your reply. But this only allows me to dictate the maximum or minimum size of my window, doesn't it? How can I trap this for the desktop? I want to know how big to create a window (which is NOT maximised, but takes up all available space) but without overlapping the taskbar.
Jason Teagle
May 7th, 1999, 05:03 AM
Thanks for your reply. Not only does it work in 32-bit, but if I use the defined value (48) instead of the symbol (SPI_GETWORKAREA), I can use it from 16-bit code on 32-bit systems! Brilliant!
codeguru.com
Copyright Internet.com Inc., All Rights Reserved.