compilation in Unicode mode works with VC++

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/branches/WX_2_2_BRANCH@7031 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This commit is contained in:
Vadim Zeitlin
2000-04-01 23:19:12 +00:00
parent a250a49231
commit 9728ba5c8a
31 changed files with 267 additions and 239 deletions

View File

@@ -35,13 +35,13 @@
/// separates group and entry names (probably shouldn't be changed) /// separates group and entry names (probably shouldn't be changed)
#ifndef wxCONFIG_PATH_SEPARATOR #ifndef wxCONFIG_PATH_SEPARATOR
#define wxCONFIG_PATH_SEPARATOR '/' #define wxCONFIG_PATH_SEPARATOR _T('/')
#endif #endif
/// introduces immutable entries /// introduces immutable entries
// (i.e. the ones which can't be changed from the local config file) // (i.e. the ones which can't be changed from the local config file)
#ifndef wxCONFIG_IMMUTABLE_PREFIX #ifndef wxCONFIG_IMMUTABLE_PREFIX
#define wxCONFIG_IMMUTABLE_PREFIX '!' #define wxCONFIG_IMMUTABLE_PREFIX _T('!')
#endif #endif
/// should we use registry instead of configuration files under Windows? /// should we use registry instead of configuration files under Windows?

View File

@@ -60,6 +60,65 @@ enum wxSeekMode
WXDLLEXPORT_DATA(extern const wxChar*) wxEmptyString; WXDLLEXPORT_DATA(extern const wxChar*) wxEmptyString;
// ----------------------------------------------------------------------------
// declare our versions of low level file functions: some compilers prepend
// underscores to the usual names, some also have Unicode versions of them
// ----------------------------------------------------------------------------
// Microsoft compiler loves underscores, feed them to it
#ifdef __VISUALC__
// functions
#define wxOpen _wopen
#define wxClose _close
#define wxRead _read
#define wxWrite _write
#define wxLseek _lseek
#define wxFsync _commit
#define wxAccess _waccess
#define wxEof _eof
#define wxTell _tell
#define wxMkdir _wmkdir
#define wxRmdir _wrmdir
#define wxStat _wstat
// types
#define wxStructStat struct _stat
// constants
#define O_RDONLY _O_RDONLY
#define O_WRONLY _O_WRONLY
#define O_RDWR _O_RDWR
#define O_EXCL _O_EXCL
#define O_CREAT _O_CREAT
#define O_BINARY _O_BINARY
#define S_IFDIR _S_IFDIR
#define S_IFREG _S_IFREG
#else
// functions
#define wxOpen open
#define wxClose close
#define wxRead read
#define wxWrite write
#define wxLseek lseek
#define wxFsync commit
#define wxAccess access
#define wxEof eof
#define wxMkdir mkdir
#define wxRmdir rmdir
#define wxTell(fd) lseek(fd, 0, SEEK_CUR)
// types
#define wxStructStat struct stat
#endif // VC++
// ---------------------------------------------------------------------------- // ----------------------------------------------------------------------------
// functions // functions
// ---------------------------------------------------------------------------- // ----------------------------------------------------------------------------

View File

@@ -85,7 +85,7 @@ bool IsIidFromList(REFIID riid, const IID *aIids[], size_t nCount);
#define IMPLEMENT_IUNKNOWN_METHODS(classname) \ #define IMPLEMENT_IUNKNOWN_METHODS(classname) \
STDMETHODIMP classname::QueryInterface(REFIID riid, void **ppv) \ STDMETHODIMP classname::QueryInterface(REFIID riid, void **ppv) \
{ \ { \
wxLogQueryInterface(#classname, riid); \ wxLogQueryInterface(_T(#classname), riid); \
\ \
if ( IsIidFromList(riid, ms_aIids, WXSIZEOF(ms_aIids)) ) { \ if ( IsIidFromList(riid, ms_aIids, WXSIZEOF(ms_aIids)) ) { \
*ppv = this; \ *ppv = this; \
@@ -102,14 +102,14 @@ bool IsIidFromList(REFIID riid, const IID *aIids[], size_t nCount);
\ \
STDMETHODIMP_(ULONG) classname::AddRef() \ STDMETHODIMP_(ULONG) classname::AddRef() \
{ \ { \
wxLogAddRef(#classname, m_cRef); \ wxLogAddRef(_T(#classname), m_cRef); \
\ \
return ++m_cRef; \ return ++m_cRef; \
} \ } \
\ \
STDMETHODIMP_(ULONG) classname::Release() \ STDMETHODIMP_(ULONG) classname::Release() \
{ \ { \
wxLogRelease(#classname, m_cRef); \ wxLogRelease(_T(#classname), m_cRef); \
\ \
if ( --m_cRef == 0 ) { \ if ( --m_cRef == 0 ) { \
delete this; \ delete this; \

View File

@@ -47,7 +47,7 @@ public:
// Operators // Operators
wxTextInputStream& operator>>(wxString& word); wxTextInputStream& operator>>(wxString& word);
wxTextInputStream& operator>>(wxChar& c); wxTextInputStream& operator>>(char& c);
wxTextInputStream& operator>>(wxInt16& i); wxTextInputStream& operator>>(wxInt16& i);
wxTextInputStream& operator>>(wxInt32& i); wxTextInputStream& operator>>(wxInt32& i);
wxTextInputStream& operator>>(wxUint16& i); wxTextInputStream& operator>>(wxUint16& i);
@@ -90,7 +90,7 @@ public:
wxTextOutputStream& operator<<(const wxChar *string); wxTextOutputStream& operator<<(const wxChar *string);
wxTextOutputStream& operator<<(const wxString& string); wxTextOutputStream& operator<<(const wxString& string);
wxTextOutputStream& operator<<(wxChar c); wxTextOutputStream& operator<<(char c);
wxTextOutputStream& operator<<(wxInt16 c); wxTextOutputStream& operator<<(wxInt16 c);
wxTextOutputStream& operator<<(wxInt32 c); wxTextOutputStream& operator<<(wxInt32 c);
wxTextOutputStream& operator<<(wxUint16 c); wxTextOutputStream& operator<<(wxUint16 c);

View File

@@ -27,6 +27,10 @@
#ifdef WX_PRECOMP #ifdef WX_PRECOMP
// include <wx/wxchar.h> first to ensure that UNICODE macro is correctly set
// _before_ including <windows.h>
#include "wx/wxchar.h"
// include standard Windows headers // include standard Windows headers
#if defined(__WXMSW__) && !wxUSE_MFC #if defined(__WXMSW__) && !wxUSE_MFC
#include <windows.h> #include <windows.h>

View File

@@ -287,7 +287,7 @@ bool wxDocument::OnSaveDocument(const wxString& file)
msgTitle = wxString(_("File error")); msgTitle = wxString(_("File error"));
#if wxUSE_STD_IOSTREAM #if wxUSE_STD_IOSTREAM
ofstream store(wxString(file.fn_str())); ofstream store(wxString(file.fn_str()).mb_str());
if (store.fail() || store.bad()) if (store.fail() || store.bad())
#else #else
wxFileOutputStream store(wxString(file.fn_str())); wxFileOutputStream store(wxString(file.fn_str()));
@@ -323,7 +323,7 @@ bool wxDocument::OnOpenDocument(const wxString& file)
msgTitle = wxString(_("File error")); msgTitle = wxString(_("File error"));
#if wxUSE_STD_IOSTREAM #if wxUSE_STD_IOSTREAM
ifstream store(wxString(file.fn_str())); ifstream store(wxString(file.fn_str()).mb_str());
if (store.fail() || store.bad()) if (store.fail() || store.bad())
#else #else
wxFileInputStream store(wxString(file.fn_str())); wxFileInputStream store(wxString(file.fn_str()));
@@ -2164,7 +2164,7 @@ bool wxTransferFileToStream(const wxString& filename, ostream& stream)
FILE *fd1; FILE *fd1;
int ch; int ch;
if ((fd1 = fopen (filename.fn_str(), "rb")) == NULL) if ((fd1 = wxFopen (filename.fn_str(), _T("rb"))) == NULL)
return FALSE; return FALSE;
while ((ch = getc (fd1)) != EOF) while ((ch = getc (fd1)) != EOF)
@@ -2179,7 +2179,7 @@ bool wxTransferStreamToFile(istream& stream, const wxString& filename)
FILE *fd1; FILE *fd1;
int ch; int ch;
if ((fd1 = fopen (filename.fn_str(), "wb")) == NULL) if ((fd1 = wxFopen (filename.fn_str(), _T("wb"))) == NULL)
{ {
return FALSE; return FALSE;
} }

View File

@@ -87,36 +87,6 @@
#include <sys/stat.h> // stat #include <sys/stat.h> // stat
#endif #endif
// Microsoft compiler loves underscores, feed them to it
#ifdef __VISUALC__
// functions
#define open _open
#define close _close
#define read _read
#define write _write
#define lseek _lseek
#define fsync _commit
#define access _access
#define eof _eof
// types
#define stat _stat
// constants
#define O_RDONLY _O_RDONLY
#define O_WRONLY _O_WRONLY
#define O_RDWR _O_RDWR
#define O_EXCL _O_EXCL
#define O_CREAT _O_CREAT
#define O_BINARY _O_BINARY
#define S_IFDIR _S_IFDIR
#define S_IFREG _S_IFREG
#else
#define tell(fd) lseek(fd, 0, SEEK_CUR)
#endif // VC++
#if defined(__BORLANDC__) || defined(_MSC_VER) #if defined(__BORLANDC__) || defined(_MSC_VER)
#define W_OK 2 #define W_OK 2
#define R_OK 4 #define R_OK 4
@@ -159,23 +129,23 @@
// ---------------------------------------------------------------------------- // ----------------------------------------------------------------------------
bool wxFile::Exists(const wxChar *name) bool wxFile::Exists(const wxChar *name)
{ {
struct stat st; wxStructStat st;
#if wxUSE_UNICODE && wxMBFILES #if wxUSE_UNICODE && wxMBFILES
wxCharBuffer fname = wxConvFile.cWC2MB(name); wxCharBuffer fname = wxConvFile.cWC2MB(name);
#ifdef __WXMAC__ #ifdef __WXMAC__
return !access(wxUnix2MacFilename( name ) , 0) && !stat(wxUnix2MacFilename( name ), &st) && (st.st_mode & S_IFREG); return !access(wxUnix2MacFilename( name ) , 0) && !stat(wxUnix2MacFilename( name ), &st) && (st.st_mode & S_IFREG);
#else #else
return !access(fname, 0) && return !wxAccess(fname, 0) &&
!stat(wxMBSTRINGCAST fname, &st) && !wxStat(wxMBSTRINGCAST fname, &st) &&
(st.st_mode & S_IFREG); (st.st_mode & S_IFREG);
#endif #endif
#else #else
#ifdef __WXMAC__ #ifdef __WXMAC__
return !access(wxUnix2MacFilename( name ) , 0) && !stat(wxUnix2MacFilename( name ), &st) && (st.st_mode & S_IFREG); return !access(wxUnix2MacFilename( name ) , 0) && !stat(wxUnix2MacFilename( name ), &st) && (st.st_mode & S_IFREG);
#else #else
return !access(name, 0) && return !wxAccess(name, 0) &&
!stat(name, &st) && !wxStat(name, &st) &&
(st.st_mode & S_IFREG); (st.st_mode & S_IFREG);
#endif #endif
#endif #endif
@@ -198,7 +168,7 @@ bool wxFile::Access(const wxChar *name, OpenMode mode)
wxFAIL_MSG(wxT("bad wxFile::Access mode parameter.")); wxFAIL_MSG(wxT("bad wxFile::Access mode parameter."));
} }
return access(wxFNCONV(name), how) == 0; return wxAccess(wxFNCONV(name), how) == 0;
} }
// ---------------------------------------------------------------------------- // ----------------------------------------------------------------------------
@@ -222,7 +192,7 @@ bool wxFile::Create(const wxChar *szFileName, bool bOverwrite, int accessMode)
#ifdef __WXMAC__ #ifdef __WXMAC__
int fd = open(wxUnix2MacFilename( szFileName ), O_CREAT | (bOverwrite ? O_TRUNC : O_EXCL), access); int fd = open(wxUnix2MacFilename( szFileName ), O_CREAT | (bOverwrite ? O_TRUNC : O_EXCL), access);
#else #else
int fd = open(wxFNCONV(szFileName), int fd = wxOpen(wxFNCONV(szFileName),
O_BINARY | O_WRONLY | O_CREAT | O_BINARY | O_WRONLY | O_CREAT |
(bOverwrite ? O_TRUNC : O_EXCL) (bOverwrite ? O_TRUNC : O_EXCL)
ACCESS(accessMode)); ACCESS(accessMode));
@@ -263,7 +233,7 @@ bool wxFile::Open(const wxChar *szFileName, OpenMode mode, int accessMode)
#ifdef __WXMAC__ #ifdef __WXMAC__
int fd = open(wxUnix2MacFilename( szFileName ), flags, access); int fd = open(wxUnix2MacFilename( szFileName ), flags, access);
#else #else
int fd = open(wxFNCONV(szFileName), flags ACCESS(accessMode)); int fd = wxOpen(wxFNCONV(szFileName), flags ACCESS(accessMode));
#endif #endif
if ( fd == -1 ) { if ( fd == -1 ) {
wxLogSysError(_("can't open file '%s'"), szFileName); wxLogSysError(_("can't open file '%s'"), szFileName);
@@ -337,7 +307,7 @@ bool wxFile::Flush()
{ {
if ( IsOpened() ) { if ( IsOpened() ) {
#if defined(__VISUALC__) || wxHAVE_FSYNC #if defined(__VISUALC__) || wxHAVE_FSYNC
if ( fsync(m_fd) == -1 ) if ( wxFsync(m_fd) == -1 )
{ {
wxLogSysError(_("can't flush file descriptor %d"), m_fd); wxLogSysError(_("can't flush file descriptor %d"), m_fd);
return FALSE; return FALSE;
@@ -522,7 +492,7 @@ bool wxTempFile::Open(const wxString& strName)
mode_t umaskOld = 0; // just to suppress compiler warning mode_t umaskOld = 0; // just to suppress compiler warning
bool changedUmask; bool changedUmask;
struct stat st; wxStructStat st;
if ( stat(strName.fn_str(), &st) == 0 ) if ( stat(strName.fn_str(), &st) == 0 )
{ {
// this assumes that only lower bits of st_mode contain the access // this assumes that only lower bits of st_mode contain the access
@@ -572,12 +542,12 @@ bool wxTempFile::Commit()
m_file.Close(); m_file.Close();
#ifndef __WXMAC__ #ifndef __WXMAC__
if ( wxFile::Exists(m_strName) && remove(m_strName.fn_str()) != 0 ) { if ( wxFile::Exists(m_strName) && wxRemove(m_strName.fn_str()) != 0 ) {
wxLogSysError(_("can't remove file '%s'"), m_strName.c_str()); wxLogSysError(_("can't remove file '%s'"), m_strName.c_str());
return FALSE; return FALSE;
} }
if ( rename(m_strTemp.fn_str(), m_strName.fn_str()) != 0 ) { if ( wxRename(m_strTemp.fn_str(), m_strName.fn_str()) != 0 ) {
wxLogSysError(_("can't commit changes to file '%s'"), m_strName.c_str()); wxLogSysError(_("can't commit changes to file '%s'"), m_strName.c_str());
return FALSE; return FALSE;
} }
@@ -600,7 +570,7 @@ void wxTempFile::Discard()
{ {
m_file.Close(); m_file.Close();
#ifndef __WXMAC__ #ifndef __WXMAC__
if ( remove(m_strTemp.fn_str()) != 0 ) if ( wxRemove(m_strTemp.fn_str()) != 0 )
wxLogSysError(_("can't remove temporary file '%s'"), m_strTemp.c_str()); wxLogSysError(_("can't remove temporary file '%s'"), m_strTemp.c_str());
#else #else
if ( remove( wxUnix2MacFilename(m_strTemp.fn_str())) != 0 ) if ( remove( wxUnix2MacFilename(m_strTemp.fn_str())) != 0 )

View File

@@ -881,7 +881,7 @@ bool wxFileConfig::DeleteAll()
{ {
CleanUp(); CleanUp();
if ( remove(m_strLocalFile.fn_str()) == -1 ) if ( wxRemove(m_strLocalFile.fn_str()) == -1 )
wxLogSysError(_("can't delete user configuration file '%s'"), m_strLocalFile.c_str()); wxLogSysError(_("can't delete user configuration file '%s'"), m_strLocalFile.c_str());
m_strLocalFile = m_strGlobalFile = wxT(""); m_strLocalFile = m_strGlobalFile = wxT("");

View File

@@ -277,14 +277,10 @@ wxFileExists (const wxString& filename)
return FALSE ; return FALSE ;
#else #else
#ifdef __SALFORDC__ wxStructStat stbuf;
struct _stat stbuf; if ((filename != wxT("")) && wxStat (wxFNSTRINGCAST filename.fn_str(), &stbuf) == 0)
#else
struct stat stbuf;
#endif
if ((filename != wxT("")) && stat (wxFNSTRINGCAST filename.fn_str(), &stbuf) == 0)
return TRUE; return TRUE;
return FALSE; return FALSE;
#endif #endif
} }
@@ -1050,7 +1046,7 @@ wxRenameFile (const wxString& file1, const wxString& file2)
return TRUE; return TRUE;
#else #else
// Normal system call // Normal system call
if (0 == rename (wxFNSTRINGCAST file1.fn_str(), wxFNSTRINGCAST file2.fn_str())) if (0 == wxRename (wxFNSTRINGCAST file1.fn_str(), wxFNSTRINGCAST file2.fn_str()))
return TRUE; return TRUE;
#endif #endif
// Try to copy // Try to copy
@@ -1065,7 +1061,7 @@ wxRenameFile (const wxString& file1, const wxString& file2)
bool wxRemoveFile(const wxString& file) bool wxRemoveFile(const wxString& file)
{ {
#if defined(__VISUALC__) || defined(__BORLANDC__) || defined(__WATCOMC__) #if defined(__VISUALC__) || defined(__BORLANDC__) || defined(__WATCOMC__)
int flag = remove(wxFNSTRINGCAST file.fn_str()); int flag = wxRemove(wxFNSTRINGCAST file.fn_str());
#elif defined( __WXMAC__ ) #elif defined( __WXMAC__ )
int flag = unlink(wxUnix2MacFilename( file )); int flag = unlink(wxUnix2MacFilename( file ));
#else #else
@@ -1086,7 +1082,7 @@ bool wxMkdir(const wxString& dir, int perm)
#if (!(defined(__WXMSW__) || defined(__OS2__))) || (defined(__GNUWIN32__) && !defined(__MINGW32__)) || defined(__WXWINE__) #if (!(defined(__WXMSW__) || defined(__OS2__))) || (defined(__GNUWIN32__) && !defined(__MINGW32__)) || defined(__WXWINE__)
if ( mkdir(wxFNCONV(dirname), perm) != 0 ) if ( mkdir(wxFNCONV(dirname), perm) != 0 )
#else // !MSW and !OS/2 VAC++ #else // !MSW and !OS/2 VAC++
if ( mkdir(wxFNSTRINGCAST wxFNCONV(dirname)) != 0 ) if ( wxMkdir(wxFNSTRINGCAST wxFNCONV(dirname)) != 0 )
#endif // !MSW/MSW #endif // !MSW/MSW
{ {
wxLogSysError(_("Directory '%s' couldn't be created"), dirname); wxLogSysError(_("Directory '%s' couldn't be created"), dirname);
@@ -1109,7 +1105,7 @@ bool wxRmdir(const wxString& dir, int WXUNUSED(flags))
#ifdef __SALFORDC__ #ifdef __SALFORDC__
return FALSE; // What to do? return FALSE; // What to do?
#else #else
return (rmdir(wxFNSTRINGCAST dir.fn_str()) == 0); return (wxRmdir(wxFNSTRINGCAST dir.fn_str()) == 0);
#endif #endif
#endif #endif
@@ -1170,13 +1166,9 @@ bool wxPathExists(const wxChar *pszPathName)
if ( wxEndsWithPathSeparator(pszPathName) && pszPathName[1] != wxT('\0') ) if ( wxEndsWithPathSeparator(pszPathName) && pszPathName[1] != wxT('\0') )
strPath.Last() = wxT('\0'); strPath.Last() = wxT('\0');
#ifdef __SALFORDC__ wxStructStat st;
struct _stat st;
#else
struct stat st;
#endif
return stat(wxFNSTRINGCAST strPath.fn_str(), &st) == 0 && (st.st_mode & S_IFDIR); return wxStat(wxFNSTRINGCAST strPath.fn_str(), &st) == 0 && (st.st_mode & S_IFDIR);
} }
// Get a temporary filename, opening and closing the file. // Get a temporary filename, opening and closing the file.
@@ -1869,9 +1861,9 @@ void WXDLLEXPORT wxSplitPath(const wxChar *pszFileName,
time_t WXDLLEXPORT wxFileModificationTime(const wxString& filename) time_t WXDLLEXPORT wxFileModificationTime(const wxString& filename)
{ {
struct stat buf; wxStructStat buf;
stat(filename.fn_str(), &buf); wxStat(filename.fn_str(), &buf);
return buf.st_mtime; return buf.st_mtime;
} }

View File

@@ -655,7 +655,7 @@ void wxOnAssert(const wxChar *szFile, int nLine, const wxChar *szMsg)
//case wxNO: nothing to do //case wxNO: nothing to do
} }
#else // !GUI, but MSW #else // !GUI, but MSW
switch ( ::MessageBox(NULL, szBuf, "Debug", switch ( ::MessageBox(NULL, szBuf, _T("Debug"),
MB_YESNOCANCEL | MB_ICONSTOP ) ) { MB_YESNOCANCEL | MB_ICONSTOP ) ) {
case IDYES: case IDYES:
Trap(); Trap();

View File

@@ -230,7 +230,7 @@ bool wxResourceTable::ParseResourceFile(const wxString& filename)
#ifdef __WXMAC__ #ifdef __WXMAC__
FILE *fd = fopen(wxUnix2MacFilename(filename.fn_str()), "r"); FILE *fd = fopen(wxUnix2MacFilename(filename.fn_str()), "r");
#else #else
FILE *fd = fopen(filename.fn_str(), "r"); FILE *fd = wxFopen(filename.fn_str(), _T("r"));
#endif #endif
if (!fd) if (!fd)
return FALSE; return FALSE;
@@ -2779,7 +2779,7 @@ bool wxResourceParseIncludeFile(const wxString& f, wxResourceTable *table)
if (!table) if (!table)
table = wxDefaultResourceTable; table = wxDefaultResourceTable;
FILE *fd = fopen(f.fn_str(), "r"); FILE *fd = wxFopen(f.fn_str(), _T("r"));
if (!fd) if (!fd)
{ {
return FALSE; return FALSE;

View File

@@ -108,7 +108,7 @@ bool wxIPV4address::Hostname(const wxString& name)
return FALSE; return FALSE;
} }
return (GAddress_INET_SetHostName(m_address, name.fn_str()) == GSOCK_NOERROR); return (GAddress_INET_SetHostName(m_address, name.mb_str()) == GSOCK_NOERROR);
} }
bool wxIPV4address::Hostname(unsigned long addr) bool wxIPV4address::Hostname(unsigned long addr)
@@ -118,7 +118,7 @@ bool wxIPV4address::Hostname(unsigned long addr)
bool wxIPV4address::Service(const wxString& name) bool wxIPV4address::Service(const wxString& name)
{ {
return (GAddress_INET_SetPortName(m_address, name.fn_str(), "tcp") == GSOCK_NOERROR); return (GAddress_INET_SetPortName(m_address, name.mb_str(), "tcp") == GSOCK_NOERROR);
} }
bool wxIPV4address::Service(unsigned short port) bool wxIPV4address::Service(unsigned short port)

View File

@@ -305,7 +305,7 @@ bool wxTCPConnection::Execute(const wxChar *data, int size, wxIPCFormat format)
m_codeco->Write8(format); m_codeco->Write8(format);
if (size < 0) if (size < 0)
size = strlen(data) + 1; // includes final NUL size = wxStrlen(data) + 1; // includes final NUL
m_codeco->Write32(size); m_codeco->Write32(size);
m_sockstrm->Write(data, size); m_sockstrm->Write(data, size);
@@ -353,7 +353,7 @@ bool wxTCPConnection::Poke (const wxString& item, wxChar *data, int size, wxIPCF
m_codeco->Write8(format); m_codeco->Write8(format);
if (size < 0) if (size < 0)
size = strlen(data) + 1; // includes final NUL size = wxStrlen(data) + 1; // includes final NUL
m_codeco->Write32(size); m_codeco->Write32(size);
m_sockstrm->Write(data, size); m_sockstrm->Write(data, size);
@@ -409,7 +409,7 @@ bool wxTCPConnection::Advise (const wxString& item,
m_codeco->Write8(format); m_codeco->Write8(format);
if (size < 0) if (size < 0)
size = strlen(data) + 1; // includes final NUL size = wxStrlen(data) + 1; // includes final NUL
m_codeco->Write32(size); m_codeco->Write32(size);
m_sockstrm->Write(data, size); m_sockstrm->Write(data, size);

View File

@@ -284,17 +284,19 @@ wxTextInputStream& wxTextInputStream::operator>>(wxString& word)
return *this; return *this;
} }
wxTextInputStream& wxTextInputStream::operator>>(wxChar& c) wxTextInputStream& wxTextInputStream::operator>>(char& c)
{ {
if (!m_input) if (!m_input)
{ {
c = (wxChar) 0; c = 0;
return *this; return *this;
} }
c = m_input.GetC(); c = m_input.GetC();
if (EatEOL(c)) c=wxT('\n'); if (EatEOL(c))
c = '\n';
return *this; return *this;
} }
@@ -444,9 +446,14 @@ wxTextOutputStream& wxTextOutputStream::operator<<(const wxString& string)
return *this; return *this;
} }
wxTextOutputStream& wxTextOutputStream::operator<<(wxChar c) wxTextOutputStream& wxTextOutputStream::operator<<(char c)
{ {
WriteString( wxString(c) ); // these strange manipulations are needed in Unicode mode
char buf[2];
buf[0] = c;
buf[1] = 0;
WriteString( wxString(buf) );
return *this; return *this;
} }

View File

@@ -513,8 +513,8 @@ wxAcceleratorEntry *wxGetAccelFromString(const wxString& label)
else else
#endif // 0 #endif // 0
{ {
wxLogDebug(wxT("Unrecognized accel key '%s', accel " wxLogDebug(wxT("Unrecognized accel key '%s', accel string ignored."),
"string ignored."), current.c_str()); current.c_str());
} }
} }
} }

View File

@@ -992,7 +992,7 @@ bool wxExprDatabase::Read(const wxString& filename)
{ {
noErrors = 0; noErrors = 0;
FILE *f = fopen(filename.fn_str(), "r"); FILE *f = wxFopen(filename.fn_str(), _T("r"));
if (f) if (f)
{ {
thewxExprDatabase = this; thewxExprDatabase = this;
@@ -1024,7 +1024,7 @@ bool wxExprDatabase::ReadFromString(const wxString& buffer)
bool wxExprDatabase::Write(const wxString& fileName) bool wxExprDatabase::Write(const wxString& fileName)
{ {
FILE *stream = fopen( fileName.fn_str(), "w+" ); FILE *stream = wxFopen( fileName.fn_str(), _T("w+"));
if (!stream) if (!stream)
return FALSE; return FALSE;

View File

@@ -483,8 +483,8 @@ void wxLogFrame::OnSave(wxCommandEvent& WXUNUSED(event))
if ( wxFile::Exists(szFileName) ) { if ( wxFile::Exists(szFileName) ) {
bool bAppend = FALSE; bool bAppend = FALSE;
wxString strMsg; wxString strMsg;
strMsg.Printf(_("Append log to file '%s' " strMsg.Printf(_("Append log to file '%s' (choosing [No] will overwrite it)?"),
"(choosing [No] will overwrite it)?"), szFileName); szFileName);
switch ( wxMessageBox(strMsg, _("Question"), wxYES_NO | wxCANCEL) ) { switch ( wxMessageBox(strMsg, _("Question"), wxYES_NO | wxCANCEL) ) {
case wxYES: case wxYES:
bAppend = TRUE; bAppend = TRUE;

View File

@@ -179,7 +179,7 @@ wxPropertyValue::wxPropertyValue(wxStringList *the_list)
wxNode *node = the_list->First(); wxNode *node = the_list->First();
while (node) while (node)
{ {
char *s = (char *)node->Data(); wxChar *s = (wxChar *)node->Data();
Append(new wxPropertyValue(s)); Append(new wxPropertyValue(s));
node = node->Next(); node = node->Next();
} }

View File

@@ -924,27 +924,29 @@ class wxHtmlHelpFrameOptionsDialog : public wxDialog
NormalFont -> GetStringSelection(), NormalFont -> GetStringSelection(),
FixedFont -> GetStringSelection(), FixedFont -> GetStringSelection(),
RadioBox -> GetSelection()); RadioBox -> GetSelection());
TestWin -> SetPage(_("<html><body>" TestWin -> SetPage(_(
"Normal face<br>(and <u>underlined</u>. <i>Italic face.</i> " "<html><body>\
"<b>Bold face.</b> <b><i>Bold italic face.</i></b><br>" Normal face<br>(and <u>underlined</u>. <i>Italic face.</i> \
"<font size=-2>font size -2</font><br>" <b>Bold face.</b> <b><i>Bold italic face.</i></b><br>\
"<font size=-1>font size -1</font><br>" <font size=-2>font size -2</font><br>\
"<font size=+0>font size +0</font><br>" <font size=-1>font size -1</font><br>\
"<font size=+1>font size +1</font><br>" <font size=+0>font size +0</font><br>\
"<font size=+2>font size +2</font><br>" <font size=+1>font size +1</font><br>\
"<font size=+3>font size +3</font><br>" <font size=+2>font size +2</font><br>\
"<font size=+4>font size +4</font><br>" <font size=+3>font size +3</font><br>\
<font size=+4>font size +4</font><br>\
"<p><tt>Fixed size face.<br> <b>bold</b> <i>italic</i> " \
"<b><i>bold italic <u>underlined</u></i></b><br>" <p><tt>Fixed size face.<br> <b>bold</b> <i>italic</i> \
"<font size=-2>font size -2</font><br>" <b><i>bold italic <u>underlined</u></i></b><br>\
"<font size=-1>font size -1</font><br>" <font size=-2>font size -2</font><br>\
"<font size=+0>font size +0</font><br>" <font size=-1>font size -1</font><br>\
"<font size=+1>font size +1</font><br>" <font size=+0>font size +0</font><br>\
"<font size=+2>font size +2</font><br>" <font size=+1>font size +1</font><br>\
"<font size=+3>font size +3</font><br>" <font size=+2>font size +2</font><br>\
"<font size=+4>font size +4</font></tt>" <font size=+3>font size +3</font><br>\
"</body></html>")); <font size=+4>font size +4</font></tt>\
</body></html>"
));
} }
void OnUpdate(wxCommandEvent& event) void OnUpdate(wxCommandEvent& event)
@@ -1178,12 +1180,18 @@ void wxHtmlHelpFrame::OnToolbar(wxCommandEvent& event)
case wxID_HTML_OPENFILE : case wxID_HTML_OPENFILE :
{ {
wxString s = wxFileSelector(_("Open HTML document"), wxEmptyString, wxEmptyString, wxEmptyString, wxString s = wxFileSelector(_("Open HTML document"),
wxT("HTML files (*.htm)|*.htm|HTML files (*.html)|*.html|" wxEmptyString,
"Help books (*.htb)|*.htb|Help books (*.zip)|*.zip|" wxEmptyString,
"HTML Help Project (*.hhp)|*.hhp|" wxEmptyString,
"All files (*.*)|*"), _(
wxOPEN | wxFILE_MUST_EXIST, this); "HTML files (*.htm)|*.htm|HTML files (*.html)|*.html|\
Help books (*.htb)|*.htb|Help books (*.zip)|*.zip|\
HTML Help Project (*.hhp)|*.hhp|\
All files (*.*)|*"
),
wxOPEN | wxFILE_MUST_EXIST,
this);
if (!s.IsEmpty()) if (!s.IsEmpty())
{ {
wxString ext = s.Right(4).Lower(); wxString ext = s.Right(4).Lower();
@@ -1250,9 +1258,10 @@ void wxHtmlHelpFrame::OnIndexFind(wxCommandEvent& event)
for (int i = 0; i < cnt; i++) for (int i = 0; i < cnt; i++)
{ {
wxStrncpy(mybuff, index[i].m_Name, 512); wxStrncpy(mybuff, index[i].m_Name, 512);
mybuff[511] = 0; mybuff[511] = _T('\0');
for (ptr = mybuff; *ptr != 0; ptr++) for (ptr = mybuff; *ptr != 0; ptr++)
if (*ptr >= 'A' && *ptr <= 'Z') *ptr -= 'A' - 'a'; if (*ptr >= _T('A') && *ptr <= _T('Z'))
*ptr -= (wxChar)(_T('A') - _T('a'));
if (wxStrstr(mybuff, cstr) != NULL) { if (wxStrstr(mybuff, cstr) != NULL) {
m_IndexList -> Append(index[i].m_Name, (char*)(index + i)); m_IndexList -> Append(index[i].m_Name, (char*)(index + i));
displ++; displ++;

View File

@@ -133,7 +133,7 @@ wxHtmlWordCell::wxHtmlWordCell(const wxString& word, wxDC& dc) : wxHtmlCell()
if (m_Word.Find(wxT('&')) != -1) if (m_Word.Find(wxT('&')) != -1)
{ {
#define ESCSEQ(escape, subst) \ #define ESCSEQ(escape, subst) \
{ wxT("&"escape";"), wxT("&"escape" "), wxT(subst) } { _T("&") _T(escape) _T(";"), _T("&") _T(escape) _T(" "), _T(subst) }
static wxChar* substitutions[][3] = static wxChar* substitutions[][3] =
{ {
ESCSEQ("quot", "\""), ESCSEQ("quot", "\""),

View File

@@ -1173,7 +1173,7 @@ int wxApp::GetComCtl32Version()
// try to use DllGetVersion() if available in _headers_ // try to use DllGetVersion() if available in _headers_
#ifdef DLLVER_PLATFORM_WINDOWS // defined in shlwapi.h #ifdef DLLVER_PLATFORM_WINDOWS // defined in shlwapi.h
DLLGETVERSIONPROC pfnDllGetVersion = (DLLGETVERSIONPROC) DLLGETVERSIONPROC pfnDllGetVersion = (DLLGETVERSIONPROC)
::GetProcAddress(hModuleComCtl32, _T("DllGetVersion")); ::GetProcAddress(hModuleComCtl32, "DllGetVersion");
if ( pfnDllGetVersion ) if ( pfnDllGetVersion )
{ {
DLLVERSIONINFO dvi; DLLVERSIONINFO dvi;
@@ -1202,11 +1202,7 @@ int wxApp::GetComCtl32Version()
FARPROC theProc = ::GetProcAddress FARPROC theProc = ::GetProcAddress
( (
hModuleComCtl32, hModuleComCtl32,
#if defined(__BORLANDC__) && (__BORLANDC__ <= 0x520)
"InitCommonControlsEx" "InitCommonControlsEx"
#else
_T("InitCommonControlsEx")
#endif
); );
if ( !theProc ) if ( !theProc )
@@ -1221,11 +1217,7 @@ int wxApp::GetComCtl32Version()
theProc = ::GetProcAddress theProc = ::GetProcAddress
( (
hModuleComCtl32, hModuleComCtl32,
#if defined(__BORLANDC__) && (__BORLANDC__ <= 0x520)
"InitializeFlatSB" "InitializeFlatSB"
#else
_T("InitializeFlatSB")
#endif
); );
if ( !theProc ) if ( !theProc )
{ {

View File

@@ -68,8 +68,8 @@ bool wxChoice::Create(wxWindow *parent,
wxASSERT_MSG( !(style & wxCB_DROPDOWN) && wxASSERT_MSG( !(style & wxCB_DROPDOWN) &&
!(style & wxCB_READONLY) && !(style & wxCB_READONLY) &&
!(style & wxCB_SIMPLE), !(style & wxCB_SIMPLE),
wxT("this style flag is ignored by wxChoice, you " _T("this style flag is ignored by wxChoice, you ")
"probably want to use a wxComboBox") ); _T("probably want to use a wxComboBox") );
if ( !MSWCreateControl(wxT("COMBOBOX"), msStyle) ) if ( !MSWCreateControl(wxT("COMBOBOX"), msStyle) )
return FALSE; return FALSE;

View File

@@ -99,7 +99,7 @@ HANDLE ReadIcon( wxChar *szFileName, int *W, int *H)
nDirEntries = 0; nDirEntries = 0;
// Open and read the .ICO file header and the first ICONFILERES // Open and read the .ICO file header and the first ICONFILERES
hFile = _lopen( wxFNCONV(szFileName), OF_READ); hFile = _lopen( wxConvertWX2MB(szFileName), OF_READ);
cbHead = _lread( hFile, (LPSTR)&iconFileHead, sizeof(ICONFILEHEADER)); cbHead = _lread( hFile, (LPSTR)&iconFileHead, sizeof(ICONFILEHEADER));
cbRes = _lread( hFile, (LPSTR)&iconFileRes, sizeof(ICONFILERES)); cbRes = _lread( hFile, (LPSTR)&iconFileRes, sizeof(ICONFILERES));
++nDirEntries; ++nDirEntries;
@@ -346,7 +346,7 @@ HANDLE ReadCur( wxChar *szFileName, LPPOINT lpptHotSpot, int *W, int *H)
nDirEntries = 0; nDirEntries = 0;
// Open and read the .ICO file header and the first ICONFILERES // Open and read the .ICO file header and the first ICONFILERES
hFile = _lopen( wxFNCONV(szFileName), OF_READ); hFile = _lopen( wxConvertWX2MB(szFileName), OF_READ);
cbHead = _lread( hFile, (LPSTR )&curFileHead, sizeof( CURFILEHEADER)); cbHead = _lread( hFile, (LPSTR )&curFileHead, sizeof( CURFILEHEADER));
cbRes = _lread( hFile, (LPSTR )&curFileRes, sizeof( CURFILERES)); cbRes = _lread( hFile, (LPSTR )&curFileRes, sizeof( CURFILERES));
++nDirEntries; ++nDirEntries;

View File

@@ -41,7 +41,7 @@ wxList WXDLLEXPORT wxPendingDelete;
// Currently this can be Win95, Windows, Win32s, WinNT. // Currently this can be Win95, Windows, Win32s, WinNT.
// For some systems, you can't tell until run-time what services you // For some systems, you can't tell until run-time what services you
// have. See wxGetOsVersion, which uses this string if present. // have. See wxGetOsVersion, which uses this string if present.
char *wxOsVersion = NULL; extern wxChar *wxOsVersion = NULL;
int wxPageNumber; int wxPageNumber;

View File

@@ -102,7 +102,7 @@
typedef DWORD (APIENTRY * RASVALIDATEENTRYNAME)( LPCSTR, LPCSTR ); typedef DWORD (APIENTRY * RASVALIDATEENTRYNAME)( LPCSTR, LPCSTR );
typedef DWORD (APIENTRY * RASCONNECTIONNOTIFICATION)( HRASCONN, HANDLE, DWORD ); typedef DWORD (APIENTRY * RASCONNECTIONNOTIFICATION)( HRASCONN, HANDLE, DWORD );
static const char gs_funcSuffix = 'A'; static const wxChar gs_funcSuffix = _T('A');
#else // Unicode #else // Unicode
typedef DWORD (APIENTRY * RASDIAL)( LPRASDIALEXTENSIONS, LPCWSTR, LPRASDIALPARAMSW, DWORD, LPVOID, LPHRASCONN ); typedef DWORD (APIENTRY * RASDIAL)( LPRASDIALEXTENSIONS, LPCWSTR, LPRASDIALPARAMSW, DWORD, LPVOID, LPHRASCONN );
typedef DWORD (APIENTRY * RASENUMCONNECTIONS)( LPRASCONNW, LPDWORD, LPDWORD ); typedef DWORD (APIENTRY * RASENUMCONNECTIONS)( LPRASCONNW, LPDWORD, LPDWORD );
@@ -124,7 +124,7 @@
typedef DWORD (APIENTRY * RASVALIDATEENTRYNAME)( LPCWSTR, LPCWSTR ); typedef DWORD (APIENTRY * RASVALIDATEENTRYNAME)( LPCWSTR, LPCWSTR );
typedef DWORD (APIENTRY * RASCONNECTIONNOTIFICATION)( HRASCONN, HANDLE, DWORD ); typedef DWORD (APIENTRY * RASCONNECTIONNOTIFICATION)( HRASCONN, HANDLE, DWORD );
static const char gs_funcSuffix = 'W'; static const wxChar gs_funcSuffix = _T('W');
#endif // ASCII/Unicode #endif // ASCII/Unicode
// structure passed to the secondary thread // structure passed to the secondary thread
@@ -407,10 +407,12 @@ wxDialUpManagerMSW::wxDialUpManagerMSW()
exit: exit:
if ( funcName ) if ( funcName )
{ {
wxLogError(_("The version of remote access service (RAS) " static const wxChar *msg = wxTRANSLATE(
"installed on this machine is too old, please " "The version of remote access service (RAS) installed on this machine is too\
"upgrade (the following required function is " old, please upgrade (the following required function is missing: %s)."
"missing: %s)."), funcName); );
wxLogError(wxGetTranslation(msg), funcName);
wxDllLoader::UnloadLibrary(ms_dllRas); wxDllLoader::UnloadLibrary(ms_dllRas);
ms_dllRas = 0; ms_dllRas = 0;
@@ -453,8 +455,8 @@ wxString wxDialUpManagerMSW::GetErrorString(DWORD error)
default: default:
{ {
wxLogSysError(dwRet, _("Failed to retrieve text of RAS " wxLogSysError(dwRet,
"error message")); _("Failed to retrieve text of RAS error message"));
wxString msg; wxString msg;
msg.Printf(_("unknown error (error code %08x)."), error); msg.Printf(_("unknown error (error code %08x)."), error);
@@ -530,8 +532,7 @@ HRASCONN wxDialUpManagerMSW::FindActiveConnection()
// connection) - the warning is really needed because this function // connection) - the warning is really needed because this function
// is used, for example, to select the connection to hang up and so // is used, for example, to select the connection to hang up and so
// we may hang up the wrong connection here... // we may hang up the wrong connection here...
wxLogWarning(_("Several active dialup connections found, " wxLogWarning(_("Several active dialup connections found, choosing one randomly."));
"choosing one randomly."));
// fall through // fall through
case 1: case 1:
@@ -759,8 +760,7 @@ bool wxDialUpManagerMSW::Dial(const wxString& nameOfISP,
entryName = wxGetSingleChoice entryName = wxGetSingleChoice
( (
_("Choose ISP to dial"), _("Choose ISP to dial"),
_("Please choose which ISP do you want to " _("Please choose which ISP do you want to connect to"),
"connect to"),
count, count,
strings strings
); );
@@ -778,7 +778,7 @@ bool wxDialUpManagerMSW::Dial(const wxString& nameOfISP,
RASDIALPARAMS rasDialParams; RASDIALPARAMS rasDialParams;
rasDialParams.dwSize = sizeof(rasDialParams); rasDialParams.dwSize = sizeof(rasDialParams);
strncpy(rasDialParams.szEntryName, entryName, RAS_MaxEntryName); wxStrncpy(rasDialParams.szEntryName, entryName, RAS_MaxEntryName);
// do we have the username and password? // do we have the username and password?
if ( !username || !password ) if ( !username || !password )
@@ -800,8 +800,8 @@ bool wxDialUpManagerMSW::Dial(const wxString& nameOfISP,
} }
else else
{ {
strncpy(rasDialParams.szUserName, username, UNLEN); wxStrncpy(rasDialParams.szUserName, username, UNLEN);
strncpy(rasDialParams.szPassword, password, PWLEN); wxStrncpy(rasDialParams.szPassword, password, PWLEN);
} }
// default values for other fields // default values for other fields
@@ -964,9 +964,6 @@ bool wxDialUpManagerMSW::IsAlwaysOnline() const
// there is some connection to the net, see of which type // there is some connection to the net, see of which type
ms_isAlwaysOnline = (flags & INTERNET_CONNECTION_LAN != 0) || ms_isAlwaysOnline = (flags & INTERNET_CONNECTION_LAN != 0) ||
(flags & INTERNET_CONNECTION_PROXY != 0); (flags & INTERNET_CONNECTION_PROXY != 0);
wxLogMessage("InternetGetConnectedState() returned TRUE, "
"flags = %08x", flags);
} }
else else
{ {

View File

@@ -109,7 +109,7 @@ static BOOL WriteDIB(LPTSTR szFile, HANDLE hdib)
if (!hdib) if (!hdib)
return FALSE; return FALSE;
fh = OpenFile(wxFNCONV(szFile), &of, OF_CREATE | OF_READWRITE); fh = OpenFile(wxConvertWX2MB(szFile), &of, OF_CREATE | OF_READWRITE);
if (fh == -1) if (fh == -1)
return FALSE; return FALSE;
@@ -429,7 +429,7 @@ BOOL wxReadDIB(LPTSTR lpFileName, HBITMAP *bitmap, HPALETTE *palette)
/* Open the file and get a handle to it's BITMAPINFO */ /* Open the file and get a handle to it's BITMAPINFO */
fh = OpenFile (wxFNCONV(lpFileName), &of, OF_READ); fh = OpenFile (wxConvertWX2MB(lpFileName), &of, OF_READ);
if (fh == -1) { if (fh == -1) {
wxLogError(_("Can't open file '%s'"), lpFileName); wxLogError(_("Can't open file '%s'"), lpFileName);
return (0); return (0);

View File

@@ -963,8 +963,8 @@ bool wxFileDataObject::SetData(size_t WXUNUSED(size), const void *pData)
m_filenames.Add(str); m_filenames.Add(str);
if ( len2 != len - 1 ) { if ( len2 != len - 1 ) {
wxLogDebug(wxT("In wxFileDropTarget::OnDrop DragQueryFile returned" wxLogDebug(wxT("In wxFileDropTarget::OnDrop DragQueryFile returned\
" %d characters, %d expected."), len2, len - 1); %d characters, %d expected."), len2, len - 1);
} }
} }

View File

@@ -63,16 +63,16 @@ bool IsIidFromList(REFIID riid, const IID *aIids[], size_t nCount)
// ---------------------------------------------------------------------------- // ----------------------------------------------------------------------------
#if defined(__WXDEBUG__) && defined(__VISUALC__) && (__VISUALC__ > 1000) #if defined(__WXDEBUG__) && defined(__VISUALC__) && (__VISUALC__ > 1000)
const char *GetIidName(REFIID riid) const wxChar *GetIidName(REFIID riid)
{ {
// an association between symbolic name and numeric value of an IID // an association between symbolic name and numeric value of an IID
struct KNOWN_IID { struct KNOWN_IID {
const IID *pIid; const IID *pIid;
const char *szName; const wxChar *szName;
}; };
// construct the table containing all known interfaces // construct the table containing all known interfaces
#define ADD_KNOWN_IID(name) { &IID_I##name, #name } #define ADD_KNOWN_IID(name) { &IID_I##name, _T(#name) }
static const KNOWN_IID aKnownIids[] = { static const KNOWN_IID aKnownIids[] = {
ADD_KNOWN_IID(AdviseSink), ADD_KNOWN_IID(AdviseSink),

View File

@@ -645,12 +645,7 @@ bool wxThread::SetConcurrency(size_t level)
if ( hModKernel ) if ( hModKernel )
{ {
pfnSetProcessAffinityMask = (SETPROCESSAFFINITYMASK) pfnSetProcessAffinityMask = (SETPROCESSAFFINITYMASK)
::GetProcAddress(hModKernel, ::GetProcAddress(hModKernel, "SetProcessAffinityMask");
#if defined(__BORLANDC__) && (__BORLANDC__ <= 0x520)
"SetProcessAffinityMask");
#else
_T("SetProcessAffinityMask"));
#endif
} }
// we've discovered a MT version of Win9x! // we've discovered a MT version of Win9x!

View File

@@ -207,7 +207,7 @@ WXHWND wxToolTip::GetToolTipCtrl()
if ( !ms_hwndTT ) if ( !ms_hwndTT )
{ {
ms_hwndTT = (WXHWND)::CreateWindow(TOOLTIPS_CLASS, ms_hwndTT = (WXHWND)::CreateWindow(TOOLTIPS_CLASS,
(LPSTR)NULL, (LPCTSTR)NULL,
TTS_ALWAYSTIP, TTS_ALWAYSTIP,
CW_USEDEFAULT, CW_USEDEFAULT, CW_USEDEFAULT, CW_USEDEFAULT,
CW_USEDEFAULT, CW_USEDEFAULT, CW_USEDEFAULT, CW_USEDEFAULT,

View File

@@ -2640,10 +2640,13 @@ bool wxWindow::HandleDropFiles(WXWPARAM wParam)
DragQueryPoint(hFilesInfo, (LPPOINT) &dropPoint); DragQueryPoint(hFilesInfo, (LPPOINT) &dropPoint);
// Get the total number of files dropped // Get the total number of files dropped
WORD gwFilesDropped = (WORD)DragQueryFile ((HDROP)hFilesInfo, WORD gwFilesDropped = (WORD)::DragQueryFile
(
(HDROP)hFilesInfo,
(UINT)-1, (UINT)-1,
(LPSTR)0, (LPTSTR)0,
(UINT)0); (UINT)0
);
wxString *files = new wxString[gwFilesDropped]; wxString *files = new wxString[gwFilesDropped];
int wIndex; int wIndex;