Custom mouse pointers for gadgets?

Just starting out? Need help? Post your questions and find answers here.
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 PB.

When I use this to specify a custom mouse pointer for something...

Code: Select all

Gadget_hWnd=OptionGadget(1,x,y,w,h,"text")
SetClassLong_(Gadget_hWnd,#GCL_HCURSOR,LoadCursorFromFile_("C:\Icon.ico"))
...it works for the actual gadget in question, but also affects other gadgets.
For example, I've successfully used the above on an OptionGadget, but the same
icon appears on some other gadgets also, when it shouldn't...

Am I doing something wrong, or is this a bug?


PB - Registered PureBasic Coder

Edited by - PB on 12 July 2002 23:20:02
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 Danilo.

This happens when the other gadgets use the same class.
Its normal, not a bug.
You set the Cursor for the complete class, not only
for this (child-)window.

Make 3 PanelGadgets and use SetWinBackgrounColor()
for 1 Panel. The color is changed for all Panels.

cya,
...Danilo

(registered PureBasic user)
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 PB.

> You set the Cursor for the complete class, not only for this (child-)window.

Ah, I see. So does anyone know how to change the icon of a single gadget, and
not the entire class?


PB - Registered PureBasic Coder

Edited by - PB on 13 July 2002 11:59:23
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 fweil.

...,

I am also looking for a solution to change cursor for all the desktop at the opposite and could not find the right way.

I will continue to search but thnx for any help on both specific cursor linked to a given gadget and for a global cursor change.

...

Francois Weil
14, rue Douer
F64100 Bayonne
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 Danilo.

@PB:
> So does anyone know how to change the icon of a
> single gadget, and not the entire class?

I wrote this example for you:

Code: Select all

[url]http://forums.purebasic.com/english/viewtopic.php?t=1672[/url]
Hope this helps..

cya,
...Danilo

(registered PureBasic user)
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 fweil.

Many thanks ... it helps to understand and use it better !

Francois Weil
14, rue Douer
F64100 Bayonne
Post Reply