sasinair
asked on
Taskbar size
Hi all,
How can I trap the windows taskbar size changes programmatically??
thanks
sasinair
How can I trap the windows taskbar size changes programmatically??
thanks
sasinair
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
ASKER
Thanks a lot. It helped me.
I have one more doubt...
How can we find the desktop changed rectangle area? That means only the rectangle that changed in the desktop.
Thanks in advance
sasinair
I have one more doubt...
How can we find the desktop changed rectangle area? That means only the rectangle that changed in the desktop.
Thanks in advance
sasinair
// example
RECT rct;
long lResult = SystemParametersInfo(SPI_G
this gives you the work area in a rectangle.
fResult = (BOOL) SHAppBarMessage(ABM_GETTAS
where pabd is a pointer to a struct like this
typedef struct _AppBarData {
DWORD cbSize;
HWND hWnd;
UINT uCallbackMessage;
UINT uEdge;
RECT rc;
LPARAM lParam;
} APPBARDATA, *PAPPBARDATA;
use rc to get the bounding rectangle of the taskbar (that's screen coordinates)
then you can do some math between the work area rect and taskbar Rect
but I would think that if the taskbar has changed, the Work area rect tells you where the Taskbar is not.
So you could resize your app to fit that area.
hope that helps,
J
This message is sent when a system setting has changed, and among these settings, is the size of the desktop working area (SPI_SETWORKAREA parameter of SystemParametersInfo API).
http://msdn.microsoft.com/library/default.asp?url=/library/en-us/sysinfo/base/wm_settingchange.asp
http://msdn.microsoft.com/library/default.asp?url=/library/en-us/sysinfo/base/systemparametersinfo.asp