From d15a450d54d9488bfe3f0ff2666dd6190151cb77 Mon Sep 17 00:00:00 2001 From: Julian Smart Date: Fri, 24 Mar 2000 11:31:14 +0000 Subject: [PATCH] Some Unicode changes git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/branches/WX_2_2_BRANCH@6915 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775 --- include/wx/db.h | 6 +++--- include/wx/log.h | 4 ++-- include/wx/msw/ole/dataobj.h | 2 +- include/wx/msw/ole/oleutils.h | 6 +++--- include/wx/msw/setup0.h | 2 -- include/wx/msw/winundef.h | 26 ++++++++++++++++---------- include/wx/object.h | 2 +- 7 files changed, 26 insertions(+), 22 deletions(-) diff --git a/include/wx/db.h b/include/wx/db.h index ab4310297b..8ee72f07fa 100644 --- a/include/wx/db.h +++ b/include/wx/db.h @@ -415,11 +415,11 @@ public: HSTMT hstmt; // ODBC Statement handle // ODBC Error Inf. - char sqlState[20]; + wxChar sqlState[20]; SDWORD nativeError; - char errorMsg[SQL_MAX_MESSAGE_LENGTH]; + wxChar errorMsg[SQL_MAX_MESSAGE_LENGTH]; SWORD cbErrorMsg; - char errorList[DB_MAX_ERROR_HISTORY][DB_MAX_ERROR_MSG_LEN]; + wxChar errorList[DB_MAX_ERROR_HISTORY][DB_MAX_ERROR_MSG_LEN]; int DB_STATUS; //Error reporting mode diff --git a/include/wx/log.h b/include/wx/log.h index 8c17c182d8..c2312466e4 100644 --- a/include/wx/log.h +++ b/include/wx/log.h @@ -500,13 +500,13 @@ DECLARE_LOG_FUNCTION2(SysError, long lErrCode); #ifdef __VISUALC__ #define wxLogApiError(api, rc) \ wxLogDebug(wxT("%s(%d): '%s' failed with error 0x%08lx (%s)."), \ - __TFILE__, __LINE__, _T(api), \ + __TFILE__, __LINE__, api, \ rc, wxSysErrorMsg(rc)) #else // !VC++ #define wxLogApiError(api, rc) \ wxLogDebug(wxT("In file %s at line %d: '%s' failed with " \ "error 0x%08lx (%s)."), \ - __TFILE__, __LINE__, _T(api), \ + __TFILE__, __LINE__, api, \ rc, wxSysErrorMsg(rc)) #endif // VC++/!VC++ diff --git a/include/wx/msw/ole/dataobj.h b/include/wx/msw/ole/dataobj.h index dd2d0cf503..41b013a9e8 100644 --- a/include/wx/msw/ole/dataobj.h +++ b/include/wx/msw/ole/dataobj.h @@ -42,7 +42,7 @@ public: #ifdef __WXDEBUG__ // function to return symbolic name of clipboard format (for debug messages) - static const char *GetFormatName(wxDataFormat format); + static const wxChar *GetFormatName(wxDataFormat format); #define wxGetFormatName(format) wxDataObject::GetFormatName(format) #else // !Debug diff --git a/include/wx/msw/ole/oleutils.h b/include/wx/msw/ole/oleutils.h index d20c22c17b..4e55127e96 100644 --- a/include/wx/msw/ole/oleutils.h +++ b/include/wx/msw/ole/oleutils.h @@ -132,11 +132,11 @@ bool IsIidFromList(REFIID riid, const IID *aIids[], size_t nCount); // ---------------------------------------------------------------------------- // tries to translate riid into a symbolic name, if possible -void wxLogQueryInterface(const char *szInterface, REFIID riid); +void wxLogQueryInterface(const wxChar *szInterface, REFIID riid); // these functions print out the new value of reference counter -void wxLogAddRef (const char *szInterface, ULONG cRef); -void wxLogRelease(const char *szInterface, ULONG cRef); +void wxLogAddRef (const wxChar *szInterface, ULONG cRef); +void wxLogRelease(const wxChar *szInterface, ULONG cRef); #else //!WXDEBUG #define wxLogQueryInterface(szInterface, riid) diff --git a/include/wx/msw/setup0.h b/include/wx/msw/setup0.h index d6219e5262..2358ca23cb 100644 --- a/include/wx/msw/setup0.h +++ b/include/wx/msw/setup0.h @@ -545,8 +545,6 @@ // Windows-only settings // ---------------------------------------------------------------------------- -// Most of the settings in this section are obsolete or not used - // Make settings compatible with MFC #define wxUSE_MFC 0 diff --git a/include/wx/msw/winundef.h b/include/wx/msw/winundef.h index e580f24650..7a078f9a76 100644 --- a/include/wx/msw/winundef.h +++ b/include/wx/msw/winundef.h @@ -177,27 +177,33 @@ #ifdef LoadLibrary #undef LoadLibrary - inline HINSTANCE LoadLibrary(LPCTSTR lpLibFileName) - { #ifdef _UNICODE + inline HINSTANCE LoadLibrary(LPCWSTR lpLibFileName) + { return LoadLibraryW(lpLibFileName); - #else - return LoadLibraryA(lpLibFileName); - #endif } + #else + inline HINSTANCE LoadLibrary(LPCSTR lpLibFileName) + { + return LoadLibraryA(lpLibFileName); + } + #endif #endif // FindResource #ifdef FindResource #undef FindResource - inline HRSRC FindResource(HMODULE hModule, LPCTSTR lpName, LPCTSTR lpType) - { #ifdef _UNICODE + inline HRSRC FindResource(HMODULE hModule, LPCWSTR lpName, LPCWSTR lpType) + { return FindResourceW(hModule, lpName, lpType); - #else - return FindResourceA(hModule, lpName, lpType); - #endif } + #else + inline HRSRC FindResource(HMODULE hModule, LPCSTR lpName, LPCSTR lpType) + { + return FindResourceA(hModule, lpName, lpType); + } + #endif #endif // IsMaximized diff --git a/include/wx/object.h b/include/wx/object.h index f444b6786e..a6f7968ffe 100644 --- a/include/wx/object.h +++ b/include/wx/object.h @@ -203,7 +203,7 @@ class WXDLLEXPORT wxObject // VC++ 6.0 #if defined(__VISUALC__) && (__VISUALC__ >= 1200) - void operator delete(void *buf, char*, int); + void operator delete(void *buf, wxChar*, int); #endif // Causes problems for VC++