Well I would think (not sure if this will actually work) using SendMessage sending it a WM_DESTROY would be a more... graceful(?) way of doing it. I'm not sure if mIRC displays the stuff after receiving WM_CLOSE/WM_QUIT or if it does it in WM_DESTROY. I would think the former simply because I don't think you can "cancel" a WM_DESTROY. Meaning once that message is received, I'm pretty sure the window MUST die. And most likely, if you send a WM_DESTROY to the main mIRC window, that will end the program.
May not work, but if it does, it would be cleaner than using TerminateProcess. Especially since MS specifically says only use TerminateProcess in "extreme circumstances" :P