ToolBarControl help!!
Hi Guys,
Iam trying to put some bitmap images using a toolbarcontrol into a dialog.
I have done it as follows:
CRect toolbarSize(20,20,100,50);
m_toolBarCtrl.Create(WS_CHILD|TBSTYLE_FLAT,toolbar Size,this,IDR_TOOLBAR1);
m_toolBarCtrl.AddBitmap(1,IDB_BITMAP2);
m_toolBarCtrl.AddBitmap(1,IDB_BITMAP3);
TBBUTTON tb[3];
// Index of new button image.
tb[0].iBitmap = 0;
// Setting button state
tb[0].fsState = TBSTATE_ENABLED;
// Setting button style
tb[0].fsStyle = TBSTYLE_BUTTON;
tb[0].dwData = 0;
tb[0].iString = NULL;
// Index of new button image.
tb[1].iBitmap = 1;
//Setting button state
tb[1].fsState = TBSTATE_ENABLED;
// Setting button style
tb[1].fsStyle = TBSTYLE_BUTTON;
tb[1].dwData = 0;
tb[1].iString = NULL;
m_toolBarCtrl.AddButtons(2,tb);
m_toolBarCtrl.ShowWindow(true);
The problem is in both of my buttons,I see only 1 image(ie: the image in "bitmap2").What should I do to see the other bitmap image in the other button.
I have each images in 2 different files(So I imported it into the resource editor as 2 bitmaps -IDB_BITMAP2& IDB_BITMAP3)
If I want to have my images in one bitmapResource(if thats the problem),What should I do ?
Mind that I have each image, which I want to displaye as .bmp file.(one image in 1 .bmp file).
Another thing is How can I see a tooltip for each button in the above code...
Any help is appreciated.....
Thanks.....
|