Once you have created a device context, call GetDeviceCaps to retrieve device data. GetDeviceCaps provides data about a device's color format and raster capabilities, as well as its shape, text, and line drawing capabilities.
Before modifying a device context, save the current device context settings. Call the SaveDC function to record the condition of your device context's graphics objects and graphic modes to a special GDI stack. Call this function to save your application's original state. Call RestoreDC to return the device context to this original state.
To modify the appearance of a device context, you can use graphics mode functions. Graphics modes control general display characteristics, such as how colors are mixed. Windows CE supports the background graphics mode and drawing mode. A background graphics mode defines how background colors are mixed with window or screen colors for text and bitmap operations. A drawing mode defines how foreground colors are mixed with window or screen colors for pen, brush, bitmap, and text operations.
Windows CE initializes a device context with default graphics modes. You can get the current background mix mode with the GetBkMode function and set it with the SetBkMode function. In Windows CE, the background mix mode affects the appearance of text and certain pen types. You can set the foreground mix mode with the SetROP2 function. The foreground mix mode controls how the brush or pen colors and the image colors combine. SetROP2 returns the mix mode for the last foreground mix mode.
You can change the viewpoint origin from its default starting point in the upper-left corner of the screen with the SetViewportOrgEx function.
Note Windows CE does not support multiple mapping modes. The only mapping mode is MM_TEXT, which maps logical coordinates to the physical coordinates in a 1:1 ratio from left to right and top to bottom.