I have written only this code in MDI application
My toolbar button gets removed by On Button.
The issue is that If I run and test the application to remove the button two or three times , The next time I dont require to press button,toolbar button gets automatically removed.Even after clean and rebuild ,even after closing project and
Rebuiding again toolbar button does not reappear.What is this bug or intellisence
Can anyone tell me What is this ?
void CMerilisaRApp::OnButton()
{
((CMainFrame*)(AfxGetApp()->GetMainWnd()))->ApplyPolicy();
}
void CMainFrame::ApplyPolicy(void)
{
m_wndToolBar.RemoveButton(4);
}