GetMapMode

2.x

  int GetMapMode(hdc)    
  HDC hdc; /* handle of device context */

The GetMapMode function retrieves the current mapping mode.

Parameters

hdc

Identifies the device context.

Return Value

The return value specifies the mapping mode if the function is successful.

Comments

For a complete list of mapping modes, see the description of the SetMapMode function.

Example

The following example uses the GetMapMode function to determine whether the current mapping mode is MM_TEXT:

if (GetMapMode(hdc) != MM_TEXT) {
    TextOut(hdc, 100, -200, "Mapping mode must be MM_TEXT", 28);
    return FALSE;
}

See Also

SetMapMode