|
-
August 25th, 1999, 09:42 AM
#1
LoadMappedBitmap
I have not been successful in converting from using LoadBitmap to LoadMappedBitmap. I am trying to overcome a problem with the button face in my toolbar bitmap which was created in an image editing tool to be the correct color. Using LoadMappedBitmap causes some terrible problem (it takes for ever for the application to load and the toolbar buttons are totally clobbered with noise). This is the relevant code. What am I doing wrong?
Thanks, Bob
COLORMAP clrMap[] =
{ RGB(192,192,192), ::GetSysColor(COLOR_APPWORKSPACE),
RGB(207,200,207), ::GetSysColor(COLOR_3DFACE),
RGB(255,255,255), ::GetSysColor(COLOR_3DHIGHLIGHT),
RGB(0,0,0), ::GetSysColor(COLOR_3DSHADOW) };
if (!m_TBNav.Create(this, WS_CHILD | WS_VISIBLE | CBRS_TOP
| CBRS_TOOLTIPS | CBRS_FLYBY | CBRS_SIZE_DYNAMIC, IDR_TBNAV))
{
TRACE0("Failed to create toolbar\n");
return -1; // fail to create
}
m_NavBitmap.LoadMappedBitmap(IDB_NAVIGATION, 0, (COLORMAP*)&clrMap, 3);
// should this be 3 or 4 for map size ?? -- using 4 doesn't solve problem
m_TBNav.SetBitmap((HBITMAP)(m_NavBitmap));
m_TBNav.SetButtons(NavIDs, sizeof(NavIDs)/sizeof(UINT));
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|