ControlID

Everything else that doesn't fall into one of the other PB categories.
Edwin Knoppert
Addict
Addict
Posts: 1073
Joined: Fri Apr 25, 2003 11:13 pm
Location: Netherlands
Contact:

ControlID

Post 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)
GPI
PureBasic Expert
PureBasic Expert
Posts: 1394
Joined: Fri Apr 25, 2003 6:41 pm

Post by GPI »

Control-Gadget?

I don't know what you mean.

btw: the hWnd is the gadgetid()
Edwin Knoppert
Addict
Addict
Posts: 1073
Joined: Fri Apr 25, 2003 11:13 pm
Location: Netherlands
Contact:

Post by Edwin Knoppert »

Yes of the activeform, but if it's not active?
I don't want to set it active.
User avatar
Paul
PureBasic Expert
PureBasic Expert
Posts: 1252
Joined: Fri Apr 25, 2003 4:34 pm
Location: Canada
Contact:

Post 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()
Edwin Knoppert
Addict
Addict
Posts: 1073
Joined: Fri Apr 25, 2003 11:13 pm
Location: Netherlands
Contact:

Post 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.
User avatar
Danilo
Addict
Addict
Posts: 3037
Joined: Sat Apr 26, 2003 8:26 am
Location: Planet Earth

Post 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...
cya,
...Danilo
...:-=< http://codedan.net/work >=-:...
-= FaceBook.com/DaniloKrahn =-
Post Reply