v***@hotmail.com
2010-01-15 03:42:04 UTC
Dear everyone,
I was trying to write some code to change size and/or position of taskbar in
WinXP. At first I think it's just a regular window so I tried:
HWND hwnd = FindWindow("Shell_TrayWnd", NULL);
MoveWindow(hwnd, a,b,c,d, TRUE); //a,b,c,d are desided position and size
But it doesn't work. Later on I noticed that I should use some
shellappmessage thus came up the following code:
APPBARDATA appBarData;
appBarData.cbSize = sizeof(appBarData); appBarData.hWnd = FindWindow(_T("Shell_TrayWnd"), NULL);
appBarData.uEdge = ABE_BOTTOM;
appBarData.rc.left = -2;
appBarData.rc.top = -2;
appBarData.rc.right = 1026;
appBarData.rc.bottom = 57;
SHAppBarMessage(ABM_SETPOS, &appBarData);
MoveWindow(hwnd, a,b,c,d, TRUE); //a,b,c,d are desided position and size
However, the code still doesn't work at all. Microsoft seems to prevent
people change size/position of taskbar.
How can I do that? Any help is appreciated.
Thanks,
Vince
I was trying to write some code to change size and/or position of taskbar in
WinXP. At first I think it's just a regular window so I tried:
HWND hwnd = FindWindow("Shell_TrayWnd", NULL);
MoveWindow(hwnd, a,b,c,d, TRUE); //a,b,c,d are desided position and size
But it doesn't work. Later on I noticed that I should use some
shellappmessage thus came up the following code:
APPBARDATA appBarData;
appBarData.cbSize = sizeof(appBarData); appBarData.hWnd = FindWindow(_T("Shell_TrayWnd"), NULL);
appBarData.uEdge = ABE_BOTTOM;
appBarData.rc.left = -2;
appBarData.rc.top = -2;
appBarData.rc.right = 1026;
appBarData.rc.bottom = 57;
SHAppBarMessage(ABM_SETPOS, &appBarData);
MoveWindow(hwnd, a,b,c,d, TRUE); //a,b,c,d are desided position and size
However, the code still doesn't work at all. Microsoft seems to prevent
people change size/position of taskbar.
How can I do that? Any help is appreciated.
Thanks,
Vince