From d42d40692bc7a6cf36bcee26c63f8703a6792f52 Mon Sep 17 00:00:00 2001 From: Vadim Zeitlin Date: Fri, 11 Aug 2000 19:39:16 +0000 Subject: [PATCH] compilation fixes for Unicode build git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/branches/WX_2_2_BRANCH@8037 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775 --- src/common/intl.cpp | 10 ++++------ src/msw/clipbrd.cpp | 10 +++++----- src/msw/dialup.cpp | 2 +- src/msw/ole/dropsrc.cpp | 3 +-- src/msw/ole/droptgt.cpp | 6 +++--- src/msw/window.cpp | 3 ++- 6 files changed, 16 insertions(+), 18 deletions(-) diff --git a/src/common/intl.cpp b/src/common/intl.cpp index 211b4d01a6..8540655609 100644 --- a/src/common/intl.cpp +++ b/src/common/intl.cpp @@ -665,11 +665,9 @@ const wxMB2WXbuf wxLocale::GetString(const wxChar *szOrigString, return (wxMB2WXbuf)(szOrigString); } - else - { - return wxConvertMB2WX(pszTrans); // or preferably wxCSConv(charset).cMB2WX(pszTrans) or something, - // a macro similar to wxConvertMB2WX could be written for that - } + + return wxConvertMB2WX(pszTrans); // or preferably wxCSConv(charset).cMB2WX(pszTrans) or something, + // a macro similar to wxConvertMB2WX could be written for that #undef szOrgString } @@ -677,7 +675,7 @@ const wxMB2WXbuf wxLocale::GetString(const wxChar *szOrigString, // find catalog by name in a linked list, return NULL if !found wxMsgCatalog *wxLocale::FindCatalog(const wxChar *szDomain) const { -// linear search in the linked list + // linear search in the linked list wxMsgCatalog *pMsgCat; for ( pMsgCat = m_pMsgCat; pMsgCat != NULL; pMsgCat = pMsgCat->m_pNext ) { if ( wxStricmp(pMsgCat->GetName(), szDomain) == 0 ) diff --git a/src/msw/clipbrd.cpp b/src/msw/clipbrd.cpp index 9a2d7b327c..0b2451d447 100644 --- a/src/msw/clipbrd.cpp +++ b/src/msw/clipbrd.cpp @@ -815,14 +815,14 @@ bool wxClipboard::GetData( wxDataObject& data ) } #endif // wxUSE_METAFILE } -#else // !wxUSE_DATAOBJ - wxFAIL_MSG( wxT("no clipboard implementation") ); -#endif // wxUSE_OLE_CLIPBOARD/wxUSE_DATAOBJ return FALSE; +#else // !wxUSE_DATAOBJ + wxFAIL_MSG( wxT("no clipboard implementation") ); + + return FALSE; +#endif // wxUSE_OLE_CLIPBOARD/wxUSE_DATAOBJ } -#else -// #error "Please turn wxUSE_CLIPBOARD on to compile this file." #endif // wxUSE_CLIPBOARD diff --git a/src/msw/dialup.cpp b/src/msw/dialup.cpp index 2fff5a9a22..bd40019d79 100644 --- a/src/msw/dialup.cpp +++ b/src/msw/dialup.cpp @@ -551,7 +551,7 @@ void wxDialUpManagerMSW::CleanUpThreadData() { if ( !SetEvent(m_data.hEventQuit) ) { - wxLogLastError("SetEvent(RasThreadQuit)"); + wxLogLastError(_T("SetEvent(RasThreadQuit)")); } CloseHandle(m_hThread); diff --git a/src/msw/ole/dropsrc.cpp b/src/msw/ole/dropsrc.cpp index e71864e064..20179b9427 100644 --- a/src/msw/ole/dropsrc.cpp +++ b/src/msw/ole/dropsrc.cpp @@ -222,8 +222,7 @@ wxDragResult wxDropSource::DoDragDrop(bool bAllowMove) } else { if ( FAILED(hr) ) { - wxLogApiError("DoDragDrop", hr); - wxLogError(wxT("Drag & drop operation failed.")); + wxLogSysError(wxT("Drag & drop operation failed.")); } else { wxLogDebug(wxT("Unexpected success return code %08lx from DoDragDrop."), diff --git a/src/msw/ole/droptgt.cpp b/src/msw/ole/droptgt.cpp index 870929a2b4..b32a171501 100644 --- a/src/msw/ole/droptgt.cpp +++ b/src/msw/ole/droptgt.cpp @@ -309,7 +309,7 @@ bool wxDropTarget::Register(WXHWND hwnd) { HRESULT hr = ::CoLockObjectExternal(m_pIDropTarget, TRUE, FALSE); if ( FAILED(hr) ) { - wxLogApiError("CoLockObjectExternal", hr); + wxLogApiError(_T("CoLockObjectExternal"), hr); return FALSE; } @@ -317,7 +317,7 @@ bool wxDropTarget::Register(WXHWND hwnd) if ( FAILED(hr) ) { ::CoLockObjectExternal(m_pIDropTarget, FALSE, FALSE); - wxLogApiError("RegisterDragDrop", hr); + wxLogApiError(_T("RegisterDragDrop"), hr); return FALSE; } @@ -332,7 +332,7 @@ void wxDropTarget::Revoke(WXHWND hwnd) HRESULT hr = ::RevokeDragDrop((HWND) hwnd); if ( FAILED(hr) ) { - wxLogApiError("RevokeDragDrop", hr); + wxLogApiError(_T("RevokeDragDrop"), hr); } ::CoLockObjectExternal(m_pIDropTarget, FALSE, TRUE); diff --git a/src/msw/window.cpp b/src/msw/window.cpp index 41b6be66fc..ea7e2c762a 100644 --- a/src/msw/window.cpp +++ b/src/msw/window.cpp @@ -1329,7 +1329,8 @@ void wxWindow::AdjustForParentClientOrigin(int& x, int& y, int sizeFlags) if ( !(sizeFlags & wxSIZE_NO_ADJUSTMENTS) && parent ) { wxPoint pt(parent->GetClientAreaOrigin()); - x += pt.x; y += pt.y; + x += pt.x; + y += pt.y; } } }