Faking it

Windows specific forum
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 tinman.

Hi,

Is it possible to create gadgets using the Windows API, stick them into a gadget list and fool PB into returning IDs and things through the normal commands (WaitWindowEvent, EventType, EventGadgetID, etc).

For example, that scrollable virtual area that was posted to the tips forum got me thinking and I noticed PB doesn't have any scrollbar gadgets. Until they appear, it still might be nice to use them but still through the normal PB commands.

Cheers.


--
It's not minimalist - I'm increasing efficiency by reducing input effort.
(Win98first ed. + SP1, PB3.30)
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 freak.

No, i think you can't do that. What Events should the Scrollbar produce, since PB doesn't know it?
And why do you need to use WaitWindowEvent? Why not use a Callback?

Personally, i think, fooling PB into doing something is a bad solution, since it can have
very bad effects on program stability. (You don't know, how PB works internally)

Timo

BTW, if you need more stuff for the ScrollGadget, just tell me :)
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 tinman.
Originally posted by freak

No, i think you can't do that. What Events should the Scrollbar produce, since PB doesn't know it?
Well, if you create your own constant #PB_Event_Scrollbar or whatever, so that it is similar to the trackbar (but different of course), then all you need to do in future would be to delete your definition of it.
And why do you need to use WaitWindowEvent? Why not use a Callback?
Well I was going to do it like this in the hope that PureBasic would one day have native commands for scrollbar gadgets. I know trying to guess what it does internally would be a bad thing, but I'm lazy and it would mean less changes to my code in the future :wink:


--
It's not minimalist - I'm increasing efficiency by reducing input effort.
(Win98first ed. + SP1, PB3.40)
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 add scrollbar one day :)..

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 Jose.

Fred while you are adding Scrollbar, could you add ability to
allow scrollable window area or frame, as per examples.
Please:)
Jose

Registered PureBasic User
Post Reply