Originally Posted By: argv0
After you get the real hwnd you need to hook into the window (SetWindowsHook) and handle the WM_PAINT (not PRINT) message.


Is this the preferred way to do this, or just an idea of what might work? Wouldn't hooking WM_PAINT affect how mIRC draws the window, since it only tells mIRC to go and do the painting?

In the meantime, i found a semi-working solution with PrintWindow on $window(@picwin).hwnd and PW_CLIENTONLY. After converting it to an ICONINFO struct and calling CreateIconIndirect, I get a suitable HICON that works with the THUMBBUTTON struct.
However, I can't get the hbmMask right to have a transparent background on that Icon (and thats probably not part of the support i should be getting here - after all, thats my lack of knowledge in the GDI/WinAPI department).

Either way, thanks for your reply.