Cyri Posted February 8, 2009 Share Posted February 8, 2009 (edited) I think I'm missing the boat here, but how do you target a label to a specific window handle? I see comparable commands like _GUICtrlButton_Create($hWnd, $sText, $iX, $iY, $iWidth, $iHeight[, $iStyle = -1[, $iExStyle = -1]]) But I'm not seeing one like that for a label. I know you can create labels right after the GUICreate and it will bind itself to that parent window, but I need the ability to actually target the window handle. Anyone know if that can be done? Probably something stupid I've overlooked. Edited February 8, 2009 by Cyri Link to comment Share on other sites More sharing options...
AdmiralAlkex Posted February 9, 2009 Share Posted February 9, 2009 Why would it matter if you create the label after the GUICreate or with a window handle? Do you want to create the label on/in your scripts GUI or on an external application? .Some of my scripts: ShiftER, Codec-Control, Resolution switcher for HTC ShiftSome of my UDFs: SDL UDF, SetDefaultDllDirectories, Converting GDI+ Bitmap/Image to SDL Surface Link to comment Share on other sites More sharing options...
Cyri Posted February 9, 2009 Author Share Posted February 9, 2009 Why would it matter if you create the label after the GUICreate or with a window handle? Do you want to create the label on/in your scripts GUI or on an external application?Yes, it's on/in my scripts GUI. However, I'm doing multiple GUICreate (not child) commands in my script. Is that not advisable? I create a seperate GUI for each screen and then show/hide them as the user flows through. Link to comment Share on other sites More sharing options...
AdmiralAlkex Posted February 9, 2009 Share Posted February 9, 2009 (edited) I haven't worked much with multiple gui's, so I can't say if they are advisable or not, but you can use GUISwitch() to switch the "active" gui and then use the normal funcs.Many of the GUI specific functions work on the "current" window - this is usually the last window created with GUICreate. This function allows you to make another window "current". That's does not mean that the referenced window will become active. You have to use WinActivate. Edited February 9, 2009 by AdmiralAlkex .Some of my scripts: ShiftER, Codec-Control, Resolution switcher for HTC ShiftSome of my UDFs: SDL UDF, SetDefaultDllDirectories, Converting GDI+ Bitmap/Image to SDL Surface Link to comment Share on other sites More sharing options...
Cyri Posted February 9, 2009 Author Share Posted February 9, 2009 I haven't worked much with multiple gui's, so I can't say if they are advisable or not, but you can use GUISwitch() to switch the "active" gui and then use the normal funcs.Sweet that looks like what I want. Link to comment Share on other sites More sharing options...
Cyri Posted February 9, 2009 Author Share Posted February 9, 2009 I haven't worked much with multiple gui's, so I can't say if they are advisable or not, but you can use GUISwitch() to switch the "active" gui and then use the normal funcs.That did the trick. I can't believe I hadn't run into that command before. Thank you! Link to comment Share on other sites More sharing options...
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