Hey guys today i was looking EnumWindows function in msdn so i decided i wanna write a window hider for msn but i dont rlly get the picture of it it get a EnumWindowsProc for it but i dunno why my program fails :S
Code:
#include <stdio.h>
#include <windows.h>
BOOL CALLBACK Procedure(HWND child,LPARAM lParam)
{
char WindowChildClass[]="DirectUIHWND";
HWND Parent;
Parent=FindWindow(NULL,"Windows Live Messenger");
child=FindWindowEx(Parent,0,WindowChildClass,0);
ShowWindow(child,SW_HIDE);
return TRUE;
}
void hide_it()
{
EnumWindows(Procedure,0);
}
int main(void)
{
hide_it();
return 0;
}