Click here to Skip to main content
16,004,882 members
Home / Discussions / C / C++ / MFC
   

C / C++ / MFC

 
AnswerRe: It is authenticated domain user? Pin
David Crow4-Oct-04 10:56
David Crow4-Oct-04 10:56 
AnswerRe: It is authenticated domain user? Pin
2249174-Oct-04 19:23
2249174-Oct-04 19:23 
GeneralNon-Integer Spin Controls Pin
sweep1234-Oct-04 4:57
sweep1234-Oct-04 4:57 
GeneralRe: Non-Integer Spin Controls Pin
BlackDice4-Oct-04 6:35
BlackDice4-Oct-04 6:35 
GeneralCompact memory vs. speed Pin
Haakon S.4-Oct-04 4:00
Haakon S.4-Oct-04 4:00 
GeneralRe: Compact memory vs. speed Pin
Bob Stanneveld4-Oct-04 4:16
Bob Stanneveld4-Oct-04 4:16 
GeneralRe: Compact memory vs. speed Pin
Haakon S.4-Oct-04 8:52
Haakon S.4-Oct-04 8:52 
GeneralToolBarControl Help! Pin
Pazzuzu4-Oct-04 3:49
Pazzuzu4-Oct-04 3:49 
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,toolbarSize,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.....

Generalpatches / auto updates Pin
Muhammad Azam4-Oct-04 3:15
Muhammad Azam4-Oct-04 3:15 
GeneralRe: patches / auto updates Pin
ThatsAlok4-Oct-04 3:35
ThatsAlok4-Oct-04 3:35 
GeneralReading data from memory Pin
Vinaya4-Oct-04 2:10
Vinaya4-Oct-04 2:10 
GeneralRe: Reading data from memory Pin
Michael Hendrickx4-Oct-04 6:32
Michael Hendrickx4-Oct-04 6:32 
GeneralRe: Reading data from memory Pin
Vinaya5-Oct-04 2:06
Vinaya5-Oct-04 2:06 
GeneralBook on Visual Studio 2003 IDE Pin
Vikash Dubey4-Oct-04 1:53
Vikash Dubey4-Oct-04 1:53 
GeneralRe: Book on Visual Studio 2003 IDE Pin
Ed K4-Oct-04 15:53
Ed K4-Oct-04 15:53 
GeneralRegarding Immovable window Pin
balajeedurai4-Oct-04 1:22
balajeedurai4-Oct-04 1:22 
GeneralRe: Regarding Immovable window Pin
Ravi Bhavnani4-Oct-04 2:17
professionalRavi Bhavnani4-Oct-04 2:17 
GeneralRe: Regarding Immovable window Pin
mirex4-Oct-04 2:28
mirex4-Oct-04 2:28 
GeneralRe: Regarding Immovable window Pin
toxcct4-Oct-04 2:57
toxcct4-Oct-04 2:57 
GeneralRe: Regarding Immovable window Pin
Antony M Kancidrowski4-Oct-04 3:58
Antony M Kancidrowski4-Oct-04 3:58 
GeneralRe: Changing color of the Edit box Pin
Neville Franks4-Oct-04 0:16
Neville Franks4-Oct-04 0:16 
GeneralRe: Changing color of the Edit box Pin
Neelesh K J Jain4-Oct-04 0:48
Neelesh K J Jain4-Oct-04 0:48 
GeneralRe: Changing color of the Edit box Pin
Neville Franks4-Oct-04 1:05
Neville Franks4-Oct-04 1:05 
GeneralRe: Changing color of the Edit box Pin
Sujan Christo4-Oct-04 1:26
Sujan Christo4-Oct-04 1:26 
GeneralRe: Changing color of the Edit box Pin
Sujan Christo4-Oct-04 0:18
Sujan Christo4-Oct-04 0:18 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.