X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/cf0b3979bc9da4619565e039a9128c5e74f163a7..543f08a67631f2849872d5d3ee7cb99047718560:/src/msw/tooltip.cpp diff --git a/src/msw/tooltip.cpp b/src/msw/tooltip.cpp index 199c42a0a1..9561c8e776 100644 --- a/src/msw/tooltip.cpp +++ b/src/msw/tooltip.cpp @@ -32,7 +32,7 @@ #include "wx/tooltip.h" #include "wx/msw/private.h" -#if (defined(__WIN95__) && !defined(__GNUWIN32__)) || defined(__TWIN32__) +#if (defined(__WIN95__) && !defined(__GNUWIN32__)) || defined(__TWIN32__) || defined(wxUSE_NORLANDER_HEADERS) #include #endif @@ -41,13 +41,14 @@ // ---------------------------------------------------------------------------- // a simple wrapper around TOOLINFO Win32 structure +#pragma warning( disable : 4097 ) class wxToolInfo : public TOOLINFO { public: wxToolInfo(wxWindow *win) { // initialize all members -#ifdef __GNUWIN32__ +#if defined( __GNUWIN32__ ) && !defined(wxUSE_NORLANDER_HEADERS) memset(this, 0, sizeof(TOOLINFO)); #else ::ZeroMemory(this, sizeof(TOOLINFO)); @@ -58,6 +59,7 @@ public: uId = (UINT)win->GetHWND(); } }; +#pragma warning( default : 4097 ) // ---------------------------------------------------------------------------- // private functions @@ -111,7 +113,7 @@ static void SendTooltipMessageToAll(UINT msg, WPARAM wParam, LPARAM lParam) continue; } - wxASSERT_MSG( dialog || frame, "logic error" ); + wxASSERT_MSG( dialog || frame, _T("logic error") ); WXHWND hwndTT = frame ? frame->GetToolTipCtrl() : dialog->GetToolTipCtrl(); @@ -173,10 +175,10 @@ WXHWND wxToolTip::GetToolTipCtrl() } wxCHECK_MSG( frame || dialog, 0, - "can't create tooltip control outside a frame or a dialog" ); + _T("can't create tooltip control outside a frame or a dialog") ); HWND hwndTT = (HWND)(frame ? frame->GetToolTipCtrl() - : dialog->GetToolTipCtrl()); + : dialog->GetToolTipCtrl()); if ( !hwndTT ) { hwndTT = ::CreateWindow(TOOLTIPS_CLASS, @@ -184,7 +186,7 @@ WXHWND wxToolTip::GetToolTipCtrl() TTS_ALWAYSTIP, CW_USEDEFAULT, CW_USEDEFAULT, CW_USEDEFAULT, CW_USEDEFAULT, - (HWND)frame->GetHWND(), (HMENU)NULL, + (HWND)parent->GetHWND(), (HMENU)NULL, wxGetInstance(), NULL); if ( hwndTT ) @@ -271,7 +273,7 @@ void wxToolTip::SetTip(const wxString& tip) { // update it immediately wxToolInfo ti(m_window); - ti.lpszText = (char *)m_text.c_str(); + ti.lpszText = (wxChar *)m_text.c_str(); (void)SendTooltipMessage(GetToolTipCtrl(), TTM_UPDATETIPTEXT, 0, &ti); }