mIRC 6.03 seems to get confused when I try to minimize it from another application. I have a small C++ app tied to a hotkey so I can instantly minimize several applications with one keystroke.
Here is the tiny piece of code I'm using to minimize mIRC from another app:
HWND hWnd;
hWnd = ::FindWindow("mIRC",NULL);
if(hWnd) {
::PostMessage(hWnd,WM_SYSCOMMAND,SC_MINIMIZE,0);
}
My mIRC is configured to minimize to the tray and I do NOT have window locking enabled, but whenever I run this piece of code, mIRC does minimize to the tray but it pops up a dialog asking me for a lock password as if I had locking enabled.
If I replace ::PostMessage with
::ShowWindow(hWnd, SW_MINIMIZE);
mIRC does minimize without asking me for a lock message, but it only minimizes to the taskbar and not to the tray.
Any ideas? or is this a bug? or is there some other preferred method of doing this?
Thanks.