   Hiding a Win32 toolbar button...
  In my Win32 program I have a toolbar with a single "open" button.  Here is the code I use to generate the toolbar://Tool barTBBUTTON tbbToolBarButtons[NUMBEROFTOOLBARBUTTONS];   //Tool bar button structureTBADDBITMAP tbabToolBarBitmap;   //Tool bar add bitmap structureSendMessage(hButton[IDC_MAIN_TOOLBAR], TB_BUTTONSTRUCTSIZE, (WPARAM)sizeof(TBBUTTON), 0);   //Send TB_BUTTONSTRUCTSIZE for backward compatibilitytbabToolBarBitmap.hInst = HINST_COMMCTRL;   //Set the handle of the common control tbabToolBarBitmap.nID = IDB_STD_SMALL_COLOR;   //Set the bitmap to be loadedSendMessage(hButton[IDC_MAIN_TOOLBAR], TB_ADDBITMAP, 0, (LPARAM)&tbabToolBarBitmap);   //Load the imagesZeroMemory(tbbToolBarButtons, sizeof(tbbToolBarButtons));   //Zero the tbbToolBarButtonsUTTON structuretbbToolBarButtons[0].iBitmap = STD_FILEOPEN; //Set the button bitmaptbbToolBarButtons[0].fsState = TBSTATE_ENABLED;   //Set the statetbbToolBarButtons[0].fsStyle = TBSTYLE_BUTTON;    //Set the styletbbToolBarButtons[0].idCommand = IDM_OPEN;   //Set the menu commandSendMessage(hButton[IDC_MAIN_TOOLBAR], TB_ADDBUTTONS, sizeof(tbbToolBarButtons)/sizeof(TBBUTTON), (LPARAM)&tbbToolBarButtons);   //Load the buttonsWhen I open my file I would like the button to "grey out".  Here is the method I have been using to try to accomplish this:SendMessage(hButton[IDC_MAIN_TOOLBAR],TB_SETSTATE,(WPARAM) (int) 0,TBSTATE_INDETERMINATE);The code above doesn't generate any errors but the button does not grey out when the "SendMessage" is processed.  This is the syntax used on the MSDN.  Am I using this code incorrectly?   
  wParam should be set to the command ID of the button you are updating; unless the button ID is 0, your code won't actually successfully change the button.   ;  You could also use TB_ENABLEBUTTON:SendMessage( hwndToolBar, TB_ENABLEBUTTON, ButtonId, MAKELONG( bEnable, 0 ) );with ButtonID being a DWORD and bEnable being a BOOL.;Quote:wParam should be set to the command IDI set this and it did the trick.  Thanks!   