You receive error messages when you use the 16-bit Resource Editor or the 32-bit Resource Editor in Visual C++ (132705)
The information in this article applies to:
- The Resource Editor
- Microsoft Visual C++ 1.5
- Microsoft Visual C++ 1.51
- Microsoft Visual C++ 1.52
- Microsoft Visual C++ 2.0
- Microsoft Visual C++ 2.1
- Microsoft Visual C++ 4.0
- Microsoft Visual C++, 32-bit Enterprise Edition 5.0
- Microsoft Visual C++, 32-bit Enterprise Edition 6.0
- Microsoft Visual C++, 32-bit Professional Edition 5.0
- Microsoft Visual C++, 32-bit Professional Edition 6.0
- Microsoft Visual C++, 32-bit Learning Edition 6.0
This article was previously published under Q132705 SYMPTOMS
The 16-bit Resource Editor (AppStudio) generates the following message
while attempting to edit a bitmap that contains more than 16 colors:
Cannot open bitmap for editing.
Unsupported color resolution.
The 32-bit Resource Editor with Visual C++, version 4.0, (for the 32-bit
version Resource Editor) generates the following message while attempting
to edit a bitmap that contains more than 256 colors:
Only 2-, 16-, and 256-color bitmaps are supported.
The 32-bit Resource Editor with Visual C++, versions 5.0 and 6.0, generates
the following message while attempting to import or edit a bitmap with more
than 256 colors:
The bitmap has been imported correctly, however because it contains
more than 256 colors it cannot be loaded in the bitmap editor.
CAUSE
The Resource Editor for the 16-bit versions cannot display or edit bitmaps
that contain more than 16 colors, and the Resource Editor for the 32-bit
versions cannot display or edit bitmaps that contain more than 256 colors.
RESOLUTION
Choose another graphics editor such as Pbrush.exe (Paintbrush) in the
Accessories group on Windows and Windows NT, or Mspaint.exe (Paint) from the Accessories folder on Windows 95 to create or edit the offending bitmaps. Then import them into the resource script. Note Once you import the picture into the resource file, you will not be able to edit it or display it. However, you can still use the bitmap resource in your application. For example:
void CMyView::OnDraw(CDC* pDC)
{
CMyDoc* pDoc = GetDocument();
ASSERT_VALID(pDoc);
// TODO: add draw code for native data here.
ASSERT_VALID(pDoc);
CBitmap bitmap;
CDC dcMemory;
bitmap.LoadBitmap(IDB_BITMAP1);
dcMemory.CreateCompatibleDC(pDC);
dcMemory.SelectObject(&bitmap);
pDC->BitBlt(0, 0, 500,500, &dcMemory, 0, 0, SRCCOPY);
}
If you want to edit the bitmap with the Visual C++ resource editor, you must convert it to use 256 colors. With Visual C++ versions 5.0 and 6.0, you can convert the bitmap into 256 colors by following these steps:
- Copy the offending bitmap in another graphics program.
- In the Resource Editor, insert a new bitmap.
- On the Edit menu, click Paste.
- The bitmap appears in more than 256 colors.
- Close the bitmap.
- Reopen the bitmap, and it contains only 256 colors.
STATUS
This behavior is by design.
Modification Type: | Major | Last Reviewed: | 4/22/2005 |
---|
Keywords: | kbtshoot kberrmsg kbprb KB132705 kbAudDeveloper |
---|
|