Resource Bitmaps Are Read-Only in Windows CE

Last reviewed: May 13, 1997
Article ID: Q168258
The information in this article applies to:
  • Microsoft Windows CE version 1.0

SYMPTOMS

Resource bitmaps, usually loaded with a call to LoadBitmap(), are read- only in Windows CE. This means that if such a bitmap is selected into a memory DC, subsequent drawing functions on that DC fail.

RESOLUTION

To work around this issue, create a second bitmap with a call to CreateCompatibleBitmap() and then BitBlt() the contents of the resource bitmap onto the second bitmap. The second bitmap should be suitable for use with the drawing functions.

STATUS

This behavior is by design.


Additional query words: 1.00 resource LoadImage DIBSection gdibmp
Keywords : handheld kbdisplay wince
Version : 1.0
Platform : WINDOWS


THE INFORMATION PROVIDED IN THE MICROSOFT KNOWLEDGE BASE IS PROVIDED "AS IS" WITHOUT WARRANTY OF ANY KIND. MICROSOFT DISCLAIMS ALL WARRANTIES, EITHER EXPRESS OR IMPLIED, INCLUDING THE WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. IN NO EVENT SHALL MICROSOFT CORPORATION OR ITS SUPPLIERS BE LIABLE FOR ANY DAMAGES WHATSOEVER INCLUDING DIRECT, INDIRECT, INCIDENTAL, CONSEQUENTIAL, LOSS OF BUSINESS PROFITS OR SPECIAL DAMAGES, EVEN IF MICROSOFT CORPORATION OR ITS SUPPLIERS HAVE BEEN ADVISED OF THE POSSIBILITY OF SUCH DAMAGES. SOME STATES DO NOT ALLOW THE EXCLUSION OR LIMITATION OF LIABILITY FOR CONSEQUENTIAL OR INCIDENTAL DAMAGES SO THE FOREGOING LIMITATION MAY NOT APPLY.

Last reviewed: May 13, 1997
© 1998 Microsoft Corporation. All rights reserved. Terms of Use.