MSN Messenger chat windows problem

hi,

i'm trying to minimize/restore the MSN messenger chat windows using a CBTProc hook

and since I cannot use the ShowWindow(HWND, UINT) i must mimic the minimize using SetWindowPos

but when I restore using ShowWindow(hWnd, SW_RESTORE) sometimes it just doesn't restore it right

i'm using the "WindowFrame on" setting for messenger windows and the DirectUIHWND is getting back the wrong size...

I'm saving the window rectangle before minimize but no luck...

anyone knows how to do this right ?

#333010

here's how it looks after calling ShowWindow(hWnd, SW_RESTORE)

msnchat.jpg

#333015

Did you try SendMessage(hwnd, WM_SYSCOMMAND, SC_RESTORE, 0);?

#333079

herd you are a genius! that's all I can say ;)

#333210