forums.silverfrost.com Forum Index forums.silverfrost.com
Welcome to the Silverfrost forums
 
 FAQFAQ   SearchSearch   MemberlistMemberlist   UsergroupsUsergroups   RegisterRegister 
 ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 

Cursor styles with %cu

 
Post new topic   Reply to topic    forums.silverfrost.com Forum Index -> ClearWin+
View previous topic :: View next topic  
Author Message
dpannhorst



Joined: 29 Aug 2005
Posts: 165
Location: Berlin, Germany

PostPosted: Mon Feb 15, 2010 8:55 pm    Post subject: Cursor styles with %cu Reply with quote

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
View user's profile Send private message Visit poster's website
PaulLaidler
Site Admin


Joined: 21 Feb 2005
Posts: 7916
Location: Salford, UK

PostPosted: Tue Feb 16, 2010 10:13 am    Post subject: Reply with quote

They are listed in ftn95.chm under Win32 Platform->ClearWin+->Format code reference->C->%cu
Back to top
View user's profile Send private message AIM Address
dpannhorst



Joined: 29 Aug 2005
Posts: 165
Location: Berlin, Germany

PostPosted: Tue Feb 16, 2010 12:37 pm    Post subject: Reply with quote

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
View user's profile Send private message Visit poster's website
JohnHorspool



Joined: 26 Sep 2005
Posts: 270
Location: Gloucestershire UK

PostPosted: Tue Feb 16, 2010 2:16 pm    Post subject: Reply with quote

Detlef,

Use a resource file to reference any of the windows cursors.

John
Back to top
View user's profile Send private message Visit poster's website
dpannhorst



Joined: 29 Aug 2005
Posts: 165
Location: Berlin, Germany

PostPosted: Tue Feb 16, 2010 2:26 pm    Post subject: Reply with quote

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
View user's profile Send private message Visit poster's website
Wilfried Linder



Joined: 14 Nov 2007
Posts: 314
Location: Düsseldorf, Germany

PostPosted: Tue Feb 16, 2010 2:36 pm    Post subject: Reply with quote

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
View user's profile Send private message
dpannhorst



Joined: 29 Aug 2005
Posts: 165
Location: Berlin, Germany

PostPosted: Tue Feb 16, 2010 3:38 pm    Post subject: Reply with quote

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
View user's profile Send private message Visit poster's website
JohnHorspool



Joined: 26 Sep 2005
Posts: 270
Location: Gloucestershire UK

PostPosted: Tue Feb 16, 2010 4:19 pm    Post subject: Reply with quote

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
View user's profile Send private message Visit poster's website
dpannhorst



Joined: 29 Aug 2005
Posts: 165
Location: Berlin, Germany

PostPosted: Wed Feb 17, 2010 4:35 pm    Post subject: Reply with quote

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
View user's profile Send private message Visit poster's website
Display posts from previous:   
Post new topic   Reply to topic    forums.silverfrost.com Forum Index -> ClearWin+ All times are GMT + 1 Hour
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum


Powered by phpBB © 2001, 2005 phpBB Group