PB3.50 Win32 - Handles instead of #ObjectNumers

Everything else that doesn't fall into one of the other PB categories.
BackupUser
PureBasic Guru
PureBasic Guru
Posts: 16777133
Joined: Tue Apr 22, 2003 7:42 pm

Post by BackupUser »

Restored from previous forum. Originally posted by Kale.

say for example i do this:

MyStringGadget = StringGadget(#PB_Any, 0, 0, 30, 11, "Test")

then later in my code i wanted to get the string entered in this gadget would i use this?:

String$ = GetGadgetText(MyStringGadget)

is that how you are planning it?

--Kale

New to PureBasic and falling in Love! :)
BackupUser
PureBasic Guru
PureBasic Guru
Posts: 16777133
Joined: Tue Apr 22, 2003 7:42 pm

Post by BackupUser »

Restored from previous forum. Originally posted by Franco.
Originally posted by Kale

say for example i do this:

MyStringGadget = StringGadget(#PB_Any, 0, 0, 30, 11, "Test")

then later in my code i wanted to get the string entered in this gadget would i use this?:

String$ = GetGadgetText(MyStringGadget)

is that how you are planning it?

--Kale

New to PureBasic and falling in Love! :)
Yes I suppose, because the Result (MyStringGadget) of:

Code: Select all

MyStringGadget = StringGadget(#PB_Any, 0, 0, 30, 11, "Test")
is not the WinOS Object Handle it should be the PureBasic internal Gadget number.
You can retrieve every handle with:

Code: Select all

GadgetID(MyStringGadget) ; GadgetID is already there...
The only thing is, that old code that uses:

Code: Select all

MyStringGadgetHANDLE = StringGadget(1, 0, 0, 30, 11, "Test")
MyWinAPIcommand_(MyStringGadgetHANDLE)
doesn't work anymore. You have to add:

Code: Select all

MyWinAPIcommand_(GadgetID(MyStringGadgetHANDLE));MyStringGadgetHANDLE is not the WinOS handle anymore
But it's not a big deal, isn't it?...

Have a nice day...

Franco
BackupUser
PureBasic Guru
PureBasic Guru
Posts: 16777133
Joined: Tue Apr 22, 2003 7:42 pm

Post by BackupUser »

Restored from previous forum. Originally posted by Franco.

BTW Fred:
Is there a possibility to get a 3.5a version of PureBasic for download, without the RETURN checking :)
Otherwise I can't use my own EventHandler anymore, and most of my code uses it you know...
(I wanted to release a new version of PureGUI after version 3.5 is released, but I can't...)

Have a nice day...

Franco
BackupUser
PureBasic Guru
PureBasic Guru
Posts: 16777133
Joined: Tue Apr 22, 2003 7:42 pm

Post by BackupUser »

Restored from previous forum. Originally posted by fred.

I will do an alternate update, with some fix this week end, as some important problems has been pointed out.

Fred - AlphaSND
BackupUser
PureBasic Guru
PureBasic Guru
Posts: 16777133
Joined: Tue Apr 22, 2003 7:42 pm

Post by BackupUser »

Restored from previous forum. Originally posted by Franco.
Originally posted by fred

I will do an alternate update, with some fix this week end, as some important problems has been pointed out.

Fred - AlphaSND
:) But don't forget to eat, sleep etc.

Have a nice day...

Franco
Post Reply