Page 1 of 1
ControlID
Posted: Sun Apr 27, 2003 7:39 pm
by Edwin Knoppert
I'm currently *setting* the controlid for a controlgadget.
Is this safe with PB?
I need to obtain the control handle hWnd from any location.
UseWindow() is not really an option.
I'm using GetDlgItem_(...)
(PS, don't need an alternative)
Posted: Sun Apr 27, 2003 8:15 pm
by GPI
Control-Gadget?
I don't know what you mean.
btw: the hWnd is the gadgetid()
Posted: Sun Apr 27, 2003 9:46 pm
by Edwin Knoppert
Yes of the activeform, but if it's not active?
I don't want to set it active.
Posted: Sun Apr 27, 2003 10:59 pm
by Paul
Edwin, better sit down and read through the docs if you want a better understanding of all the various PB commands
GadgetID()
-------------
Syntax:
GadgetID = GadgetID(#Gadget)
Description:
Returns the unique GadgetID of the #Gadget.
GadgetID() returns the handle of the current active gadget only if you do not specify the gadget you want the handle for.
Same applies for WIndowID()
Posted: Mon Apr 28, 2003 7:21 am
by Edwin Knoppert
Help = open
What i'm asking is can i set the Windows control id using SetWindowLong( GWL_ID ) API?
Currently all id's are 0, which is fine, i use these entries for API usage.
Can be that PB will use them for it's own benefit ast some point.
Posted: Mon Apr 28, 2003 9:29 am
by Danilo
> What i'm asking is can i set the Windows control id using SetWindowLong( GWL_ID ) API?
> Currently all id's are 0, which is fine, i use these entries for API usage.
>
> Can be that PB will use them for it's own benefit ast some point.
We change internal things without saying so, so its not
safe to assume you can always use anything.
Such internal things can change at any time...