Thanks Sat, I don't know what combination of flags WS_EX_PALETEWINDOW corresponded to, but that wasn't the problem.

An interesting thing is if I remove the "if (hwnd == myHwnd)" then the window will be created and will cause mIRC to crash as usual. (myHwnd for some reason beyond me is zero inside DLLWindowProc even though the CreateWindowEx() call succeeds!).

Also, if I remove or say replace DefWindowProc() with something like "break;" then window creation will fail as well, so it seems my problem is in my WndProc.

But anyway, this is driving me nuts, so let me see if I can ask for something else. Can anyone here provide a working window creation example in C (not C++) for an mIRC DLL?

Last edited by deadbeef; 05/08/11 11:47 PM.