#include "wx/resource.h"
#endif
+#if wxUSE_TOOLTIPS
+ #include "wx/tooltip.h"
+#endif // wxUSE_TOOLTIPS
+
// OLE is used for drag-and-drop, clipboard, OLE Automation...
#ifndef wxUSE_NORLANDER_HEADERS
#if defined(__GNUWIN32__) || defined(__SC__) || defined(__SALFORDC__)
{
MSG *msg = (MSG *)wxmsg;
HWND hWnd = msg->hwnd;
- wxWindow *wndThis = wxFindWinFromHandle((WXHWND)hWnd), *wnd;
+ wxWindow *wndThis = wxGetWindowFromHWND((WXHWND)hWnd);
- // for some composite controls (like a combobox), wndThis might be NULL
- // because the subcontrol is not a wxWindow, but only the control itself
- // is - try to catch this case
- while ( hWnd && !wndThis )
+#if wxUSE_TOOLTIPS
+ // we must relay WM_MOUSEMOVE events to the tooltip ctrl if we want it to
+ // popup the tooltip bubbles
+ if ( wndThis && (msg->message == WM_MOUSEMOVE) )
{
- hWnd = ::GetParent(hWnd);
- wndThis = wxFindWinFromHandle((WXHWND)hWnd);
+ wxToolTip *tt = wndThis->GetToolTip();
+ if ( tt )
+ {
+ tt->RelayEvent(wxmsg);
+ }
}
+#endif // wxUSE_TOOLTIPS
// Try translations first; find the youngest window with
// a translation table.
+ wxWindow *wnd;
for ( wnd = wndThis; wnd; wnd = wnd->GetParent() )
{
if ( wnd->MSWTranslateMessage(wxmsg) )
FARPROC theProc = ::GetProcAddress
(
hModuleComCtl32,
+#if defined(__BORLANDC__) && (__BORLANDC__ <= 0x520)
+ "InitCommonControlsEx"
+#else
_T("InitCommonControlsEx")
+#endif
);
if ( !theProc )
theProc = ::GetProcAddress
(
hModuleComCtl32,
+#if defined(__BORLANDC__) && (__BORLANDC__ <= 0x520)
+ "InitializeFlatSB"
+#else
_T("InitializeFlatSB")
+#endif
);
if ( !theProc )
{
// For some reason, with MSVC++ 1.5, WinMain isn't linked in properly
// if in a separate file. So include it here to ensure it's linked.
-#if (defined(__VISUALC__) && !defined(__WIN32__)) || (defined(__GNUWIN32__) && !defined(__TWIN32__))
+#if (defined(__VISUALC__) && !defined(__WIN32__)) || (defined(__GNUWIN32__) && !defined(__TWIN32__) && !defined(WXMAKINGDLL))
#include "main.cpp"
#endif