How to make StatusBar tooltips?
-
Stefan, If the items in your status bar have ID's, then you can add them to a tooltip object like so: CWnd* pSomeItem = GetDlgItem(IDC_SOMEID); m_tooltip.Create(this); m_tooltip.Activate(TRUE); m_tooltip.AddTool(&pSomeItem, "A tool tip"); Then, in your mainframe do the following: BOOL CMainFrame::PreTranslateMessage(MSG* pMsg) { // Let the ToolTip process messages. m_tooltip.RelayEvent(pMsg); return CMDIFrameWnd::PreTranslateMessage(pMsg); } This might work. ================== The original message was: How could I make status bar to show tool tips for its panes?
Regards,
Stefan
---------- -
Have you tried: SendMessage ( hStatusBarWnd, SB_SETTIPTEXT, (WPARAM)(INT)iStatusBarPart, (LPARAM)(LPCTSTR)lpcszTextToDisplayAsTooltip ); code sequence? The status bar window must be created (as in the following example) using g_hStatusBarWnd = CreateWindowEx ( 0L, STATUSCLASSNAME, 0, WS_CHILD | WS_VISIBLE | SBT_TOOLTIPS, 0, 0, 0, 0, hParentWnd, (HMENU)ID_STATUSBAR, g_hInstance, 0 ); For more information, you can check the WindowsNT System Manager, where you can find, among other stuff like this, also something about status bar APIs. All the best, Sardaukar ================== The original message was: How could I make status bar to show tool tips for its panes?
Regards,
Stefan
----------