I still can't get this to work. Could it be that mIRC unloads the DLL upon exit before the WM_DESTROY message is received?

I'm really not doing anything fancy with the DLL... I'm just catching the WM_SIZE message so I know when the mIRC window is resized.

I tested this with ShowMessage(), on WM_CLOSE a dialog pops up, but when I replace it with WM_DESTROY or WM_QUIT, nothing happens...