actually I want to solve a quite simple thing, but I spent already the whole day...now I am running out of ideas!
The requested behaviour: depending on program state I want to display different buttons at the Toolbar.
At first step, I tried to exchange a button in CMainFrame::OnCreate(...) !! It is a SDI sample
the retcode '1' says, that button is exchanged, but nothing happened. The original button image and text from resource toolbar is still displayed.
Hint: the IDB_GO_ONLINE ID is the ID of a bitmap resource, which I have created with same size and resolution than toobar (16x15,24 Bit)
Could anybody help?
The requested behaviour: depending on program state I want to display different buttons at the Toolbar.
At first step, I tried to exchange a button in CMainFrame::OnCreate(...) !! It is a SDI sample
Code:
{
CMFCToolBarButton button(ID_ONLINE,IDB_GO_ONLINE,(LPCTSTR)"ONLINE");
int ret = m_wndToolBar.ReplaceButton(ID_ONLINE,button);
TRACE("%d",ret);
}
Hint: the IDB_GO_ONLINE ID is the ID of a bitmap resource, which I have created with same size and resolution than toobar (16x15,24 Bit)
Could anybody help?