Toolbar Bitmap not loading

  • Thread starter Thread starter VickyCool4U
  • Start date Start date
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.


1516945.jpg


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...
 

Similar threads

V
Replies
0
Views
108
VickyCool4U
V
V
Replies
0
Views
114
VickyCool4U
V
Z
Replies
0
Views
107
Zebedee6
Z
Back
Top