April 4th, 2004, 04:10 AM
#1
Question on toolbar button text
I have created a toolbar in dialog
Code:
if (!m_Toolbar.Create(this) || !m_Toolbar.LoadToolBar (IDR_TOOLBAR1))
{
TRACE0("Failed to create toolbar\n");
return -1; // fail to create
}
m_Toolbar.ModifyStyle(0, TBSTYLE_FLAT);
m_Toolbar.SetButtonText(0,"Add");
m_Toolbar.SetSizes(CSize(75,55),CSize(32,32));
After that i used some code from others to embed the toolbar into the dialog
Code:
...................
...................
...................
RepositionBars(AFX_IDW_CONTROLBAR_FIRST,AFX_IDW_CONTROLBAR_LAST,0);
I've use GetButtonText to confirm that the text is being added but it just don't show up....
Did i missed any step to show the button text??
Thanks......
0 error(s), 0 warning(s)
April 4th, 2004, 04:57 AM
#2
Did you go in to the toolbar resource and actually change the
size of the button bitmaps?
Wakeup in the morning and kick the day in the teeth!! Or something like that.
"i don't want to write leak free code or most efficient code, like others traditional (so called expert) coders do."
April 4th, 2004, 05:04 AM
#3
the size of bitmap is 32 x 32
0 error(s), 0 warning(s)
April 4th, 2004, 05:05 AM
#4
this code works well in mainframe toolbar... i tried it in another program but it don't works in dialog...
0 error(s), 0 warning(s)
April 4th, 2004, 05:19 AM
#5
Could you post the project for the dialog?
Wakeup in the morning and kick the day in the teeth!! Or something like that.
"i don't want to write leak free code or most efficient code, like others traditional (so called expert) coders do."
April 4th, 2004, 07:18 AM
#6
this is it... hope there is an solution
thanks in advance.....
Attached Files
0 error(s), 0 warning(s)
April 5th, 2004, 10:41 PM
#7
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