Setting Graphical Cursor

HMG Samples and Enhancements

Moderator: Rathinagiri

User avatar
esgici
Posts: 4543
Joined: Wed Jul 30, 2008 9:17 pm
DBs Used: DBF
Location: iskenderun / Turkiye
Contact:

Setting Graphical Cursor

Post by esgici »

Hi All

An essay to add settings some built-in Win-API cursors to standard "load from file" cursor feature of HMG.

Low-level modules and methods borrowed from MiniGUI EE; thanks to authors Jacek Kubica and Grigory Filatov.

And special thanks to my brother Mustafa for remark and recall.

Sorry Mustafa, not control specific, again form-based setting :(
Screen shoot
Screen shoot
SetGCursor.jpg (13.44 KiB) Viewed 6011 times
SetGCursor.zip
Source and sample files
(2.99 KiB) Downloaded 316 times
Happy HMG'ing :D
Viva INTERNATIONAL HMG :D
User avatar
bpd2000
Posts: 1207
Joined: Sat Sep 10, 2011 4:07 am
Location: India

Re: Setting Graphical Cursor

Post by bpd2000 »

Nice
Thank you, Esgici
BPD
Convert Dream into Reality through HMG
User avatar
Richard_Schmidt
Posts: 21
Joined: Wed Jul 31, 2013 3:23 pm
Location: Germany

Re: Setting Graphical Cursor

Post by Richard_Schmidt »

Perfect !

Thanks a lot for your effort - this also answers my last question.

Best Regards
Richard
User avatar
esgici
Posts: 4543
Joined: Wed Jul 30, 2008 9:17 pm
DBs Used: DBF
Location: iskenderun / Turkiye
Contact:

Re: Setting Graphical Cursor

Post by esgici »

Hi Richard

Thanks to your interest and nice words :)
Richard_Schmidt wrote:... - this also answers my last question....
Yes, "starter" is you this time ;)

Viva HMG :D
Viva INTERNATIONAL HMG :D
User avatar
mustafa
Posts: 1158
Joined: Fri Mar 20, 2009 11:38 am
DBs Used: DBF
Location: Alicante - Spain
Contact:

Re: Setting Graphical Cursor

Post by mustafa »

Hola amigos y al hermano Esgici
As Salamu Alaikum
Felicidades por tus programas tan amenos y didacticos
Mi pregunta es ?
El cursor normal dentro de la ventana y cuando hay algun
boton por pulsar, entonces cuando pasas el cursor por
encima del Boton es cuando aparec el cambio de cursor
a finger.
Como ejemplo en esta página web el cursor está normal
pero cuando llega el cursor sobre a Post Reply , vemos que
sale el cursor en forma de "finger", esto seria interesante
si se pudiera conseguir cuando se quiere pulsar un Boton.
Los Compañeros de Minigui_Extended lo han conseguido
con esta sentencia

SetHandCursor( GetControlHandle("Button_01", "Form_1"), "Resource\Finger.cur" ) // <----Minigui Extended

Nombre Button --> Button_01
nombre Winndow -->Form_1
carpeta donde está "finger.cur"

saludos
Mustafa
*--------------------------------------------------------------------------------------*
Hello friends and brother Esgici
As Salamu Alaikum
Congratulations on your programs as entertaining and didactic
My question is?
The normal cursor inside the window and when there is some
button by pressing, then when you hover
Pin up is when A appears cursor changea finger.
As an example on this website is normally the cursor
  but when the cursor over to Post Reply, we see that
leaves the cursor in a "finger", that would be interesting
if you could get when you want to press a Button.
The Partners have succeeded Minigui_Extended
with this sentence

  SetHandCursor (GetControlHandle ("Button_01", "Form_1"), "Resource\Finger.cur") / / <---- MiniGUI Extended

Name Button -> Button_01
Window name -> Form_1
folder where "finger.cur"

regards
Mustafa
Attachments
screenshot2.jpg
screenshot2.jpg (21.33 KiB) Viewed 5891 times
screenshot.jpg
screenshot.jpg (56.97 KiB) Viewed 5939 times
Last edited by mustafa on Wed Oct 09, 2013 9:09 am, edited 1 time in total.
User avatar
mustafa
Posts: 1158
Joined: Fri Mar 20, 2009 11:38 am
DBs Used: DBF
Location: Alicante - Spain
Contact:

Re: Setting Graphical Cursor

Post by mustafa »

Hola
sobre el tema anterior sobre "Finger.cur" al pulsar un "Button",
les mando un antiguo ejemplo con MiniguiExtended
que documenta dicho ejemplo.
Ya se hablo en su dia de este tema con el Maestro Roberto

http://hmgforum.com/viewtopic.php?f=5&t=1182" onclick="window.open(this.href);return false;
http://hmgforum.com/viewtopic.php?f=9&t=1170&start=10" onclick="window.open(this.href);return false;

saludos
Mustafa
:mrgreen:
*-----------------------------------------------------------*
Hello
On the previous topic on "Finger.cur" when you press a "Button",
I send an old example with MiniguiExtended
documenting this example.
Already in his day talking about this with the Master Roberto

http://hmgforum.com/viewtopic.php?f=5&t=1182" onclick="window.open(this.href);return false;
http://hmgforum.com/viewtopic.php?f=9&t=1170&start=10" onclick="window.open(this.href);return false;

regards
Mustafa
:mrgreen:
Attachments
Player_Extended.zip
(1.95 MiB) Downloaded 297 times
User avatar
esgici
Posts: 4543
Joined: Wed Jul 30, 2008 9:17 pm
DBs Used: DBF
Location: iskenderun / Turkiye
Contact:

Re: Setting Graphical Cursor

Post by esgici »

mustafa wrote: ...
The normal cursor inside the window and when there is some
button by pressing, then when you hover
Pin up is when A appears cursor changea finger.
...
Hola Mustafa

Aleykum salam :)

Thanks to your nice words :)

I know, in addition to "form level", we need also "control specific" mouse shape.

The keyword is : hover !

MiniGUI EE has the OnMouseHover event for this purpose :
OnMouseHover

--------------------------------------------------------------------------------

Action to be performed when the mouse pointer hovers over the control

SYNTAX

ON MOUSEHOVER <aOnMouseHoverProcedure> | <abBlock>
Sadly, in HMG official we don't have this nice feature :(

I'm sure our genius Dr. Soto would add it, and I hope he will do this :arrow:

Happy HMG'ing :D
Viva INTERNATIONAL HMG :D
User avatar
esgici
Posts: 4543
Joined: Wed Jul 30, 2008 9:17 pm
DBs Used: DBF
Location: iskenderun / Turkiye
Contact:

Re: Setting Graphical Cursor

Post by esgici »

Hi All

Some little rectifications, cosmetics :arrow:

Happy HMG'ing :D
Attachments
SetGCursor (2).zip
Set Grap Cursor - 2
(3.07 KiB) Downloaded 261 times
Viva INTERNATIONAL HMG :D
User avatar
mustafa
Posts: 1158
Joined: Fri Mar 20, 2009 11:38 am
DBs Used: DBF
Location: Alicante - Spain
Contact:

Re: Setting Graphical Cursor

Post by mustafa »

Hola
Sobre el tema de "Finger.cur" solo sobre los Buttons
lo ha solucionado el amigo Dr.Claudio

http://hmgforum.com/viewtopic.php?f=5&t ... 795#p29795" onclick="window.open(this.href);return false;" onclick="window.open(this.href);return false;

aqui dejo un ejemplo, sobre el tema Buttons basado en el
ejemplo Dr.Claudio


Ímportante
incluir en compilación fichero "finger.cur"

Saludos
Mustafa
*----------------------------------------------------------------*

Hello
On the subject of "Finger.cur" only on Buttons
Fixed it Dr.Claudio friend

http://hmgforum.com/viewtopic.php?f=5&t ... 795#p29795" onclick="window.open(this.href);return false;" onclick="window.open(this.href);return false;

here is a example on the theme based Buttons
Dr. Claudio example


important
compilation include file "finger.cur"

regards
Mustafa

#include "hmg.ch"

Function Main

DEFINE WINDOW Win_1 ;
AT 0,0 ;
WIDTH 400 ;
HEIGHT 400 ;
TITLE 'Hello World!' ;
MAIN

@ 50, 50 BUTTON Button_1 CAPTION "Hello-1" ACTION MsgInfo ()

@ 50, 230 BUTTON Button_2 CAPTION "Hello-2" ACTION MsgInfo ()

END WINDOW

* Win_1.Cursor := "finger.cur"

SETWINDOWCURSOR (Win_1.Button_1.Handle, "finger.cur")

CENTER WINDOW Win_1
ACTIVATE WINDOW Win_1

Return
User avatar
bpd2000
Posts: 1207
Joined: Sat Sep 10, 2011 4:07 am
Location: India

Re: Setting Graphical Cursor

Post by bpd2000 »

Same cursor apply to all the buttons even after defined as

Code: Select all

SETWINDOWCURSOR (Win_1.Button_1.Handle, "finger.cur")
BPD
Convert Dream into Reality through HMG
Post Reply