Adding gadgets to other windows

Just starting out? Need help? Post your questions and find answers here.
twobits
User
User
Posts: 11
Joined: Thu May 22, 2003 6:53 pm

Adding gadgets to other windows

Post by twobits »

Hi everyone,
Is it possible to add a gadget to another window? i.e i get window handle of another window using findwindow, is it now possible for me to add controls to that window which can be controlled from within my pb program?
Thanx
freak
PureBasic Team
PureBasic Team
Posts: 5940
Joined: Fri Apr 25, 2003 5:21 pm
Location: Germany

Post by freak »

It is possible to add Gadgets to a window that was not created with PB's
window functions. For that, you just use CreateGadgetList(WindowHandle).
But it is not possible to add a Gadget to a window of another application.
That won't work.

Timo
quidquid Latine dictum sit altum videtur
twobits
User
User
Posts: 11
Joined: Thu May 22, 2003 6:53 pm

Post by twobits »

What do you mean by a window not created in pb? isnt that another apps window?
Could i create a panel control in vb, and then draw a control on it from PB by getting the hWnd?

I know something like that is possible - as the little monitor in screen saver settings works something like it.
twobits
User
User
Posts: 11
Joined: Thu May 22, 2003 6:53 pm

Post by twobits »

Ok - ive managed to draw controls on a panel control running in a vb app - but is it possible to recieve any events from these controls? or do the events get sent to the vb app instead?
Doobrey
Enthusiast
Enthusiast
Posts: 218
Joined: Sat Apr 26, 2003 4:47 am
Location: Dullsville..population: me
Contact:

Post by Doobrey »

twobits wrote:What do you mean by a window not created in pb? isnt that another apps window?
He meant windows that are created using the API instead of PB`s built in window commands.

As for getting that gadgets events, I think it`s possible (although I haven`t tried it), have you tried setting a callback procedure for the gadget?
twobits
User
User
Posts: 11
Joined: Thu May 22, 2003 6:53 pm

Post by twobits »

So is it possible to create a panel gadget and get the window handle of the panel gadget, then set that as the current window and set up a call back function associated with the panel?
Post Reply