   Win32 toolbar tooltip problem...
  I have a toolbar with two buttons on which I would like to add tool tips.  I have implemented the code off of the MSDN but I cannot get the tool tips to function  Can someone have a look at this code for me?From my resource file:///////////////////////////////////////////////////////////////////////////////// String Table//STRINGTABLEBEGIN   IDS_OPEN_TOOLTIP    "Open"   IDS_CLOSE_TOOLTIP   "Close"END#endifCreating 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 commandtbbToolBarButtons[0].dwData = IDT_OPEN; //Set the button IDtbbToolBarButtons[1].iBitmap = STD_DELETE ;   //Set the button bitmaptbbToolBarButtons[1].fsState = TBSTATE_INDETERMINATE;   //Set the statetbbToolBarButtons[1].fsStyle = TBSTYLE_BUTTON;//Set the styletbbToolBarButtons[1].idCommand = IDM_CLOSE;   //Set the menu commandtbbToolBarButtons[1].dwData = IDT_CLOSE; //Set the button IDSendMessage(hButton[IDC_MAIN_TOOLBAR], TB_ADDBUTTONS, sizeof(tbbToolBarButtons)/sizeof(TBBUTTON), (LPARAM)&tbbToolBarButtons);   //Load the buttonsHandling the TBN_GETINFOTIP message:case TBN_GETINFOTIP: MessageBox(hWnd, "TBN_GETINFOTIP sent", "Message", MB_ICONERROR);LPTOOLTIPTEXT lpttt = (LPTOOLTIPTEXT)lParam;// Set the instance of the module that contains the resource.lpttt->hinst = (HINSTANCE) GetWindowLong(hWnd,GWL_HINSTANCE); UINT_PTR idButton = lpttt->hdr.idFrom; switch (idButton) { case IDM_OPEN: MessageBox(hWnd, "Open", "Message", MB_ICONERROR);lpttt->lpszText = MAKEINTRESOURCE(IDS_OPEN_TOOLTIP); break; case IDM_CLOSE: MessageBox(hWnd, "Close", "Message", MB_ICONERROR);lpttt->lpszText = MAKEINTRESOURCE(IDS_CLOSE_TOOLTIP); break; } break;I receive the "TBN_GETINFOTIP sent" message box when I mouse over one of my buttons.  However, I never receive the "Open" or "Close" message box.  Am I implementing this incorrectly?  Thanks for any help you can offer!   
  Just with a quick glance, I think you should be using IDT_OPEN in the switch case, not IDM_OPEN.IDM_OPEN is when you process the button click.I am not 100% sure as I haven't used a toolbar in a long time.   ;  The lParam paremeter for TBN_GETINFOTIP contains a pointer to a NMTBGETINFOTIP structure, not a TOOLTIPTEXT structure. Also, generally, the idFrom member of the NMHDR structure is the id of the window sending the notification message (in this case the toolbar control), not the id of the item. See the docs for the TBN_GETINFOTIP notification message.   ;  I found part of the problem.The lparam of the message that is sent when I mouse-over a toolbar button is a pointer to a NMTTDISPINFO structure.  The NMTTDISPINFO.hdr.idFrom member is supposed to be the command identifier of the toolbar button for which tool tips is needed.  However, when I process the message, the NMTTDISPINFO.hdr.idFrom member is always the ID of the toolbar itself.This is why I am not reaching my case statements.  The ID sent is never a button ID.  Any idea why it would be sending the ID of the toolbar instead of the ID of the button?   ;Quote:Original post by hikikomori-sanThe lParam paremeter for TBN_GETINFOTIP contains a pointer to a NMTBGETINFOTIP structure, not a TOOLTIPTEXT structure. Also, generally, the idFrom member of the NMHDR structure is the id of the window sending the notification message (in this case the toolbar control), not the id of the item. See the docs for the TBN_GETINFOTIP notification message.I didn't refresh my window before responding.  I am looking into this now.  Thanks for the help!   ;  Fixed some message handling issues and I have my tool tips.  Thanks for the help!   