GLG Toolkit, C / C++ API Library  Version 4.6
Windows-Specific Functions

This group contains functions that are available only on Windows. More...

Detailed Description

This group contains functions that are available only on Windows.

Functions

void GlgLoadExeIcon (GlgObject viewport, GlgLong icon_id)
 Windows only: Loads small and big icons from the executable and associates them with the top level window of a viewport. More...
 
GlgBoolean GlgOnDrawMetafile (GlgObject viewport, HDC print_dc)
 Windows only: Provides MFC metafile output support. More...
 
GlgBoolean GlgOnPrint (GlgObject viewport, HDC print_dc)
 Windows only: Provides MFC printing support. More...
 
GlgBoolean GlgSetCursor (GlgObject viewport, char *resource_name, GlgLong cursor)
 Windows only: Sets a custom cursor for a drawing or one of its child viewports. More...
 

Function Documentation

◆ GlgLoadExeIcon()

void GlgLoadExeIcon ( GlgObject  viewport,
GlgLong  icon_id 
)

Windows only: Loads small and big icons from the executable and associates them with the top level window of a viewport.

The function should be invoked after the drawing hierarchy has been set up.

Parameters
viewportThe drawing viewport.
icon_idAn icon ID in the resource file.

◆ GlgOnDrawMetafile()

GlgBoolean GlgOnDrawMetafile ( GlgObject  viewport,
HDC  print_dc 
)

Windows only: Provides MFC metafile output support.

Is used by the MFC container's OnDrawMetafile method to produce metafile for the GLG child window.

Parameters
viewportSpecifies a viewport. If viewport is a light viewport, the output will be generated for its parent viewport.
print_dcSpecifies the printing device context for metafile output.
Returns
True if printing succeeds, otherwise returns False.

◆ GlgOnPrint()

GlgBoolean GlgOnPrint ( GlgObject  viewport,
HDC  print_dc 
)

Windows only: Provides MFC printing support.

Is used by the MFC container's OnPrint method to print GLG child window.

Parameters
viewportSpecifies a viewport. If viewport is a light viewport, the output will be generated for its parent viewport.
print_dcSpecifies the printing device context.
Returns
True if printing succeeds, otherwise returns False.

◆ GlgSetCursor()

GlgBoolean GlgSetCursor ( GlgObject  viewport,
char *  resource_name,
GlgLong  cursor 
)

Windows only: Sets a custom cursor for a drawing or one of its child viewports.

Parameters
viewportA viewport object or a viewport's parent.
resource_nameThe resource path of a child viewport to set the cursor of, or NULL to set the cursor of the viewport specified by the viewport parameter. The resource path is relative to the object specified by the viewport parameter.
cursorOne of the predefined Windows cursor types.
Returns
Success or failure status.

The custom cursor will be used when the mouse moves inside the viewport the custom cursor is assigned to.

While GlgSetCursorType uses only predefined cross-platform subset of cursor types, GlgSetCursor can use all cursor types defined on Windows.