Microsoft KB Archive/196277

= BUG: Windows CE GDI Emulation Bugs =

Article ID: 196277

Article Last Modified on 10/20/2003

-

APPLIES TO


 * Microsoft Windows CE 2.0 for the Handheld PC
 * Microsoft Windows CE 1.0

-



This article was previously published under Q196277



SYMPTOMS
When run under the Visual C++ Windows CE emulator, some of the GDI APIs behave differently than they do when running on an actual Windows CE device. The following list describes some of these inconsistencies:  The following Windows CE GDI functions, when passed an invalid handle, set the error state returned by GetLastError to ERROR_SHARING_VIOLATION rather than the proper error state of ERROR_INVALID_HANDLE:

SetBkMode

GetBkMode

SetBkColor

GetBkColor

CreateBitMap

 When you attempt to use CreateBitmap to create bitmaps with 2, 4 or 8 bits per pixel, a monochrome bitmap is returned. When you run in emulation, there is no support for 2 bits per pixel bitmaps. The coordinates from the following functions are treated differently in emulation than they are when running on a Windows CE device:

ClientToScreen;

ScreenToClient;

MoveWindow;

 CreateDIBSection cannot be used to create 2 bits per pixel bitmaps when running in emulation.



RESOLUTION
These bugs only affect Windows CE applications that are running under the emulator. If you need to test these functions in your application, you should test them on an actual Windows CE device.



STATUS
Microsoft has confirmed these to be bugs in the emulator for Windows CE.

<div class="references_section">