Both of your FindWindows give me the hwnd of the mIRC window.
If you can't get this working then maybe you could use EnumWindows() to enumerate through every window on the desktop and find the mIRC one.