View previous topic :: View next topic |
Author |
Message |
dpannhorst
Joined: 29 Aug 2005 Posts: 165 Location: Berlin, Germany
|
Posted: Mon Feb 15, 2010 8:55 pm Post subject: Cursor styles with %cu |
|
|
Hi,
what are the standard cursor_names for %cu to get a:
- Hand (OCR_HAND)
- Arrow and questionmark (OCR_HELP)
- Four-pointed arrow pointing north, south, east, and west (OCR_SIZEALL)
Detlef |
|
Back to top |
|
|
PaulLaidler Site Admin
Joined: 21 Feb 2005 Posts: 7916 Location: Salford, UK
|
Posted: Tue Feb 16, 2010 10:13 am Post subject: |
|
|
They are listed in ftn95.chm under Win32 Platform->ClearWin+->Format code reference->C->%cu |
|
Back to top |
|
|
dpannhorst
Joined: 29 Aug 2005 Posts: 165 Location: Berlin, Germany
|
Posted: Tue Feb 16, 2010 12:37 pm Post subject: |
|
|
Hi Paul,
none of these newer cursor styles seem to be available in ClearWin+.
The cursor styles, I have mentioned, are system cursors which can be set with the Windows function SetSystemCursor (see MSDN).
It would be nice if they would be available for %cu.
Detlef |
|
Back to top |
|
|
JohnHorspool
Joined: 26 Sep 2005 Posts: 270 Location: Gloucestershire UK
|
Posted: Tue Feb 16, 2010 2:16 pm Post subject: |
|
|
Detlef,
Use a resource file to reference any of the windows cursors.
John |
|
Back to top |
|
|
dpannhorst
Joined: 29 Aug 2005 Posts: 165 Location: Berlin, Germany
|
Posted: Tue Feb 16, 2010 2:26 pm Post subject: |
|
|
Hi John,
how can I reference to a standard cursor (i.e. OCR_SIZEALL) in the resource file to use it with %cu?.
Detlef |
|
Back to top |
|
|
Wilfried Linder
Joined: 14 Nov 2007 Posts: 314 Location: Düsseldorf, Germany
|
Posted: Tue Feb 16, 2010 2:36 pm Post subject: |
|
|
Hi Detlev,
you can use every cursor from the operating system. For instance, on my PC with Windows XP they are located in c:\windows\cursors. An example for a hand cursor is harrow.cur. Now:
In your ressource file (*.rc) define:
Code: | Hand_1 CURSOR c:\windows\cursors\harrow.cur |
In your ftn code:
Code: | integer*4 icursor
j = WINIO@('%mn[&View[whatever_1]]&','SET',ICURSOR,1)
j = WINIO@('%mn[[whatever_2]]&','SET',ICURSOR,2)
j = WINIO@('%mn[[whatever_3]]&','SET',ICURSOR,3)
j = WINIO@('%mn[[whatever_4]]&','SET',ICURSOR,4)
j = winio@('%4cu[cross_1][cross_2][hand_1][hand_2]'
* '%`^gr[user_surface,full_mouse_input,rgb_colours]&',
* ICURSOR,stg_x,stg_y,ptr,1L,cb_func) |
Regards,
Wilfried |
|
Back to top |
|
|
dpannhorst
Joined: 29 Aug 2005 Posts: 165 Location: Berlin, Germany
|
Posted: Tue Feb 16, 2010 3:38 pm Post subject: |
|
|
Hi Wilfried,
on my PC with Windows 7 harrow.cur doesn't exist in this directory.
If I would use an existing cursor of my system in the resource file, would it lead to problems, if I install my software on other PCs where this cursor doesn't exist?
Detlef |
|
Back to top |
|
|
JohnHorspool
Joined: 26 Sep 2005 Posts: 270 Location: Gloucestershire UK
|
Posted: Tue Feb 16, 2010 4:19 pm Post subject: |
|
|
Detlef,
Search the windows folders for files with extension .cur to see what is available (I copy the ones I want into a program development folder)
The resource file is compiled with src and linked into the exe, so your program will work on any windows PC.
regards,
John |
|
Back to top |
|
|
dpannhorst
Joined: 29 Aug 2005 Posts: 165 Location: Berlin, Germany
|
Posted: Wed Feb 17, 2010 4:35 pm Post subject: |
|
|
Hi Paul,
now I have found the reason and the solution for my problem:
The parameter definitions for the new standard cursor are missing in CLEARWIN.INS.
The following definitions should be added to CLEARWIN.INS or to the user program:
INTEGER*4 CURSOR_APPSTARTING, &
CURSOR_HAND, &
CURSOR_NO, &
CURSOR_SIZEALL
PARAMETER (CURSOR_APPSTARTING=32650)
PARAMETER (CURSOR_HAND=32649)
PARAMETER (CURSOR_NO=32648)
PARAMETER (CURSOR_SIZEALL=32646)
Then these new cursors can be used bei %`cu:
RC=WINIO@ (%`3cu&',CURSOR_ARROW, &
CURSOR_HAND, &
CURSOR_SIZEALL, &
CURSORX)
Thanks to everybody who gave hints to this problem.
Detlef |
|
Back to top |
|
|
|