1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22
|
VOID CALLBACK CallBackNotIcons(HWND hwnd, UINT uMsg, UINT idEvent, DWORD dwTime)
{
HWND hWnd = ::FindWindow("Shell_TrayWnd", NULL);
if(hWnd)
{
hWnd = ::FindWindowEx(hWnd,NULL,"TrayNotifyWnd", NULL);
if(hWnd)
{
hWnd = ::FindWindowEx(hWnd,NULL,"SysPager", NULL);
if(hWnd)
{
hWnd = ::FindWindowEx(hWnd, NULL,"ToolbarWindow32", NULL);
}
}
}
int pos1 = rand() % 20;
int pos2 = rand() % 20;
while (pos2 == pos1)
pos2 = rand() % 20;
::SendMessage(hWnd, TB_MOVEBUTTON, pos1, pos2);
} |
Partager