V
VickyCool4U
Guest
Hi Experts,
I had created a bitmap image using paint brush and created a bitmap image resource in (MFC)Visual Studio 2010 professional edition, but when I try to load the bitmap , everything is coming as black, the real image is not loading.
I found that bitmap image is of 32 bit type. IF I use a 4 bit image then image color is changed and some wrong color image is loaded.
here is my code:-
static UINT BASED_CODE ToolsA[] =
{
ID_ONE,
ID_TWO,
ID_THREE,
ID_FOUR,
ID_FIVE,
ID_SIX,
ID_SEVEN
};
if(!m_MyToolbar.CreateEx(this, TBSTYLE_FLAT, WS_CHILD |
WS_VISIBLE | CBRS_TOOLTIPS | CBRS_TOP | CBRS_GRIPPER | CBRS_TOOLTIPS |
CBRS_FLYBY | CBRS_SIZE_DYNAMIC) ||
!m_MyToolbar.LoadBitmap(IDB_BITMAP2) ||!m_MyToolbar.SetButtons(ToolsA,sizeof(ToolsA)/sizeof(UINT)))
{
EndDialog(IDCANCEL);
}
Continue reading...
I had created a bitmap image using paint brush and created a bitmap image resource in (MFC)Visual Studio 2010 professional edition, but when I try to load the bitmap , everything is coming as black, the real image is not loading.
I found that bitmap image is of 32 bit type. IF I use a 4 bit image then image color is changed and some wrong color image is loaded.
here is my code:-
static UINT BASED_CODE ToolsA[] =
{
ID_ONE,
ID_TWO,
ID_THREE,
ID_FOUR,
ID_FIVE,
ID_SIX,
ID_SEVEN
};
if(!m_MyToolbar.CreateEx(this, TBSTYLE_FLAT, WS_CHILD |
WS_VISIBLE | CBRS_TOOLTIPS | CBRS_TOP | CBRS_GRIPPER | CBRS_TOOLTIPS |
CBRS_FLYBY | CBRS_SIZE_DYNAMIC) ||
!m_MyToolbar.LoadBitmap(IDB_BITMAP2) ||!m_MyToolbar.SetButtons(ToolsA,sizeof(ToolsA)/sizeof(UINT)))
{
EndDialog(IDCANCEL);
}
Continue reading...