Modifying a Device Context (Windows Embedded CE 6.0)
1/6/2010
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.
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 Embedded 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 Embedded 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 Embedded 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 SetViewportOrgExfunction.
Note
Windows Embedded 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.