[<<Previous Entry] [^^Up^^] [Next Entry>>] [Menu] [About The Guide]
  LoadCursor( hInst, cnCursor )-> <hCursor>
------------------------------------------------------------------------------


 PARAMETER:

  <hInst>       Identifies the module that contains the cursor to be loaded

  <cnCursor>    Is the name or ordinal number that identifies the cursor to
                be loaded.


 RETURNS:

  <hCursor> Is the handle of the loaded cursor, or zero if the resource 
  could not be loaded


 DESCRIPTION:

  LoadCursor() loads the specified cursor resource from the executable file 
  associated with the given application instance. 
  The function loads the cursor resource only if it has not been loaded;
  otherwise, it retrieves a handle of the existing resource.
  An application can use LoadCursor to access the predefined cursors used by 
  Windows. To do this, the application must set <hinst> to zero and <cnCursor>
  to one the following values: 

   IDC_ARROW    Standard arrow cursor. 
   IDC_CROSS    Crosshair cursor. 
   IDC_IBEAM    Text I-beam cursor. 
   IDC_ICON     Empty icon. 
   IDC_SIZE     A square with a smaller square inside its lower-right corner.
   IDC_SIZENESW Double-pointed cursor with arrows pointing NE and SW 
   IDC_SIZENS   Double-pointed cursor with arrows pointing north and south. 
   IDC_SIZENWSE Double-pointed cursor with arrows pointing NW and SE 
   IDC_SIZEWE   Double-pointed cursor with arrows pointing west and east. 
   IDC_UPARROW  Vertical arrow cursor. 
   IDC_WAIT     Hourglass cursor. 

  Most of this cursors can also be created using FiveWins Cursor.. functions,
  and all the IDC_SIZE.. cursors can be created using the TCURSOR class.

  It is not necessary to destroy these system cursors, but an application
  should use DestroyCursor function to destroy any private cursors it loads. 


 EXAMPLE:


    +--------------------------------------------------------------+
    |  /* Create an empty cursor object */                         |
    |   oDlg:oCursor := TCURSOR():New()                            |
    |                                                              |
    |  /* Create hourglas cursor, and attach it to the object */   |
    |   oDlg:oCursor:hCursor := LoadCursor(0 ,IDC_WAIT)            |
    |                                                              |
    |  /* Define it as the controls cursor */                      |
    |   AEVAL( oDlg:aControls, {|o|o:oCursor := oDlg:oCursor })    |
    |                                                              |
    |  /* Finally, activate the cursor */                          |
    |   SetCursor( oDlg:oCursor:hCursor )                          |
    |                                                              |
    +--------------------------------------------------------------+


 SOURCE:

  SOURCE\WINAPI\CURSORS.C



See Also: DestroyCursor SetCursor CursorWait Cursor TCURSOR
This page created by ng2html v1.05, the Norton guide to HTML conversion utility. Written by Dave Pearson