|This is retired content. This content is outdated and is no longer being maintained. It is provided as a courtesy for individuals who are still using these technologies. This content may contain URLs that were valid when originally published, but now link to sites or pages that no longer exist.|
Once you have created a device context, call GetDeviceCapsto retrieve device data. GetDeviceCapsprovides 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 CE supports the background graphics modeand 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 GetBkModefunction and set it with the SetBkModefunction. 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 SetROP2function. The foreground mix mode controls how the brush or pen colors and the image colors combine. SetROP2returns 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 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.
Last updated on Tuesday, May 18, 2004