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:
@@ -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?
|
||||||
|
@@ -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
|
||||||
// ----------------------------------------------------------------------------
|
// ----------------------------------------------------------------------------
|
||||||
|
@@ -85,9 +85,9 @@ 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; \
|
||||||
AddRef(); \
|
AddRef(); \
|
||||||
\
|
\
|
||||||
@@ -96,20 +96,20 @@ bool IsIidFromList(REFIID riid, const IID *aIids[], size_t nCount);
|
|||||||
else { \
|
else { \
|
||||||
*ppv = NULL; \
|
*ppv = NULL; \
|
||||||
\
|
\
|
||||||
return (HRESULT) E_NOINTERFACE; \
|
return (HRESULT) E_NOINTERFACE; \
|
||||||
} \
|
} \
|
||||||
} \
|
} \
|
||||||
\
|
\
|
||||||
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; \
|
||||||
|
@@ -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);
|
||||||
|
@@ -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>
|
||||||
|
@@ -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;
|
||||||
}
|
}
|
||||||
|
@@ -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,10 +192,10 @@ 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));
|
||||||
#endif
|
#endif
|
||||||
if ( fd == -1 ) {
|
if ( fd == -1 ) {
|
||||||
wxLogSysError(_("can't create file '%s'"), szFileName);
|
wxLogSysError(_("can't create file '%s'"), szFileName);
|
||||||
@@ -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 )
|
||||||
|
@@ -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("");
|
||||||
|
@@ -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;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@@ -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();
|
||||||
|
@@ -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;
|
||||||
|
@@ -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)
|
||||||
|
@@ -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);
|
||||||
|
@@ -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;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@@ -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());
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@@ -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;
|
||||||
|
@@ -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;
|
||||||
|
@@ -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();
|
||||||
}
|
}
|
||||||
|
@@ -93,7 +93,7 @@ class wxHtmlHelpHashData : public wxObject
|
|||||||
wxHtmlHelpHashData(int index, wxTreeItemId id) : wxObject()
|
wxHtmlHelpHashData(int index, wxTreeItemId id) : wxObject()
|
||||||
{ m_Index = index; m_Id = id;}
|
{ m_Index = index; m_Id = id;}
|
||||||
~wxHtmlHelpHashData() {}
|
~wxHtmlHelpHashData() {}
|
||||||
|
|
||||||
int m_Index;
|
int m_Index;
|
||||||
wxTreeItemId m_Id;
|
wxTreeItemId m_Id;
|
||||||
};
|
};
|
||||||
@@ -114,7 +114,7 @@ class wxHtmlHelpHtmlWindow : public wxHtmlWindow
|
|||||||
m_Frame -> NotifyPageChanged();
|
m_Frame -> NotifyPageChanged();
|
||||||
}
|
}
|
||||||
|
|
||||||
private:
|
private:
|
||||||
wxHtmlHelpFrame *m_Frame;
|
wxHtmlHelpFrame *m_Frame;
|
||||||
};
|
};
|
||||||
|
|
||||||
@@ -178,7 +178,7 @@ void wxHtmlHelpFrame::Init(wxHtmlHelpData* data)
|
|||||||
m_NormalFonts = m_FixedFonts = NULL;
|
m_NormalFonts = m_FixedFonts = NULL;
|
||||||
m_NormalFace = m_FixedFace = wxEmptyString;
|
m_NormalFace = m_FixedFace = wxEmptyString;
|
||||||
m_FontSize = 1;
|
m_FontSize = 1;
|
||||||
|
|
||||||
#if wxUSE_PRINTING_ARCHITECTURE
|
#if wxUSE_PRINTING_ARCHITECTURE
|
||||||
m_Printer = NULL;
|
m_Printer = NULL;
|
||||||
#endif
|
#endif
|
||||||
@@ -217,8 +217,8 @@ bool wxHtmlHelpFrame::Create(wxWindow* parent, wxWindowID id, const wxString& ti
|
|||||||
|
|
||||||
// toolbar?
|
// toolbar?
|
||||||
if (style & (wxHF_TOOLBAR | wxHF_FLATTOOLBAR)) {
|
if (style & (wxHF_TOOLBAR | wxHF_FLATTOOLBAR)) {
|
||||||
wxToolBar *toolBar = CreateToolBar(wxNO_BORDER | wxTB_HORIZONTAL |
|
wxToolBar *toolBar = CreateToolBar(wxNO_BORDER | wxTB_HORIZONTAL |
|
||||||
wxTB_DOCKABLE |
|
wxTB_DOCKABLE |
|
||||||
(style & wxHF_FLATTOOLBAR ? wxTB_FLAT : 0));
|
(style & wxHF_FLATTOOLBAR ? wxTB_FLAT : 0));
|
||||||
toolBar->SetMargins( 2, 2 );
|
toolBar->SetMargins( 2, 2 );
|
||||||
AddToolbarButtons(toolBar, style);
|
AddToolbarButtons(toolBar, style);
|
||||||
@@ -435,7 +435,7 @@ bool wxHtmlHelpFrame::Create(wxWindow* parent, wxWindowID id, const wxString& ti
|
|||||||
m_SearchPage = notebook_page++;
|
m_SearchPage = notebook_page++;
|
||||||
}
|
}
|
||||||
m_HtmlWin -> Show(TRUE);
|
m_HtmlWin -> Show(TRUE);
|
||||||
|
|
||||||
RefreshLists();
|
RefreshLists();
|
||||||
|
|
||||||
// showtime
|
// showtime
|
||||||
@@ -516,7 +516,7 @@ void wxHtmlHelpFrame::AddToolbarButtons(wxToolBar *toolBar, int style)
|
|||||||
|
|
||||||
if ((style & wxHF_PRINT) || (style & wxHF_OPENFILES))
|
if ((style & wxHF_PRINT) || (style & wxHF_OPENFILES))
|
||||||
toolBar -> AddSeparator();
|
toolBar -> AddSeparator();
|
||||||
|
|
||||||
if (style & wxHF_OPENFILES)
|
if (style & wxHF_OPENFILES)
|
||||||
toolBar -> AddTool(wxID_HTML_OPENFILE, wopenBitmap, wxNullBitmap,
|
toolBar -> AddTool(wxID_HTML_OPENFILE, wopenBitmap, wxNullBitmap,
|
||||||
FALSE, -1, -1, (wxObject *) NULL,
|
FALSE, -1, -1, (wxObject *) NULL,
|
||||||
@@ -621,8 +621,8 @@ bool wxHtmlHelpFrame::KeywordSearch(const wxString& keyword)
|
|||||||
if (m_SearchChoice->GetSelection() != 0)
|
if (m_SearchChoice->GetSelection() != 0)
|
||||||
book = m_SearchChoice->GetStringSelection();
|
book = m_SearchChoice->GetStringSelection();
|
||||||
|
|
||||||
wxHtmlSearchStatus status(m_Data, keyword,
|
wxHtmlSearchStatus status(m_Data, keyword,
|
||||||
m_SearchCaseSensitive -> GetValue(), m_SearchWholeWords -> GetValue(),
|
m_SearchCaseSensitive -> GetValue(), m_SearchWholeWords -> GetValue(),
|
||||||
book);
|
book);
|
||||||
|
|
||||||
wxProgressDialog progress(_("Searching..."), _("No matching page found yet"),
|
wxProgressDialog progress(_("Searching..."), _("No matching page found yet"),
|
||||||
@@ -645,7 +645,7 @@ bool wxHtmlHelpFrame::KeywordSearch(const wxString& keyword)
|
|||||||
m_SearchText -> SetFocus();
|
m_SearchText -> SetFocus();
|
||||||
if (foundcnt) {
|
if (foundcnt) {
|
||||||
wxHtmlContentsItem *it = (wxHtmlContentsItem*) m_SearchList -> GetClientData(0);
|
wxHtmlContentsItem *it = (wxHtmlContentsItem*) m_SearchList -> GetClientData(0);
|
||||||
if (it)
|
if (it)
|
||||||
{
|
{
|
||||||
m_HtmlWin -> LoadPage(it -> m_Book -> GetBasePath() + it -> m_Page);
|
m_HtmlWin -> LoadPage(it -> m_Book -> GetBasePath() + it -> m_Page);
|
||||||
NotifyPageChanged();
|
NotifyPageChanged();
|
||||||
@@ -662,7 +662,7 @@ void wxHtmlHelpFrame::CreateContents()
|
|||||||
return ;
|
return ;
|
||||||
|
|
||||||
m_ContentsBox->Clear();
|
m_ContentsBox->Clear();
|
||||||
|
|
||||||
if (m_PagesHash) delete m_PagesHash;
|
if (m_PagesHash) delete m_PagesHash;
|
||||||
m_PagesHash = new wxHashTable(wxKEY_STRING, 2 * m_Data -> GetContentsCnt());
|
m_PagesHash = new wxHashTable(wxKEY_STRING, 2 * m_Data -> GetContentsCnt());
|
||||||
m_PagesHash -> DeleteContents(TRUE);
|
m_PagesHash -> DeleteContents(TRUE);
|
||||||
@@ -685,7 +685,7 @@ void wxHtmlHelpFrame::CreateContents()
|
|||||||
roots[it -> m_Level + 1] = m_ContentsBox -> AppendItem(
|
roots[it -> m_Level + 1] = m_ContentsBox -> AppendItem(
|
||||||
roots[it -> m_Level], it -> m_Name, IMG_Page, -1,
|
roots[it -> m_Level], it -> m_Name, IMG_Page, -1,
|
||||||
new wxHtmlHelpTreeItemData(i));
|
new wxHtmlHelpTreeItemData(i));
|
||||||
m_PagesHash -> Put(it -> m_Book -> GetBasePath() + it -> m_Page,
|
m_PagesHash -> Put(it -> m_Book -> GetBasePath() + it -> m_Page,
|
||||||
new wxHtmlHelpHashData(i, roots[it -> m_Level + 1]));
|
new wxHtmlHelpHashData(i, roots[it -> m_Level + 1]));
|
||||||
|
|
||||||
if (it -> m_Level == 0) {
|
if (it -> m_Level == 0) {
|
||||||
@@ -713,16 +713,16 @@ void wxHtmlHelpFrame::CreateIndex()
|
|||||||
m_IndexList->Clear();
|
m_IndexList->Clear();
|
||||||
|
|
||||||
int cnt = m_Data->GetIndexCnt();
|
int cnt = m_Data->GetIndexCnt();
|
||||||
|
|
||||||
wxString cnttext;
|
wxString cnttext;
|
||||||
if (cnt > INDEX_IS_SMALL) cnttext.Printf(_("%i of %i"), 0, cnt);
|
if (cnt > INDEX_IS_SMALL) cnttext.Printf(_("%i of %i"), 0, cnt);
|
||||||
else cnttext.Printf(_("%i of %i"), cnt, cnt);
|
else cnttext.Printf(_("%i of %i"), cnt, cnt);
|
||||||
m_IndexCountInfo -> SetLabel(cnttext);
|
m_IndexCountInfo -> SetLabel(cnttext);
|
||||||
if (cnt > INDEX_IS_SMALL) return;
|
if (cnt > INDEX_IS_SMALL) return;
|
||||||
|
|
||||||
wxHtmlContentsItem* index = m_Data->GetIndex();
|
wxHtmlContentsItem* index = m_Data->GetIndex();
|
||||||
|
|
||||||
for (int i = 0; i < cnt; i++)
|
for (int i = 0; i < cnt; i++)
|
||||||
m_IndexList -> Append(index[i].m_Name, (char*)(index + i));
|
m_IndexList -> Append(index[i].m_Name, (char*)(index + i));
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -773,7 +773,7 @@ void wxHtmlHelpFrame::ReadCustomization(wxConfigBase *cfg, const wxString& path)
|
|||||||
int i;
|
int i;
|
||||||
int cnt;
|
int cnt;
|
||||||
wxString val, s;
|
wxString val, s;
|
||||||
|
|
||||||
cnt = cfg -> Read(wxT("hcBookmarksCnt"), 0L);
|
cnt = cfg -> Read(wxT("hcBookmarksCnt"), 0L);
|
||||||
if (cnt != 0) {
|
if (cnt != 0) {
|
||||||
m_BookmarksNames.Clear();
|
m_BookmarksNames.Clear();
|
||||||
@@ -782,7 +782,7 @@ void wxHtmlHelpFrame::ReadCustomization(wxConfigBase *cfg, const wxString& path)
|
|||||||
m_Bookmarks -> Clear();
|
m_Bookmarks -> Clear();
|
||||||
m_Bookmarks -> Append(_("(bookmarks)"));
|
m_Bookmarks -> Append(_("(bookmarks)"));
|
||||||
}
|
}
|
||||||
|
|
||||||
for (i = 0; i < cnt; i++) {
|
for (i = 0; i < cnt; i++) {
|
||||||
val.Printf(wxT("hcBookmark_%i"), i);
|
val.Printf(wxT("hcBookmark_%i"), i);
|
||||||
s = cfg -> Read(val);
|
s = cfg -> Read(val);
|
||||||
@@ -821,12 +821,12 @@ void wxHtmlHelpFrame::WriteCustomization(wxConfigBase *cfg, const wxString& path
|
|||||||
cfg -> Write(wxT("hcFixedFace"), m_FixedFace);
|
cfg -> Write(wxT("hcFixedFace"), m_FixedFace);
|
||||||
cfg -> Write(wxT("hcNormalFace"), m_NormalFace);
|
cfg -> Write(wxT("hcNormalFace"), m_NormalFace);
|
||||||
cfg -> Write(wxT("hcFontSize"), (long)m_FontSize);
|
cfg -> Write(wxT("hcFontSize"), (long)m_FontSize);
|
||||||
|
|
||||||
if (m_Bookmarks) {
|
if (m_Bookmarks) {
|
||||||
int i;
|
int i;
|
||||||
int cnt = m_BookmarksNames.GetCount();
|
int cnt = m_BookmarksNames.GetCount();
|
||||||
wxString val;
|
wxString val;
|
||||||
|
|
||||||
cfg -> Write(wxT("hcBookmarksCnt"), (long)cnt);
|
cfg -> Write(wxT("hcBookmarksCnt"), (long)cnt);
|
||||||
for (i = 0; i < cnt; i++) {
|
for (i = 0; i < cnt; i++) {
|
||||||
val.Printf(wxT("hcBookmark_%i"), i);
|
val.Printf(wxT("hcBookmark_%i"), i);
|
||||||
@@ -849,7 +849,7 @@ void wxHtmlHelpFrame::WriteCustomization(wxConfigBase *cfg, const wxString& path
|
|||||||
|
|
||||||
static void SetFontsToHtmlWin(wxHtmlWindow *win, wxString scalf, wxString fixf, int size)
|
static void SetFontsToHtmlWin(wxHtmlWindow *win, wxString scalf, wxString fixf, int size)
|
||||||
{
|
{
|
||||||
static int f_sizes[5][7] =
|
static int f_sizes[5][7] =
|
||||||
{
|
{
|
||||||
{ 6, 7, 9, 12, 14, 16, 19},
|
{ 6, 7, 9, 12, 14, 16, 19},
|
||||||
{ 8, 9, 12, 14, 16, 19, 22},
|
{ 8, 9, 12, 14, 16, 19, 22},
|
||||||
@@ -879,30 +879,30 @@ class wxHtmlHelpFrameOptionsDialog : public wxDialog
|
|||||||
sizer = new wxBoxSizer(wxHORIZONTAL);
|
sizer = new wxBoxSizer(wxHORIZONTAL);
|
||||||
|
|
||||||
sizer2 = new wxStaticBoxSizer( new wxStaticBox(this, -1, _("Normal font:")), wxVERTICAL);
|
sizer2 = new wxStaticBoxSizer( new wxStaticBox(this, -1, _("Normal font:")), wxVERTICAL);
|
||||||
sizer2 -> Add(NormalFont = new wxComboBox(this, -1, wxEmptyString, wxDefaultPosition,
|
sizer2 -> Add(NormalFont = new wxComboBox(this, -1, wxEmptyString, wxDefaultPosition,
|
||||||
wxSize(200, 200),
|
wxSize(200, 200),
|
||||||
0, NULL, wxCB_DROPDOWN | wxCB_READONLY),
|
0, NULL, wxCB_DROPDOWN | wxCB_READONLY),
|
||||||
1, wxEXPAND | wxLEFT | wxRIGHT, 10);
|
1, wxEXPAND | wxLEFT | wxRIGHT, 10);
|
||||||
|
|
||||||
sizer -> Add(sizer2, 0, wxEXPAND | wxLEFT|wxRIGHT|wxTOP, 10);
|
sizer -> Add(sizer2, 0, wxEXPAND | wxLEFT|wxRIGHT|wxTOP, 10);
|
||||||
|
|
||||||
sizer2 = new wxStaticBoxSizer( new wxStaticBox(this, -1, _("Fixed font:")), wxVERTICAL);
|
sizer2 = new wxStaticBoxSizer( new wxStaticBox(this, -1, _("Fixed font:")), wxVERTICAL);
|
||||||
sizer2 -> Add(FixedFont = new wxComboBox(this, -1, wxEmptyString, wxDefaultPosition,
|
sizer2 -> Add(FixedFont = new wxComboBox(this, -1, wxEmptyString, wxDefaultPosition,
|
||||||
wxSize(200, 200),
|
wxSize(200, 200),
|
||||||
0, NULL, wxCB_DROPDOWN | wxCB_READONLY),
|
0, NULL, wxCB_DROPDOWN | wxCB_READONLY),
|
||||||
1, wxEXPAND | wxLEFT | wxRIGHT, 10);
|
1, wxEXPAND | wxLEFT | wxRIGHT, 10);
|
||||||
|
|
||||||
sizer -> Add(sizer2, 0, wxEXPAND | wxLEFT|wxRIGHT|wxTOP, 10);
|
sizer -> Add(sizer2, 0, wxEXPAND | wxLEFT|wxRIGHT|wxTOP, 10);
|
||||||
|
|
||||||
topsizer -> Add(sizer);
|
topsizer -> Add(sizer);
|
||||||
|
|
||||||
topsizer -> Add(RadioBox = new wxRadioBox(this, -1, _("Font size:"),
|
topsizer -> Add(RadioBox = new wxRadioBox(this, -1, _("Font size:"),
|
||||||
wxDefaultPosition, wxDefaultSize, 5, choices, 5),
|
wxDefaultPosition, wxDefaultSize, 5, choices, 5),
|
||||||
0, wxEXPAND | wxLEFT|wxRIGHT|wxTOP, 10);
|
0, wxEXPAND | wxLEFT|wxRIGHT|wxTOP, 10);
|
||||||
|
|
||||||
topsizer -> Add(new wxStaticText(this, -1, _("Preview:")),
|
topsizer -> Add(new wxStaticText(this, -1, _("Preview:")),
|
||||||
0, wxLEFT | wxTOP, 10);
|
0, wxLEFT | wxTOP, 10);
|
||||||
topsizer -> Add(TestWin = new wxHtmlWindow(this, -1, wxDefaultPosition, wxSize(-1, 150)),
|
topsizer -> Add(TestWin = new wxHtmlWindow(this, -1, wxDefaultPosition, wxSize(-1, 150)),
|
||||||
1, wxEXPAND | wxLEFT|wxTOP|wxRIGHT, 10);
|
1, wxEXPAND | wxLEFT|wxTOP|wxRIGHT, 10);
|
||||||
|
|
||||||
sizer = new wxBoxSizer(wxHORIZONTAL);
|
sizer = new wxBoxSizer(wxHORIZONTAL);
|
||||||
@@ -915,36 +915,38 @@ class wxHtmlHelpFrameOptionsDialog : public wxDialog
|
|||||||
topsizer -> Fit(this);
|
topsizer -> Fit(this);
|
||||||
Centre(wxBOTH);
|
Centre(wxBOTH);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
void UpdateTestWin()
|
void UpdateTestWin()
|
||||||
{
|
{
|
||||||
wxBusyCursor bcur;
|
wxBusyCursor bcur;
|
||||||
SetFontsToHtmlWin(TestWin,
|
SetFontsToHtmlWin(TestWin,
|
||||||
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)
|
||||||
@@ -965,7 +967,7 @@ void wxHtmlHelpFrame::OptionsDialog()
|
|||||||
{
|
{
|
||||||
wxHtmlHelpFrameOptionsDialog dlg(this);
|
wxHtmlHelpFrameOptionsDialog dlg(this);
|
||||||
unsigned i;
|
unsigned i;
|
||||||
|
|
||||||
if (m_NormalFonts == NULL) {
|
if (m_NormalFonts == NULL) {
|
||||||
wxFontEnumerator enu;
|
wxFontEnumerator enu;
|
||||||
enu.EnumerateFacenames();
|
enu.EnumerateFacenames();
|
||||||
@@ -980,7 +982,7 @@ void wxHtmlHelpFrame::OptionsDialog()
|
|||||||
*m_FixedFonts = *enu.GetFacenames();
|
*m_FixedFonts = *enu.GetFacenames();
|
||||||
m_FixedFonts -> Sort();
|
m_FixedFonts -> Sort();
|
||||||
}
|
}
|
||||||
|
|
||||||
for (i = 0; i < m_NormalFonts -> GetCount(); i++)
|
for (i = 0; i < m_NormalFonts -> GetCount(); i++)
|
||||||
dlg.NormalFont -> Append((*m_NormalFonts)[i]);
|
dlg.NormalFont -> Append((*m_NormalFonts)[i]);
|
||||||
for (i = 0; i < m_FixedFonts -> GetCount(); i++)
|
for (i = 0; i < m_FixedFonts -> GetCount(); i++)
|
||||||
@@ -991,7 +993,7 @@ void wxHtmlHelpFrame::OptionsDialog()
|
|||||||
else dlg.FixedFont -> SetSelection(0);
|
else dlg.FixedFont -> SetSelection(0);
|
||||||
dlg.RadioBox -> SetSelection(m_FontSize);
|
dlg.RadioBox -> SetSelection(m_FontSize);
|
||||||
dlg.UpdateTestWin();
|
dlg.UpdateTestWin();
|
||||||
|
|
||||||
if (dlg.ShowModal() == wxID_OK) {
|
if (dlg.ShowModal() == wxID_OK) {
|
||||||
m_NormalFace = dlg.NormalFont -> GetStringSelection();
|
m_NormalFace = dlg.NormalFont -> GetStringSelection();
|
||||||
m_FixedFace = dlg.FixedFont -> GetStringSelection();
|
m_FixedFace = dlg.FixedFont -> GetStringSelection();
|
||||||
@@ -1043,9 +1045,9 @@ void wxHtmlHelpFrame::OnToolbar(wxCommandEvent& event)
|
|||||||
m_HtmlWin -> HistoryForward();
|
m_HtmlWin -> HistoryForward();
|
||||||
NotifyPageChanged();
|
NotifyPageChanged();
|
||||||
break;
|
break;
|
||||||
|
|
||||||
case wxID_HTML_UP :
|
case wxID_HTML_UP :
|
||||||
if (m_PagesHash)
|
if (m_PagesHash)
|
||||||
{
|
{
|
||||||
wxString an = m_HtmlWin -> GetOpenedAnchor();
|
wxString an = m_HtmlWin -> GetOpenedAnchor();
|
||||||
wxHtmlHelpHashData *ha;
|
wxHtmlHelpHashData *ha;
|
||||||
@@ -1062,8 +1064,8 @@ void wxHtmlHelpFrame::OnToolbar(wxCommandEvent& event)
|
|||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
|
|
||||||
case wxID_HTML_UPNODE :
|
case wxID_HTML_UPNODE :
|
||||||
if (m_PagesHash)
|
if (m_PagesHash)
|
||||||
{
|
{
|
||||||
wxString an = m_HtmlWin -> GetOpenedAnchor();
|
wxString an = m_HtmlWin -> GetOpenedAnchor();
|
||||||
wxHtmlHelpHashData *ha;
|
wxHtmlHelpHashData *ha;
|
||||||
@@ -1076,7 +1078,7 @@ void wxHtmlHelpFrame::OnToolbar(wxCommandEvent& event)
|
|||||||
int level = m_Data -> GetContents()[ha -> m_Index].m_Level - 1;
|
int level = m_Data -> GetContents()[ha -> m_Index].m_Level - 1;
|
||||||
wxHtmlContentsItem *it;
|
wxHtmlContentsItem *it;
|
||||||
int ind = ha -> m_Index - 1;
|
int ind = ha -> m_Index - 1;
|
||||||
|
|
||||||
it = m_Data -> GetContents() + ind;
|
it = m_Data -> GetContents() + ind;
|
||||||
while (ind >= 0 && it -> m_Level != level) ind--, it--;
|
while (ind >= 0 && it -> m_Level != level) ind--, it--;
|
||||||
if (ind >= 0)
|
if (ind >= 0)
|
||||||
@@ -1088,13 +1090,13 @@ void wxHtmlHelpFrame::OnToolbar(wxCommandEvent& event)
|
|||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
|
|
||||||
case wxID_HTML_DOWN :
|
case wxID_HTML_DOWN :
|
||||||
if (m_PagesHash)
|
if (m_PagesHash)
|
||||||
{
|
{
|
||||||
wxString an = m_HtmlWin -> GetOpenedAnchor();
|
wxString an = m_HtmlWin -> GetOpenedAnchor();
|
||||||
wxString adr;
|
wxString adr;
|
||||||
wxHtmlHelpHashData *ha;
|
wxHtmlHelpHashData *ha;
|
||||||
|
|
||||||
if (an.IsEmpty()) adr = m_HtmlWin -> GetOpenedPage();
|
if (an.IsEmpty()) adr = m_HtmlWin -> GetOpenedPage();
|
||||||
else adr = m_HtmlWin -> GetOpenedPage() + wxT("#") + an;
|
else adr = m_HtmlWin -> GetOpenedPage() + wxT("#") + an;
|
||||||
|
|
||||||
@@ -1103,7 +1105,7 @@ void wxHtmlHelpFrame::OnToolbar(wxCommandEvent& event)
|
|||||||
if (ha && ha -> m_Index < m_Data -> GetContentsCnt() - 1)
|
if (ha && ha -> m_Index < m_Data -> GetContentsCnt() - 1)
|
||||||
{
|
{
|
||||||
wxHtmlContentsItem *it = m_Data -> GetContents() + (ha -> m_Index + 1);
|
wxHtmlContentsItem *it = m_Data -> GetContents() + (ha -> m_Index + 1);
|
||||||
|
|
||||||
while (it -> m_Book -> GetBasePath() + it -> m_Page == adr) it++;
|
while (it -> m_Book -> GetBasePath() + it -> m_Page == adr) it++;
|
||||||
m_HtmlWin -> LoadPage(it -> m_Book -> GetBasePath() + it -> m_Page);
|
m_HtmlWin -> LoadPage(it -> m_Book -> GetBasePath() + it -> m_Page);
|
||||||
NotifyPageChanged();
|
NotifyPageChanged();
|
||||||
@@ -1131,12 +1133,12 @@ void wxHtmlHelpFrame::OnToolbar(wxCommandEvent& event)
|
|||||||
case wxID_HTML_OPTIONS :
|
case wxID_HTML_OPTIONS :
|
||||||
OptionsDialog();
|
OptionsDialog();
|
||||||
break;
|
break;
|
||||||
|
|
||||||
case wxID_HTML_BOOKMARKSADD :
|
case wxID_HTML_BOOKMARKSADD :
|
||||||
{
|
{
|
||||||
wxString item;
|
wxString item;
|
||||||
wxString url;
|
wxString url;
|
||||||
|
|
||||||
item = m_HtmlWin -> GetOpenedPageTitle();
|
item = m_HtmlWin -> GetOpenedPageTitle();
|
||||||
url = m_HtmlWin -> GetOpenedPage();
|
url = m_HtmlWin -> GetOpenedPage();
|
||||||
if (item == wxEmptyString) item = url.AfterLast(wxT('/'));
|
if (item == wxEmptyString) item = url.AfterLast(wxT('/'));
|
||||||
@@ -1147,12 +1149,12 @@ void wxHtmlHelpFrame::OnToolbar(wxCommandEvent& event)
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
|
|
||||||
case wxID_HTML_BOOKMARKSREMOVE :
|
case wxID_HTML_BOOKMARKSREMOVE :
|
||||||
{
|
{
|
||||||
wxString item;
|
wxString item;
|
||||||
int pos;
|
int pos;
|
||||||
|
|
||||||
item = m_Bookmarks -> GetStringSelection();
|
item = m_Bookmarks -> GetStringSelection();
|
||||||
pos = m_BookmarksNames.Index(item);
|
pos = m_BookmarksNames.Index(item);
|
||||||
if (pos != wxNOT_FOUND) {
|
if (pos != wxNOT_FOUND) {
|
||||||
@@ -1166,7 +1168,7 @@ void wxHtmlHelpFrame::OnToolbar(wxCommandEvent& event)
|
|||||||
#if wxUSE_PRINTING_ARCHITECTURE
|
#if wxUSE_PRINTING_ARCHITECTURE
|
||||||
case wxID_HTML_PRINT :
|
case wxID_HTML_PRINT :
|
||||||
{
|
{
|
||||||
if (m_Printer == NULL)
|
if (m_Printer == NULL)
|
||||||
m_Printer = new wxHtmlEasyPrinting(_("Help Printing"), this);
|
m_Printer = new wxHtmlEasyPrinting(_("Help Printing"), this);
|
||||||
if (!m_HtmlWin -> GetOpenedPage())
|
if (!m_HtmlWin -> GetOpenedPage())
|
||||||
wxLogWarning(_("Cannot print empty page."));
|
wxLogWarning(_("Cannot print empty page."));
|
||||||
@@ -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();
|
||||||
@@ -1209,8 +1217,8 @@ void wxHtmlHelpFrame::OnContentsSel(wxTreeEvent& event)
|
|||||||
wxHtmlContentsItem *it;
|
wxHtmlContentsItem *it;
|
||||||
|
|
||||||
pg = (wxHtmlHelpTreeItemData*) m_ContentsBox -> GetItemData(event.GetItem());
|
pg = (wxHtmlHelpTreeItemData*) m_ContentsBox -> GetItemData(event.GetItem());
|
||||||
|
|
||||||
if (pg && m_UpdateContents)
|
if (pg && m_UpdateContents)
|
||||||
{
|
{
|
||||||
it = m_Data -> GetContents() + (pg -> m_Id);
|
it = m_Data -> GetContents() + (pg -> m_Id);
|
||||||
m_UpdateContents = FALSE;
|
m_UpdateContents = FALSE;
|
||||||
@@ -1233,7 +1241,7 @@ void wxHtmlHelpFrame::OnIndexFind(wxCommandEvent& event)
|
|||||||
{
|
{
|
||||||
wxString sr = m_IndexText -> GetLineText(0);
|
wxString sr = m_IndexText -> GetLineText(0);
|
||||||
sr.MakeLower();
|
sr.MakeLower();
|
||||||
if (sr == wxEmptyString)
|
if (sr == wxEmptyString)
|
||||||
OnIndexAll(event);
|
OnIndexAll(event);
|
||||||
|
|
||||||
else {
|
else {
|
||||||
@@ -1241,7 +1249,7 @@ void wxHtmlHelpFrame::OnIndexFind(wxCommandEvent& event)
|
|||||||
const wxChar *cstr = sr.c_str();
|
const wxChar *cstr = sr.c_str();
|
||||||
wxChar mybuff[512], *ptr;
|
wxChar mybuff[512], *ptr;
|
||||||
bool first = TRUE;
|
bool first = TRUE;
|
||||||
|
|
||||||
m_IndexList->Clear();
|
m_IndexList->Clear();
|
||||||
int cnt = m_Data->GetIndexCnt();
|
int cnt = m_Data->GetIndexCnt();
|
||||||
wxHtmlContentsItem* index = m_Data->GetIndex();
|
wxHtmlContentsItem* index = m_Data->GetIndex();
|
||||||
@@ -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++;
|
||||||
@@ -1276,7 +1285,7 @@ void wxHtmlHelpFrame::OnIndexFind(wxCommandEvent& event)
|
|||||||
void wxHtmlHelpFrame::OnIndexAll(wxCommandEvent& WXUNUSED(event))
|
void wxHtmlHelpFrame::OnIndexAll(wxCommandEvent& WXUNUSED(event))
|
||||||
{
|
{
|
||||||
wxBusyCursor bcur;
|
wxBusyCursor bcur;
|
||||||
|
|
||||||
m_IndexList->Clear();
|
m_IndexList->Clear();
|
||||||
int cnt = m_Data->GetIndexCnt();
|
int cnt = m_Data->GetIndexCnt();
|
||||||
bool first = TRUE;
|
bool first = TRUE;
|
||||||
@@ -1300,7 +1309,7 @@ void wxHtmlHelpFrame::OnIndexAll(wxCommandEvent& WXUNUSED(event))
|
|||||||
void wxHtmlHelpFrame::OnSearchSel(wxCommandEvent& WXUNUSED(event))
|
void wxHtmlHelpFrame::OnSearchSel(wxCommandEvent& WXUNUSED(event))
|
||||||
{
|
{
|
||||||
wxHtmlContentsItem *it = (wxHtmlContentsItem*) m_SearchList -> GetClientData(m_SearchList -> GetSelection());
|
wxHtmlContentsItem *it = (wxHtmlContentsItem*) m_SearchList -> GetClientData(m_SearchList -> GetSelection());
|
||||||
if (it)
|
if (it)
|
||||||
{
|
{
|
||||||
m_HtmlWin -> LoadPage(it -> m_Book -> GetBasePath() + it -> m_Page);
|
m_HtmlWin -> LoadPage(it -> m_Book -> GetBasePath() + it -> m_Page);
|
||||||
NotifyPageChanged();
|
NotifyPageChanged();
|
||||||
@@ -1356,7 +1365,7 @@ BEGIN_EVENT_TABLE(wxHtmlHelpFrame, wxFrame)
|
|||||||
EVT_TEXT_ENTER(wxID_HTML_INDEXTEXT, wxHtmlHelpFrame::OnIndexFind)
|
EVT_TEXT_ENTER(wxID_HTML_INDEXTEXT, wxHtmlHelpFrame::OnIndexFind)
|
||||||
EVT_BUTTON(wxID_HTML_INDEXBUTTONALL, wxHtmlHelpFrame::OnIndexAll)
|
EVT_BUTTON(wxID_HTML_INDEXBUTTONALL, wxHtmlHelpFrame::OnIndexAll)
|
||||||
EVT_COMBOBOX(wxID_HTML_BOOKMARKSLIST, wxHtmlHelpFrame::OnBookmarksSel)
|
EVT_COMBOBOX(wxID_HTML_BOOKMARKSLIST, wxHtmlHelpFrame::OnBookmarksSel)
|
||||||
EVT_CLOSE(wxHtmlHelpFrame::OnCloseWindow)
|
EVT_CLOSE(wxHtmlHelpFrame::OnCloseWindow)
|
||||||
END_EVENT_TABLE()
|
END_EVENT_TABLE()
|
||||||
|
|
||||||
#endif
|
#endif
|
||||||
|
@@ -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", "\""),
|
||||||
|
@@ -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 )
|
||||||
{
|
{
|
||||||
|
@@ -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;
|
||||||
|
@@ -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;
|
||||||
|
@@ -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;
|
||||||
|
|
||||||
|
@@ -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
|
||||||
{
|
{
|
||||||
|
@@ -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);
|
||||||
|
@@ -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);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@@ -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),
|
||||||
|
@@ -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!
|
||||||
|
@@ -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,
|
||||||
|
@@ -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
|
||||||
(UINT)-1,
|
(
|
||||||
(LPSTR)0,
|
(HDROP)hFilesInfo,
|
||||||
(UINT)0);
|
(UINT)-1,
|
||||||
|
(LPTSTR)0,
|
||||||
|
(UINT)0
|
||||||
|
);
|
||||||
|
|
||||||
wxString *files = new wxString[gwFilesDropped];
|
wxString *files = new wxString[gwFilesDropped];
|
||||||
int wIndex;
|
int wIndex;
|
||||||
|
Reference in New Issue
Block a user