KJohn Posted December 22, 2009 Posted December 22, 2009 Windows created with the $WS_POPUP style have the annoying feature of not minimizing like other windows when you click on their taskbar button (when they are the currently active window). I was thinking of getting around this by registering a function which minimizes the window against the appropriate windows message using GuiRegisterMsg(). I've cracked my head trying to figure out which of the window messages listed in the help file is the one I want. I've tried anything that could remotely sound like what I want, and no luck. It's impractical to test against each and every one of those window messages, so if anyone knew what the message code that I am looking for is, I'd be really grateful. (or alternatively, another solution to the issue I'm trying to solve would do just fine). Thanks!
AppTux Posted December 22, 2009 Posted December 22, 2009 Maybe you can use a button #include <WindowsConstants.au3> #include <GuiConstantsEx.au3> $GUI = GUICreate("Example",300,300,-1,-1,$WS_POPUP) ;GUI $Button1 = GUICtrlCreateButton("_",5,5) ;Minimize button GUISetState() While 1 $Msg = GUIGetMsg() Switch $Msg Case $Button1 GUISetState(2) ;This is minimize EndSwitch WEnd I hope this is where you are looking for PowerSlide2UnlockiPhone look-a-like program you can use to lock your pc, you can't access your desktop again until the password is entered and the slider slided to the right. (really proud of it)-- After a time AutoIt and Windows, I switched to Mac. Don't expect me to answer anymore.
MiserableLife Posted December 22, 2009 Posted December 22, 2009 (edited) I've just did a test using GUIRegisterMsg ( $WM_ACTIVATE , "Func" ) and it did the trick(detecting if window is being avtivated by somthing)but I don't know what the wParam returns... msdnEDIT:here's my code:GUIRegisterMsg ( $WM_ACTIVATE , "__Minimize" ) Func __Minimize($hWndGUI, $MsgID, $WParam, $LParam);Minimize when window is inactive If $Wparam <> 1 Then GUISetState(@SW_MINIMIZE) EndFunc Edited December 22, 2009 by MiserableLife
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now