views:

53

answers:

0

I try to modify code for IE toolbar button in visual c++. I manage to hide my toolbar button using, TB_HIDEBUTTON at run time. How to unhide it back in run time?

Here is the code that Im currently modifying:

void CRebarHandler::setButtonMenu2(){
  TBBUTTONINFO inf;
  inf.cbSize=sizeof(inf);
  inf.dwMask=TBIF_STYLE;
  inf.fsStyle=BTNS_DROPDOWN | BTNS_AUTOSIZE ;
  SendMessage(m_hWndToolbar, TB_HIDEBUTTON, m_buttonID, (LPARAM)&inf); //wira      
}   

I call setButtonMenu2 from here (it is within the same cpp file):

  if (d){
    switch (d){ 
      case ID_MENU_BUTTON : bho->menuPressed(); setButtonMenu2(); break;
      case ID_MENU_ABOUT : CDlgAbout::openDialog(m_hWnd); setButtonMenu(); break;
    }