Jump to content

No _guictrllabel_create?


Cyri
 Share

Recommended Posts

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 by Cyri
Link to comment
Share on other sites

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?

Link to comment
Share on other sites

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

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 by AdmiralAlkex
Link to comment
Share on other sites

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

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

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 account

Sign in

Already have an account? Sign in here.

Sign In Now
 Share

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...