MGL_loadCursor

Load a cursor file from disk.

Declaration

cursor_t * MGLAPI MGL_loadCursor(
    const char *cursorName)

Prototype In

mgraph.h

Parameters

cursorName

Name of cursor file to load

 

Return Value

Pointer to loaded cursor file, NULL on error.

Description

Locates the specified cursor file and loads it into memory.  MGL can load any Windows 3.x style cursor files. Consult the Windows SDK documentation for the format of Windows cursor files.

When MGL is searching for cursor files it will first attempt to find the files just by using the filename itself. Hence if you wish to look for a specific cursor file, you should pass the full pathname to the file that you are interested in. If the filename is a simple relative filename (i.e. “MYCURS.CUR”), MGL will then search in the CURSORS directory relative to the path specified in mglpath variable that was passed to MGL_init. As a final resort MGL will also look for the files in the CURSORS directory relative to the MGL_ROOT environment variable.

If the cursor file was not found, or an error occurred while reading the cursor file, this function will return NULL. You can check the MGL_result error code to determine the cause.

See Also

MGL_unloadCursor, MGL_availableCursor, MS_setCursor, MGL_loadCursorExt

Copyright © 2002 SciTech Software, Inc. Visit our web site at http://www.scitechsoft.com