Some Unicode changes

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/branches/WX_2_2_BRANCH@6915 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This commit is contained in:
Julian Smart
2000-03-24 11:31:14 +00:00
parent 9be2e3416d
commit d15a450d54
7 changed files with 26 additions and 22 deletions

View File

@@ -415,11 +415,11 @@ public:
HSTMT hstmt; // ODBC Statement handle HSTMT hstmt; // ODBC Statement handle
// ODBC Error Inf. // ODBC Error Inf.
char sqlState[20]; wxChar sqlState[20];
SDWORD nativeError; SDWORD nativeError;
char errorMsg[SQL_MAX_MESSAGE_LENGTH]; wxChar errorMsg[SQL_MAX_MESSAGE_LENGTH];
SWORD cbErrorMsg; 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; int DB_STATUS;
//Error reporting mode //Error reporting mode

View File

@@ -500,13 +500,13 @@ DECLARE_LOG_FUNCTION2(SysError, long lErrCode);
#ifdef __VISUALC__ #ifdef __VISUALC__
#define wxLogApiError(api, rc) \ #define wxLogApiError(api, rc) \
wxLogDebug(wxT("%s(%d): '%s' failed with error 0x%08lx (%s)."), \ wxLogDebug(wxT("%s(%d): '%s' failed with error 0x%08lx (%s)."), \
__TFILE__, __LINE__, _T(api), \ __TFILE__, __LINE__, api, \
rc, wxSysErrorMsg(rc)) rc, wxSysErrorMsg(rc))
#else // !VC++ #else // !VC++
#define wxLogApiError(api, rc) \ #define wxLogApiError(api, rc) \
wxLogDebug(wxT("In file %s at line %d: '%s' failed with " \ wxLogDebug(wxT("In file %s at line %d: '%s' failed with " \
"error 0x%08lx (%s)."), \ "error 0x%08lx (%s)."), \
__TFILE__, __LINE__, _T(api), \ __TFILE__, __LINE__, api, \
rc, wxSysErrorMsg(rc)) rc, wxSysErrorMsg(rc))
#endif // VC++/!VC++ #endif // VC++/!VC++

View File

@@ -42,7 +42,7 @@ public:
#ifdef __WXDEBUG__ #ifdef __WXDEBUG__
// function to return symbolic name of clipboard format (for debug messages) // 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) #define wxGetFormatName(format) wxDataObject::GetFormatName(format)
#else // !Debug #else // !Debug

View File

@@ -132,11 +132,11 @@ bool IsIidFromList(REFIID riid, const IID *aIids[], size_t nCount);
// ---------------------------------------------------------------------------- // ----------------------------------------------------------------------------
// tries to translate riid into a symbolic name, if possible // 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 // these functions print out the new value of reference counter
void wxLogAddRef (const char *szInterface, ULONG cRef); void wxLogAddRef (const wxChar *szInterface, ULONG cRef);
void wxLogRelease(const char *szInterface, ULONG cRef); void wxLogRelease(const wxChar *szInterface, ULONG cRef);
#else //!WXDEBUG #else //!WXDEBUG
#define wxLogQueryInterface(szInterface, riid) #define wxLogQueryInterface(szInterface, riid)

View File

@@ -545,8 +545,6 @@
// Windows-only settings // Windows-only settings
// ---------------------------------------------------------------------------- // ----------------------------------------------------------------------------
// Most of the settings in this section are obsolete or not used
// Make settings compatible with MFC // Make settings compatible with MFC
#define wxUSE_MFC 0 #define wxUSE_MFC 0

View File

@@ -177,27 +177,33 @@
#ifdef LoadLibrary #ifdef LoadLibrary
#undef LoadLibrary #undef LoadLibrary
inline HINSTANCE LoadLibrary(LPCTSTR lpLibFileName)
{
#ifdef _UNICODE #ifdef _UNICODE
inline HINSTANCE LoadLibrary(LPCWSTR lpLibFileName)
{
return LoadLibraryW(lpLibFileName); return LoadLibraryW(lpLibFileName);
#else
return LoadLibraryA(lpLibFileName);
#endif
} }
#else
inline HINSTANCE LoadLibrary(LPCSTR lpLibFileName)
{
return LoadLibraryA(lpLibFileName);
}
#endif
#endif #endif
// FindResource // FindResource
#ifdef FindResource #ifdef FindResource
#undef FindResource #undef FindResource
inline HRSRC FindResource(HMODULE hModule, LPCTSTR lpName, LPCTSTR lpType)
{
#ifdef _UNICODE #ifdef _UNICODE
inline HRSRC FindResource(HMODULE hModule, LPCWSTR lpName, LPCWSTR lpType)
{
return FindResourceW(hModule, lpName, 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 #endif
// IsMaximized // IsMaximized

View File

@@ -203,7 +203,7 @@ class WXDLLEXPORT wxObject
// VC++ 6.0 // VC++ 6.0
#if defined(__VISUALC__) && (__VISUALC__ >= 1200) #if defined(__VISUALC__) && (__VISUALC__ >= 1200)
void operator delete(void *buf, char*, int); void operator delete(void *buf, wxChar*, int);
#endif #endif
// Causes problems for VC++ // Causes problems for VC++