+#if wxUSE_TOOLTIPS
+bool wxStatusBar::MSWProcessMessage(WXMSG* pMsg)
+{
+ if ( HasFlag(wxSTB_SHOW_TIPS) )
+ {
+ // for a tooltip to be shown, we need to relay mouse events to it;
+ // this is typically done by wxWindowMSW::MSWProcessMessage but only
+ // if wxWindow::m_tooltip pointer is non-NULL.
+ // Since wxStatusBar has multiple tooltips for a single HWND, it keeps
+ // wxWindow::m_tooltip == NULL and then relays mouse events here:
+ MSG *msg = (MSG *)pMsg;
+ if ( msg->message == WM_MOUSEMOVE )
+ wxToolTip::RelayEvent(pMsg);
+ }
+
+ return wxWindow::MSWProcessMessage(pMsg);
+}
+
+bool wxStatusBar::MSWOnNotify(int WXUNUSED(idCtrl), WXLPARAM lParam, WXLPARAM* WXUNUSED(result))
+{
+ if ( HasFlag(wxSTB_SHOW_TIPS) )
+ {
+ // see comment in wxStatusBar::MSWProcessMessage for more info;
+ // basically we need to override wxWindow::MSWOnNotify because
+ // we have wxWindow::m_tooltip always NULL but we still use tooltips...
+
+ NMHDR* hdr = (NMHDR *)lParam;
+
+ wxString str;
+ if (hdr->idFrom < m_tooltips.size() && m_tooltips[hdr->idFrom])
+ str = m_tooltips[hdr->idFrom]->GetTip();
+
+ if ( HandleTooltipNotify(hdr->code, lParam, str))
+ {
+ // processed
+ return true;
+ }
+ }
+
+ return false;
+}
+#endif // wxUSE_TOOLTIPS
+