Click here to Skip to main content
15,900,108 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
C++
UINT buttons[3] = {ID_ADD,ID_NEWS,ID_OTHER_VIEW};
if (!m_wndToolBar.CreateEx(this,TBSTYLE_FLAT,WS_CHILD | WS_VISIBLE | CBRS_TOP
| CBRS_GRIPPER | CBRS_TOOLTIPS | CBRS_FLYBY | CBRS_SIZE_DYNAMIC) ||
!m_wndToolBar.LoadBitmap(IDB_MY_TOOLBAR) ||
!m_wndToolBar.SetButtons(buttons,3))
{
TRACE0("Failed to create myToolBar\r\n");
return -1;
}
m_wndToolBar.SetSizes(CSize(37,36),CSize(30,30));

then why it comes black screen in dialog view
Posted
Updated 3-Jun-11 3:43am
v2
Comments
Richard MacCutchan 3-Jun-11 9:45am    
Your question is not very clear, but I would suggest you check carefully your resources for the toolbar and bitmap to see that they match the numbers and sizes specified above.

1 solution

splitt the code: first create the button and then SetButtons and at the end the bitmap. And the bitmap resolution had to be right.
 
Share this answer
 

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900