mIRC Home    About    Download    Register    News    Help

Print Thread
Joined: Apr 2003
Posts: 9
D
dabb Offline OP
Nutrimatic drinks dispenser
OP Offline
Nutrimatic drinks dispenser
D
Joined: Apr 2003
Posts: 9
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.

Joined: Mar 2003
Posts: 272
C
Fjord artisan
Offline
Fjord artisan
C
Joined: Mar 2003
Posts: 272
Yeah, use your mouse and that little _ button.


- cF
Dedicated helper for rent.
Joined: Dec 2002
Posts: 3,127
P
Hoopy frood
Offline
Hoopy frood
P
Joined: Dec 2002
Posts: 3,127
I dont know anything about C++, so i'm not sure if its any help, but if you use Control+Minimize with no password set with lock, thats when mIRC will ask you for a temporary password.



ParaBrat @#mIRCAide DALnet
Joined: Dec 2002
Posts: 774
T
Hoopy frood
Offline
Hoopy frood
T
Joined: Dec 2002
Posts: 774
Try sending "/showmirc -t" command to mirc


Code:
//if ( khaled isgod ) echo yes | else echo no

Link Copied to Clipboard