Source cleaning: -1/wxID_ANY/wxDefaultCoord, ::, !!/!IsEmpty(), TRUE/true. FALSE/false, tabs, whitespaces.
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@29038 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This commit is contained in:
@@ -1,7 +1,7 @@
|
|||||||
///////////////////////////////////////////////////////////////////////////////
|
///////////////////////////////////////////////////////////////////////////////
|
||||||
// Name: include/wx/msw/uxtheme.h
|
// Name: include/wx/msw/uxtheme.h
|
||||||
// Purpose: wxUxThemeEngine class: support for XP themes
|
// Purpose: wxUxThemeEngine class: support for XP themes
|
||||||
// Author:
|
// Author:
|
||||||
// Modified by:
|
// Modified by:
|
||||||
// Created: 2003
|
// Created: 2003
|
||||||
// RCS-ID: $Id$
|
// RCS-ID: $Id$
|
||||||
@@ -58,17 +58,17 @@ typedef struct _WXUOSVERSIONINFOEXA {
|
|||||||
|
|
||||||
typedef void* WXHTHEME;
|
typedef void* WXHTHEME;
|
||||||
typedef long WXUHRESULT;
|
typedef long WXUHRESULT;
|
||||||
typedef WXHTHEME (__stdcall *PFNWXUOPENTHEMEDATA)(WXHWND, const wchar_t *);
|
typedef WXHTHEME (__stdcall *PFNWXUOPENTHEMEDATA)(WXHWND, const wchar_t *);
|
||||||
typedef WXUHRESULT (__stdcall *PFNWXUCLOSETHEMEDATA)(WXHTHEME);
|
typedef WXUHRESULT (__stdcall *PFNWXUCLOSETHEMEDATA)(WXHTHEME);
|
||||||
typedef WXUHRESULT (__stdcall *PFNWXUDRAWTHEMEBACKGROUND)(WXHTHEME, WXHDC,
|
typedef WXUHRESULT (__stdcall *PFNWXUDRAWTHEMEBACKGROUND)(WXHTHEME, WXHDC,
|
||||||
int, int, const RECT *, const RECT *);
|
int, int, const RECT *, const RECT *);
|
||||||
#define WXU_DTT_GRAYED 0x1
|
#define WXU_DTT_GRAYED 0x1
|
||||||
typedef WXUHRESULT (__stdcall *PFNWXUDRAWTHEMETEXT)(WXHTHEME, WXHDC, int,
|
typedef WXUHRESULT (__stdcall *PFNWXUDRAWTHEMETEXT)(WXHTHEME, WXHDC, int,
|
||||||
int, const wchar_t *, int, DWORD,
|
int, const wchar_t *, int, DWORD,
|
||||||
DWORD, const RECT *);
|
DWORD, const RECT *);
|
||||||
typedef WXUHRESULT (__stdcall *PFNWXUGETTHEMEBACKGROUNDCONTENTRECT)(WXHTHEME, WXHDC,
|
typedef WXUHRESULT (__stdcall *PFNWXUGETTHEMEBACKGROUNDCONTENTRECT)(WXHTHEME, WXHDC,
|
||||||
int, int, const RECT *, RECT *);
|
int, int, const RECT *, RECT *);
|
||||||
typedef WXUHRESULT (__stdcall *PFNWXUGETTHEMEBACKGROUNDEXTENT)(WXHTHEME, WXHDC, int, int,
|
typedef WXUHRESULT (__stdcall *PFNWXUGETTHEMEBACKGROUNDEXTENT)(WXHTHEME, WXHDC, int, int,
|
||||||
const RECT *, RECT *);
|
const RECT *, RECT *);
|
||||||
|
|
||||||
enum WXUTHEMESIZE
|
enum WXUTHEMESIZE
|
||||||
@@ -108,9 +108,9 @@ typedef struct tagWXUTEXTMETRIC
|
|||||||
unsigned char tmCharSet;
|
unsigned char tmCharSet;
|
||||||
} WXUTEXTMETRIC;
|
} WXUTEXTMETRIC;
|
||||||
|
|
||||||
typedef WXUHRESULT (__stdcall *PFNWXUGETTHEMEPARTSIZE)(WXHTHEME, WXHDC, int, int, const RECT *,
|
typedef WXUHRESULT (__stdcall *PFNWXUGETTHEMEPARTSIZE)(WXHTHEME, WXHDC, int, int, const RECT *,
|
||||||
enum WXUTHEMESIZE, WXUSIZE *);
|
enum WXUTHEMESIZE, WXUSIZE *);
|
||||||
typedef WXUHRESULT (__stdcall *PFNWXUGETTHEMETEXTEXTENT)(WXHTHEME, WXHDC, int, int, const wchar_t *,
|
typedef WXUHRESULT (__stdcall *PFNWXUGETTHEMETEXTEXTENT)(WXHTHEME, WXHDC, int, int, const wchar_t *,
|
||||||
int, WXDWORD, const RECT *, RECT *);
|
int, WXDWORD, const RECT *, RECT *);
|
||||||
typedef WXUHRESULT (__stdcall *PFNWXUGETTHEMETEXTMETRICS)(WXHTHEME, WXHDC,
|
typedef WXUHRESULT (__stdcall *PFNWXUGETTHEMETEXTMETRICS)(WXHTHEME, WXHDC,
|
||||||
int, int, WXUTEXTMETRIC*);
|
int, int, WXUTEXTMETRIC*);
|
||||||
@@ -188,7 +188,7 @@ typedef struct _WXUINTLIST
|
|||||||
int iValues[WXU_MAX_INTLIST_COUNT];
|
int iValues[WXU_MAX_INTLIST_COUNT];
|
||||||
} WXUINTLIST, *PWXUINTLIST;
|
} WXUINTLIST, *PWXUINTLIST;
|
||||||
typedef WXUHRESULT (__stdcall *PFNWXUGETTHEMEINTLIST)(WXHTHEME, int,
|
typedef WXUHRESULT (__stdcall *PFNWXUGETTHEMEINTLIST)(WXHTHEME, int,
|
||||||
int, int, WXUINTLIST*);
|
int, int, WXUINTLIST*);
|
||||||
|
|
||||||
enum WXUPROPERTYORIGIN
|
enum WXUPROPERTYORIGIN
|
||||||
{
|
{
|
||||||
@@ -228,7 +228,7 @@ typedef BOOL (__stdcall *PFNWXUISTHEMEDIALOGTEXTUREENABLED)(WXHWND);
|
|||||||
|
|
||||||
typedef WXDWORD (__stdcall *PFNWXUGETTHEMEAPPPROPERTIES)();
|
typedef WXDWORD (__stdcall *PFNWXUGETTHEMEAPPPROPERTIES)();
|
||||||
typedef void (__stdcall *PFNWXUSETTHEMEAPPPROPERTIES)(WXDWORD);
|
typedef void (__stdcall *PFNWXUSETTHEMEAPPPROPERTIES)(WXDWORD);
|
||||||
typedef WXUHRESULT (__stdcall *PFNWXUGETCURRENTTHEMENAME)(wchar_t *, int,
|
typedef WXUHRESULT (__stdcall *PFNWXUGETCURRENTTHEMENAME)(wchar_t *, int,
|
||||||
wchar_t *, int, wchar_t *, int);
|
wchar_t *, int, wchar_t *, int);
|
||||||
|
|
||||||
#define WXU_SZ_THDOCPROP_DISPLAYNAME L"DisplayName"
|
#define WXU_SZ_THDOCPROP_DISPLAYNAME L"DisplayName"
|
||||||
@@ -329,7 +329,7 @@ private:
|
|||||||
// uxtheme.dll
|
// uxtheme.dll
|
||||||
wxDynamicLibrary m_dllUxTheme;
|
wxDynamicLibrary m_dllUxTheme;
|
||||||
|
|
||||||
|
|
||||||
// the one and only theme engine, initially NULL
|
// the one and only theme engine, initially NULL
|
||||||
static wxUxThemeEngine *ms_themeEngine;
|
static wxUxThemeEngine *ms_themeEngine;
|
||||||
|
|
||||||
@@ -363,7 +363,7 @@ public:
|
|||||||
{
|
{
|
||||||
wxUxThemeEngine *engine = wxUxThemeEngine::Get();
|
wxUxThemeEngine *engine = wxUxThemeEngine::Get();
|
||||||
|
|
||||||
m_hTheme =
|
m_hTheme =
|
||||||
engine ? (WXHTHEME)engine->OpenThemeData(win->GetHWND(), classes)
|
engine ? (WXHTHEME)engine->OpenThemeData(win->GetHWND(), classes)
|
||||||
: NULL;
|
: NULL;
|
||||||
}
|
}
|
||||||
|
@@ -75,8 +75,8 @@ public:
|
|||||||
virtual void Raise();
|
virtual void Raise();
|
||||||
virtual void Lower();
|
virtual void Lower();
|
||||||
|
|
||||||
virtual bool Show( bool show = TRUE );
|
virtual bool Show( bool show = true );
|
||||||
virtual bool Enable( bool enable = TRUE );
|
virtual bool Enable( bool enable = true );
|
||||||
|
|
||||||
virtual void SetFocus();
|
virtual void SetFocus();
|
||||||
virtual void SetFocusFromKbd();
|
virtual void SetFocusFromKbd();
|
||||||
@@ -85,7 +85,7 @@ public:
|
|||||||
|
|
||||||
virtual void WarpPointer(int x, int y);
|
virtual void WarpPointer(int x, int y);
|
||||||
|
|
||||||
virtual void Refresh( bool eraseBackground = TRUE,
|
virtual void Refresh( bool eraseBackground = true,
|
||||||
const wxRect *rect = (const wxRect *) NULL );
|
const wxRect *rect = (const wxRect *) NULL );
|
||||||
virtual void Update();
|
virtual void Update();
|
||||||
virtual void Freeze();
|
virtual void Freeze();
|
||||||
@@ -109,8 +109,8 @@ public:
|
|||||||
#endif // wxUSE_MENUS_NATIVE
|
#endif // wxUSE_MENUS_NATIVE
|
||||||
|
|
||||||
virtual void SetScrollbar( int orient, int pos, int thumbVisible,
|
virtual void SetScrollbar( int orient, int pos, int thumbVisible,
|
||||||
int range, bool refresh = TRUE );
|
int range, bool refresh = true );
|
||||||
virtual void SetScrollPos( int orient, int pos, bool refresh = TRUE );
|
virtual void SetScrollPos( int orient, int pos, bool refresh = true );
|
||||||
virtual int GetScrollPos( int orient ) const;
|
virtual int GetScrollPos( int orient ) const;
|
||||||
virtual int GetScrollThumb( int orient ) const;
|
virtual int GetScrollThumb( int orient ) const;
|
||||||
virtual int GetScrollRange( int orient ) const;
|
virtual int GetScrollRange( int orient ) const;
|
||||||
@@ -130,7 +130,7 @@ public:
|
|||||||
#if WXWIN_COMPATIBILITY_2_4
|
#if WXWIN_COMPATIBILITY_2_4
|
||||||
wxDEPRECATED( bool GetUseCtl3D() const );
|
wxDEPRECATED( bool GetUseCtl3D() const );
|
||||||
wxDEPRECATED( bool GetTransparentBackground() const );
|
wxDEPRECATED( bool GetTransparentBackground() const );
|
||||||
wxDEPRECATED( void SetTransparent(bool t = TRUE) );
|
wxDEPRECATED( void SetTransparent(bool t = true) );
|
||||||
#endif // WXWIN_COMPATIBILITY_2_4
|
#endif // WXWIN_COMPATIBILITY_2_4
|
||||||
|
|
||||||
#ifndef __WXUNIVERSAL__
|
#ifndef __WXUNIVERSAL__
|
||||||
@@ -179,16 +179,16 @@ public:
|
|||||||
WXFARPROC MSWGetOldWndProc() const { return m_oldWndProc; }
|
WXFARPROC MSWGetOldWndProc() const { return m_oldWndProc; }
|
||||||
void MSWSetOldWndProc(WXFARPROC proc) { m_oldWndProc = proc; }
|
void MSWSetOldWndProc(WXFARPROC proc) { m_oldWndProc = proc; }
|
||||||
|
|
||||||
// return TRUE if the window is of a standard (i.e. not wxWidgets') class
|
// return true if the window is of a standard (i.e. not wxWidgets') class
|
||||||
//
|
//
|
||||||
// to understand why does it work, look at SubclassWin() code and comments
|
// to understand why does it work, look at SubclassWin() code and comments
|
||||||
bool IsOfStandardClass() const { return m_oldWndProc != NULL; }
|
bool IsOfStandardClass() const { return m_oldWndProc != NULL; }
|
||||||
|
|
||||||
wxWindow *FindItem(long id) const;
|
wxWindow *FindItem(long id) const;
|
||||||
wxWindow *FindItemByHWND(WXHWND hWnd, bool controlOnly = FALSE) const;
|
wxWindow *FindItemByHWND(WXHWND hWnd, bool controlOnly = false) const;
|
||||||
|
|
||||||
// MSW only: TRUE if this control is part of the main control
|
// MSW only: true if this control is part of the main control
|
||||||
virtual bool ContainsHWND(WXHWND WXUNUSED(hWnd)) const { return FALSE; };
|
virtual bool ContainsHWND(WXHWND WXUNUSED(hWnd)) const { return false; };
|
||||||
|
|
||||||
// translate wxWidgets style flags for this control into the Windows style
|
// translate wxWidgets style flags for this control into the Windows style
|
||||||
// and optional extended style for the corresponding native control
|
// and optional extended style for the corresponding native control
|
||||||
@@ -207,7 +207,7 @@ public:
|
|||||||
// translate wxWidgets coords into Windows ones suitable to be passed to
|
// translate wxWidgets coords into Windows ones suitable to be passed to
|
||||||
// ::CreateWindow()
|
// ::CreateWindow()
|
||||||
//
|
//
|
||||||
// returns TRUE if non default coords are returned, FALSE otherwise
|
// returns true if non default coords are returned, false otherwise
|
||||||
bool MSWGetCreateWindowCoords(const wxPoint& pos,
|
bool MSWGetCreateWindowCoords(const wxPoint& pos,
|
||||||
const wxSize& size,
|
const wxSize& size,
|
||||||
int& x, int& y,
|
int& x, int& y,
|
||||||
@@ -219,7 +219,7 @@ public:
|
|||||||
// creates the window of specified Windows class with given style, extended
|
// creates the window of specified Windows class with given style, extended
|
||||||
// style, title and geometry (default values
|
// style, title and geometry (default values
|
||||||
//
|
//
|
||||||
// returns TRUE if the window has been created, FALSE if creation failed
|
// returns true if the window has been created, false if creation failed
|
||||||
bool MSWCreate(const wxChar *wclass,
|
bool MSWCreate(const wxChar *wclass,
|
||||||
const wxChar *title = NULL,
|
const wxChar *title = NULL,
|
||||||
const wxPoint& pos = wxDefaultPosition,
|
const wxPoint& pos = wxDefaultPosition,
|
||||||
@@ -259,7 +259,7 @@ public:
|
|||||||
|
|
||||||
// ------------------------------------------------------------------------
|
// ------------------------------------------------------------------------
|
||||||
// internal handlers for MSW messages: all handlers return a boolean value:
|
// internal handlers for MSW messages: all handlers return a boolean value:
|
||||||
// TRUE means that the handler processed the event and FALSE that it didn't
|
// true means that the handler processed the event and false that it didn't
|
||||||
// ------------------------------------------------------------------------
|
// ------------------------------------------------------------------------
|
||||||
|
|
||||||
// there are several cases where we have virtual functions for Windows
|
// there are several cases where we have virtual functions for Windows
|
||||||
@@ -327,7 +327,7 @@ public:
|
|||||||
bool HandleMouseMove(int x, int y, WXUINT flags);
|
bool HandleMouseMove(int x, int y, WXUINT flags);
|
||||||
bool HandleMouseWheel(WXWPARAM wParam, WXLPARAM lParam);
|
bool HandleMouseWheel(WXWPARAM wParam, WXLPARAM lParam);
|
||||||
|
|
||||||
bool HandleChar(WXWPARAM wParam, WXLPARAM lParam, bool isASCII = FALSE);
|
bool HandleChar(WXWPARAM wParam, WXLPARAM lParam, bool isASCII = false);
|
||||||
bool HandleKeyDown(WXWPARAM wParam, WXLPARAM lParam);
|
bool HandleKeyDown(WXWPARAM wParam, WXLPARAM lParam);
|
||||||
bool HandleKeyUp(WXWPARAM wParam, WXLPARAM lParam);
|
bool HandleKeyUp(WXWPARAM wParam, WXLPARAM lParam);
|
||||||
#if wxUSE_ACCEL
|
#if wxUSE_ACCEL
|
||||||
@@ -349,14 +349,14 @@ public:
|
|||||||
|
|
||||||
// message processing helpers
|
// message processing helpers
|
||||||
|
|
||||||
// return FALSE if the message shouldn't be translated/preprocessed but
|
// return false if the message shouldn't be translated/preprocessed but
|
||||||
// dispatched normally
|
// dispatched normally
|
||||||
virtual bool MSWShouldPreProcessMessage(WXMSG* pMsg);
|
virtual bool MSWShouldPreProcessMessage(WXMSG* pMsg);
|
||||||
|
|
||||||
// return TRUE if the message was preprocessed and shouldn't be dispatched
|
// return true if the message was preprocessed and shouldn't be dispatched
|
||||||
virtual bool MSWProcessMessage(WXMSG* pMsg);
|
virtual bool MSWProcessMessage(WXMSG* pMsg);
|
||||||
|
|
||||||
// return TRUE if the message was translated and shouldn't be dispatched
|
// return true if the message was translated and shouldn't be dispatched
|
||||||
virtual bool MSWTranslateMessage(WXMSG* pMsg);
|
virtual bool MSWTranslateMessage(WXMSG* pMsg);
|
||||||
|
|
||||||
// called when the window is about to be destroyed
|
// called when the window is about to be destroyed
|
||||||
|
@@ -395,7 +395,7 @@
|
|||||||
|
|
||||||
#if defined(__WXWINCE__) && defined(DrawIcon) //#ifdef DrawIcon
|
#if defined(__WXWINCE__) && defined(DrawIcon) //#ifdef DrawIcon
|
||||||
#undef DrawIcon
|
#undef DrawIcon
|
||||||
inline BOOL DrawIcon(HDC hdc, int x, int y, HICON hicon)
|
inline BOOL DrawIcon(HDC hdc, int x, int y, HICON hicon)
|
||||||
{
|
{
|
||||||
return DrawIconEx(hdc,x,y,hicon,0,0,0,NULL, DI_NORMAL) ;
|
return DrawIconEx(hdc,x,y,hicon,0,0,0,NULL, DI_NORMAL) ;
|
||||||
}
|
}
|
||||||
|
@@ -31,7 +31,7 @@ public:
|
|||||||
|
|
||||||
wxProtocolError GetError() { return m_error; }
|
wxProtocolError GetError() { return m_error; }
|
||||||
|
|
||||||
virtual bool Abort() { return TRUE; }
|
virtual bool Abort() { return true; }
|
||||||
|
|
||||||
wxInputStream *GetInputStream(const wxString& WXUNUSED(path))
|
wxInputStream *GetInputStream(const wxString& WXUNUSED(path))
|
||||||
{
|
{
|
||||||
|
@@ -129,7 +129,7 @@ bool wxGetHostName(wxChar *buf, int maxSize)
|
|||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
return TRUE;
|
return true;
|
||||||
#else
|
#else
|
||||||
wxChar *sysname;
|
wxChar *sysname;
|
||||||
const wxChar *default_host = wxT("noname");
|
const wxChar *default_host = wxT("noname");
|
||||||
@@ -139,7 +139,7 @@ bool wxGetHostName(wxChar *buf, int maxSize)
|
|||||||
} else
|
} else
|
||||||
wxStrncpy(buf, sysname, maxSize - 1);
|
wxStrncpy(buf, sysname, maxSize - 1);
|
||||||
buf[maxSize] = wxT('\0');
|
buf[maxSize] = wxT('\0');
|
||||||
return *buf ? TRUE : FALSE;
|
return *buf ? true : false;
|
||||||
#endif
|
#endif
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -218,7 +218,7 @@ bool wxGetFullHostName(wxChar *buf, int maxSize)
|
|||||||
{
|
{
|
||||||
wxStrncpy(buf, host, maxSize);
|
wxStrncpy(buf, host, maxSize);
|
||||||
|
|
||||||
return TRUE;
|
return true;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -241,11 +241,11 @@ bool wxGetUserId(wxChar *buf, int maxSize)
|
|||||||
if ( res == 0 )
|
if ( res == 0 )
|
||||||
{
|
{
|
||||||
// not found
|
// not found
|
||||||
return FALSE;
|
return false;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
return TRUE;
|
return true;
|
||||||
#else // __WXMICROWIN__
|
#else // __WXMICROWIN__
|
||||||
wxChar *user;
|
wxChar *user;
|
||||||
const wxChar *default_id = wxT("anonymous");
|
const wxChar *default_id = wxT("anonymous");
|
||||||
@@ -263,7 +263,7 @@ bool wxGetUserId(wxChar *buf, int maxSize)
|
|||||||
wxStrncpy(buf, user, maxSize - 1);
|
wxStrncpy(buf, user, maxSize - 1);
|
||||||
}
|
}
|
||||||
|
|
||||||
return *buf ? TRUE : FALSE;
|
return *buf ? true : false;
|
||||||
#endif
|
#endif
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -332,12 +332,12 @@ bool wxGetUserName(wxChar *buf, int maxSize)
|
|||||||
WideCharToMultiByte( CP_ACP, 0, ui2->usri2_full_name, -1,
|
WideCharToMultiByte( CP_ACP, 0, ui2->usri2_full_name, -1,
|
||||||
buf, maxSize, NULL, NULL );
|
buf, maxSize, NULL, NULL );
|
||||||
|
|
||||||
return TRUE;
|
return true;
|
||||||
|
|
||||||
error:
|
error:
|
||||||
wxLogError(wxT("Couldn't look up full user name."));
|
wxLogError(wxT("Couldn't look up full user name."));
|
||||||
|
|
||||||
return FALSE;
|
return false;
|
||||||
#else // !USE_NET_API
|
#else // !USE_NET_API
|
||||||
// Could use NIS, MS-Mail or other site specific programs
|
// Could use NIS, MS-Mail or other site specific programs
|
||||||
// Use wxWidgets configuration data
|
// Use wxWidgets configuration data
|
||||||
@@ -353,7 +353,7 @@ error:
|
|||||||
}
|
}
|
||||||
#endif // Win32/16
|
#endif // Win32/16
|
||||||
|
|
||||||
return TRUE;
|
return true;
|
||||||
}
|
}
|
||||||
|
|
||||||
const wxChar* wxGetHomeDir(wxString *pstr)
|
const wxChar* wxGetHomeDir(wxString *pstr)
|
||||||
@@ -507,7 +507,7 @@ bool wxGetDiskSpace(const wxString& path, wxLongLong *pTotal, wxLongLong *pFree)
|
|||||||
{
|
{
|
||||||
wxLogLastError(_T("GetDiskFreeSpaceEx"));
|
wxLogLastError(_T("GetDiskFreeSpaceEx"));
|
||||||
|
|
||||||
return FALSE;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
// ULARGE_INTEGER is a union of a 64 bit value and a struct containing
|
// ULARGE_INTEGER is a union of a 64 bit value and a struct containing
|
||||||
@@ -550,7 +550,7 @@ bool wxGetDiskSpace(const wxString& path, wxLongLong *pTotal, wxLongLong *pFree)
|
|||||||
{
|
{
|
||||||
wxLogLastError(_T("GetDiskFreeSpace"));
|
wxLogLastError(_T("GetDiskFreeSpace"));
|
||||||
|
|
||||||
return FALSE;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
wxLongLong lBytesPerCluster = lSectorsPerCluster;
|
wxLongLong lBytesPerCluster = lSectorsPerCluster;
|
||||||
@@ -569,7 +569,7 @@ bool wxGetDiskSpace(const wxString& path, wxLongLong *pTotal, wxLongLong *pFree)
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
return TRUE;
|
return true;
|
||||||
#endif
|
#endif
|
||||||
// __WXWINCE__
|
// __WXWINCE__
|
||||||
}
|
}
|
||||||
@@ -581,14 +581,14 @@ bool wxGetDiskSpace(const wxString& path, wxLongLong *pTotal, wxLongLong *pFree)
|
|||||||
bool wxGetEnv(const wxString& var, wxString *value)
|
bool wxGetEnv(const wxString& var, wxString *value)
|
||||||
{
|
{
|
||||||
#ifdef __WXWINCE__
|
#ifdef __WXWINCE__
|
||||||
return FALSE;
|
return false;
|
||||||
#else // Win32
|
#else // Win32
|
||||||
// first get the size of the buffer
|
// first get the size of the buffer
|
||||||
DWORD dwRet = ::GetEnvironmentVariable(var, NULL, 0);
|
DWORD dwRet = ::GetEnvironmentVariable(var, NULL, 0);
|
||||||
if ( !dwRet )
|
if ( !dwRet )
|
||||||
{
|
{
|
||||||
// this means that there is no such variable
|
// this means that there is no such variable
|
||||||
return FALSE;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
if ( value )
|
if ( value )
|
||||||
@@ -597,7 +597,7 @@ bool wxGetEnv(const wxString& var, wxString *value)
|
|||||||
dwRet);
|
dwRet);
|
||||||
}
|
}
|
||||||
|
|
||||||
return TRUE;
|
return true;
|
||||||
#endif // WinCE/32
|
#endif // WinCE/32
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -610,12 +610,12 @@ bool wxSetEnv(const wxString& var, const wxChar *value)
|
|||||||
{
|
{
|
||||||
wxLogLastError(_T("SetEnvironmentVariable"));
|
wxLogLastError(_T("SetEnvironmentVariable"));
|
||||||
|
|
||||||
return FALSE;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
return TRUE;
|
return true;
|
||||||
#else // no way to set env vars
|
#else // no way to set env vars
|
||||||
return FALSE;
|
return false;
|
||||||
#endif
|
#endif
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -683,7 +683,7 @@ int wxKill(long pid, wxSignal sig, wxKillError *krc)
|
|||||||
return -1;
|
return -1;
|
||||||
}
|
}
|
||||||
|
|
||||||
bool ok = TRUE;
|
bool ok = true;
|
||||||
switch ( sig )
|
switch ( sig )
|
||||||
{
|
{
|
||||||
case wxSIGKILL:
|
case wxSIGKILL:
|
||||||
@@ -699,7 +699,7 @@ int wxKill(long pid, wxSignal sig, wxKillError *krc)
|
|||||||
*krc = wxKILL_ERROR;
|
*krc = wxKILL_ERROR;
|
||||||
}
|
}
|
||||||
|
|
||||||
ok = FALSE;
|
ok = false;
|
||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
|
|
||||||
@@ -736,7 +736,7 @@ int wxKill(long pid, wxSignal sig, wxKillError *krc)
|
|||||||
{
|
{
|
||||||
wxLogLastError(_T("EnumWindows"));
|
wxLogLastError(_T("EnumWindows"));
|
||||||
|
|
||||||
ok = FALSE;
|
ok = false;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
else // no windows for this PID
|
else // no windows for this PID
|
||||||
@@ -746,7 +746,7 @@ int wxKill(long pid, wxSignal sig, wxKillError *krc)
|
|||||||
*krc = wxKILL_ERROR;
|
*krc = wxKILL_ERROR;
|
||||||
}
|
}
|
||||||
|
|
||||||
ok = FALSE;
|
ok = false;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -845,9 +845,9 @@ bool wxShell(const wxString& command)
|
|||||||
bool wxShutdown(wxShutdownFlags wFlags)
|
bool wxShutdown(wxShutdownFlags wFlags)
|
||||||
{
|
{
|
||||||
#ifdef __WXWINCE__
|
#ifdef __WXWINCE__
|
||||||
return FALSE;
|
return false;
|
||||||
#elif defined(__WIN32__)
|
#elif defined(__WIN32__)
|
||||||
bool bOK = TRUE;
|
bool bOK = true;
|
||||||
|
|
||||||
if ( wxGetOsVersion(NULL, NULL) == wxWINDOWS_NT ) // if is NT or 2K
|
if ( wxGetOsVersion(NULL, NULL) == wxWINDOWS_NT ) // if is NT or 2K
|
||||||
{
|
{
|
||||||
@@ -891,7 +891,7 @@ bool wxShutdown(wxShutdownFlags wFlags)
|
|||||||
|
|
||||||
default:
|
default:
|
||||||
wxFAIL_MSG( _T("unknown wxShutdown() flag") );
|
wxFAIL_MSG( _T("unknown wxShutdown() flag") );
|
||||||
return FALSE;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
bOK = ::ExitWindowsEx(flags, 0) != 0;
|
bOK = ::ExitWindowsEx(flags, 0) != 0;
|
||||||
@@ -1148,7 +1148,7 @@ extern long wxCharsetToCodepage(const wxChar *name)
|
|||||||
if ( !name )
|
if ( !name )
|
||||||
return -1;
|
return -1;
|
||||||
|
|
||||||
wxFontEncoding enc = wxFontMapper::Get()->CharsetToEncoding(name, FALSE);
|
wxFontEncoding enc = wxFontMapper::Get()->CharsetToEncoding(name, false);
|
||||||
if ( enc == wxFONTENCODING_SYSTEM )
|
if ( enc == wxFONTENCODING_SYSTEM )
|
||||||
return -1;
|
return -1;
|
||||||
|
|
||||||
|
@@ -124,7 +124,7 @@ public:
|
|||||||
DWORD dwProcessId; // pid of the process
|
DWORD dwProcessId; // pid of the process
|
||||||
wxProcess *handler;
|
wxProcess *handler;
|
||||||
DWORD dwExitCode; // the exit code of the process
|
DWORD dwExitCode; // the exit code of the process
|
||||||
bool state; // set to FALSE when the process finishes
|
bool state; // set to false when the process finishes
|
||||||
};
|
};
|
||||||
|
|
||||||
class wxExecuteModule : public wxModule
|
class wxExecuteModule : public wxModule
|
||||||
@@ -160,10 +160,10 @@ public:
|
|||||||
wxPipeInputStream(HANDLE hInput);
|
wxPipeInputStream(HANDLE hInput);
|
||||||
virtual ~wxPipeInputStream();
|
virtual ~wxPipeInputStream();
|
||||||
|
|
||||||
// returns TRUE if the pipe is still opened
|
// returns true if the pipe is still opened
|
||||||
bool IsOpened() const { return m_hInput != INVALID_HANDLE_VALUE; }
|
bool IsOpened() const { return m_hInput != INVALID_HANDLE_VALUE; }
|
||||||
|
|
||||||
// returns TRUE if there is any data to be read from the pipe
|
// returns true if there is any data to be read from the pipe
|
||||||
virtual bool CanRead() const;
|
virtual bool CanRead() const;
|
||||||
|
|
||||||
protected:
|
protected:
|
||||||
@@ -211,7 +211,7 @@ public:
|
|||||||
// default ctor doesn't do anything
|
// default ctor doesn't do anything
|
||||||
wxPipe() { m_handles[Read] = m_handles[Write] = INVALID_HANDLE_VALUE; }
|
wxPipe() { m_handles[Read] = m_handles[Write] = INVALID_HANDLE_VALUE; }
|
||||||
|
|
||||||
// create the pipe, return TRUE if ok, FALSE on error
|
// create the pipe, return true if ok, false on error
|
||||||
bool Create()
|
bool Create()
|
||||||
{
|
{
|
||||||
// default secutiry attributes
|
// default secutiry attributes
|
||||||
@@ -225,13 +225,13 @@ public:
|
|||||||
{
|
{
|
||||||
wxLogSysError(_("Failed to create an anonymous pipe"));
|
wxLogSysError(_("Failed to create an anonymous pipe"));
|
||||||
|
|
||||||
return FALSE;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
return TRUE;
|
return true;
|
||||||
}
|
}
|
||||||
|
|
||||||
// return TRUE if we were created successfully
|
// return true if we were created successfully
|
||||||
bool IsOk() const { return m_handles[Read] != INVALID_HANDLE_VALUE; }
|
bool IsOk() const { return m_handles[Read] != INVALID_HANDLE_VALUE; }
|
||||||
|
|
||||||
// return the descriptor for one of the pipe ends
|
// return the descriptor for one of the pipe ends
|
||||||
@@ -362,7 +362,7 @@ wxPipeInputStream::~wxPipeInputStream()
|
|||||||
bool wxPipeInputStream::CanRead() const
|
bool wxPipeInputStream::CanRead() const
|
||||||
{
|
{
|
||||||
if ( !IsOpened() )
|
if ( !IsOpened() )
|
||||||
return FALSE;
|
return false;
|
||||||
|
|
||||||
DWORD nAvailable;
|
DWORD nAvailable;
|
||||||
|
|
||||||
@@ -497,7 +497,7 @@ static bool wxExecuteDDE(const wxString& ddeServer,
|
|||||||
ddeTopic);
|
ddeTopic);
|
||||||
if ( !conn )
|
if ( !conn )
|
||||||
{
|
{
|
||||||
ok = FALSE;
|
ok = false;
|
||||||
}
|
}
|
||||||
else // connected to DDE server
|
else // connected to DDE server
|
||||||
{
|
{
|
||||||
@@ -529,7 +529,7 @@ static bool wxExecuteDDE(const wxString& ddeServer,
|
|||||||
|
|
||||||
long wxExecute(const wxString& cmd, int flags, wxProcess *handler)
|
long wxExecute(const wxString& cmd, int flags, wxProcess *handler)
|
||||||
{
|
{
|
||||||
wxCHECK_MSG( !!cmd, 0, wxT("empty command in wxExecute") );
|
wxCHECK_MSG( !cmd.IsEmpty(), 0, wxT("empty command in wxExecute") );
|
||||||
|
|
||||||
#if wxUSE_THREADS
|
#if wxUSE_THREADS
|
||||||
// for many reasons, the code below breaks down if it's called from another
|
// for many reasons, the code below breaks down if it's called from another
|
||||||
@@ -862,7 +862,7 @@ long wxExecute(const wxString& cmd, int flags, wxProcess *handler)
|
|||||||
case WAIT_TIMEOUT:
|
case WAIT_TIMEOUT:
|
||||||
wxLogDebug(_T("Timeout too small in WaitForInputIdle"));
|
wxLogDebug(_T("Timeout too small in WaitForInputIdle"));
|
||||||
|
|
||||||
ok = FALSE;
|
ok = false;
|
||||||
break;
|
break;
|
||||||
|
|
||||||
case 0:
|
case 0:
|
||||||
|
@@ -90,17 +90,17 @@ bool wxGetResource(const wxString& section, const wxString& entry, wxChar **valu
|
|||||||
int n = GetPrivateProfileString(section, entry, defunkt,
|
int n = GetPrivateProfileString(section, entry, defunkt,
|
||||||
buf, WXSIZEOF(buf), file);
|
buf, WXSIZEOF(buf), file);
|
||||||
if (n == 0 || wxStrcmp(buf, defunkt) == 0)
|
if (n == 0 || wxStrcmp(buf, defunkt) == 0)
|
||||||
return FALSE;
|
return false;
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
int n = GetProfileString(section, entry, defunkt, buf, WXSIZEOF(buf));
|
int n = GetProfileString(section, entry, defunkt, buf, WXSIZEOF(buf));
|
||||||
if (n == 0 || wxStrcmp(buf, defunkt) == 0)
|
if (n == 0 || wxStrcmp(buf, defunkt) == 0)
|
||||||
return FALSE;
|
return false;
|
||||||
}
|
}
|
||||||
if (*value) delete[] (*value);
|
if (*value) delete[] (*value);
|
||||||
*value = wxStrcpy(new wxChar[wxStrlen(buf) + 1], buf);
|
*value = wxStrcpy(new wxChar[wxStrlen(buf) + 1], buf);
|
||||||
return TRUE;
|
return true;
|
||||||
}
|
}
|
||||||
|
|
||||||
bool wxGetResource(const wxString& section, const wxString& entry, float *value, const wxString& file)
|
bool wxGetResource(const wxString& section, const wxString& entry, float *value, const wxString& file)
|
||||||
@@ -111,9 +111,9 @@ bool wxGetResource(const wxString& section, const wxString& entry, float *value,
|
|||||||
{
|
{
|
||||||
*value = (float)wxStrtod(s, NULL);
|
*value = (float)wxStrtod(s, NULL);
|
||||||
delete[] s;
|
delete[] s;
|
||||||
return TRUE;
|
return true;
|
||||||
}
|
}
|
||||||
else return FALSE;
|
else return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
bool wxGetResource(const wxString& section, const wxString& entry, long *value, const wxString& file)
|
bool wxGetResource(const wxString& section, const wxString& entry, long *value, const wxString& file)
|
||||||
@@ -124,9 +124,9 @@ bool wxGetResource(const wxString& section, const wxString& entry, long *value,
|
|||||||
{
|
{
|
||||||
*value = wxStrtol(s, NULL, 10);
|
*value = wxStrtol(s, NULL, 10);
|
||||||
delete[] s;
|
delete[] s;
|
||||||
return TRUE;
|
return true;
|
||||||
}
|
}
|
||||||
else return FALSE;
|
else return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
bool wxGetResource(const wxString& section, const wxString& entry, int *value, const wxString& file)
|
bool wxGetResource(const wxString& section, const wxString& entry, int *value, const wxString& file)
|
||||||
@@ -137,9 +137,9 @@ bool wxGetResource(const wxString& section, const wxString& entry, int *value, c
|
|||||||
{
|
{
|
||||||
*value = (int)wxStrtol(s, NULL, 10);
|
*value = (int)wxStrtol(s, NULL, 10);
|
||||||
delete[] s;
|
delete[] s;
|
||||||
return TRUE;
|
return true;
|
||||||
}
|
}
|
||||||
else return FALSE;
|
else return false;
|
||||||
}
|
}
|
||||||
#endif // wxUSE_RESOURCES
|
#endif // wxUSE_RESOURCES
|
||||||
|
|
||||||
@@ -184,7 +184,7 @@ void wxEndBusyCursor()
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
// TRUE if we're between the above two calls
|
// true if we're between the above two calls
|
||||||
bool wxIsBusy()
|
bool wxIsBusy()
|
||||||
{
|
{
|
||||||
return gs_wxBusyCursorCount > 0;
|
return gs_wxBusyCursorCount > 0;
|
||||||
@@ -194,7 +194,7 @@ bool wxIsBusy()
|
|||||||
// in long calculations.
|
// in long calculations.
|
||||||
bool wxCheckForInterrupt(wxWindow *wnd)
|
bool wxCheckForInterrupt(wxWindow *wnd)
|
||||||
{
|
{
|
||||||
wxCHECK( wnd, FALSE );
|
wxCHECK( wnd, false );
|
||||||
|
|
||||||
MSG msg;
|
MSG msg;
|
||||||
while ( ::PeekMessage(&msg, GetHwndOf(wnd), 0, 0, PM_REMOVE) )
|
while ( ::PeekMessage(&msg, GetHwndOf(wnd), 0, 0, PM_REMOVE) )
|
||||||
@@ -203,7 +203,7 @@ bool wxCheckForInterrupt(wxWindow *wnd)
|
|||||||
::DispatchMessage(&msg);
|
::DispatchMessage(&msg);
|
||||||
}
|
}
|
||||||
|
|
||||||
return TRUE;
|
return true;
|
||||||
}
|
}
|
||||||
|
|
||||||
// MSW only: get user-defined resource from the .res file.
|
// MSW only: get user-defined resource from the .res file.
|
||||||
@@ -259,12 +259,12 @@ void wxGetMousePosition( int* x, int* y )
|
|||||||
if ( y ) *y = pt.y;
|
if ( y ) *y = pt.y;
|
||||||
};
|
};
|
||||||
|
|
||||||
// Return TRUE if we have a colour display
|
// Return true if we have a colour display
|
||||||
bool wxColourDisplay()
|
bool wxColourDisplay()
|
||||||
{
|
{
|
||||||
#ifdef __WXMICROWIN__
|
#ifdef __WXMICROWIN__
|
||||||
// MICROWIN_TODO
|
// MICROWIN_TODO
|
||||||
return TRUE;
|
return true;
|
||||||
#else
|
#else
|
||||||
// this function is called from wxDC ctor so it is called a *lot* of times
|
// this function is called from wxDC ctor so it is called a *lot* of times
|
||||||
// hence we optimize it a bit but doign the check only once
|
// hence we optimize it a bit but doign the check only once
|
||||||
|
@@ -1,7 +1,7 @@
|
|||||||
///////////////////////////////////////////////////////////////////////////////
|
///////////////////////////////////////////////////////////////////////////////
|
||||||
// Name: src/msw/uxtheme.cpp
|
// Name: src/msw/uxtheme.cpp
|
||||||
// Purpose: implements wxUxThemeEngine class: support for XP themes
|
// Purpose: implements wxUxThemeEngine class: support for XP themes
|
||||||
// Author:
|
// Author:
|
||||||
// Modified by:
|
// Modified by:
|
||||||
// Created: 2003
|
// Created: 2003
|
||||||
// RCS-ID: $Id$
|
// RCS-ID: $Id$
|
||||||
@@ -49,11 +49,11 @@
|
|||||||
class wxUxThemeModule : public wxModule
|
class wxUxThemeModule : public wxModule
|
||||||
{
|
{
|
||||||
public:
|
public:
|
||||||
virtual bool OnInit() { return true; }
|
virtual bool OnInit() { return true; }
|
||||||
virtual void OnExit()
|
virtual void OnExit()
|
||||||
{
|
{
|
||||||
if ( wxUxThemeEngine::ms_themeEngine )
|
if ( wxUxThemeEngine::ms_themeEngine )
|
||||||
{
|
{
|
||||||
// this is probably not necessary right now but try to be careful
|
// this is probably not necessary right now but try to be careful
|
||||||
// and avoid the problems which we might have if someone ever
|
// and avoid the problems which we might have if someone ever
|
||||||
// decides to show a message box using the theme engine from
|
// decides to show a message box using the theme engine from
|
||||||
@@ -63,12 +63,12 @@ public:
|
|||||||
wxUxThemeEngine::ms_themeEngine = NULL;
|
wxUxThemeEngine::ms_themeEngine = NULL;
|
||||||
wxUxThemeEngine::ms_isThemeEngineAvailable = false;
|
wxUxThemeEngine::ms_isThemeEngineAvailable = false;
|
||||||
|
|
||||||
delete themeEngine;
|
delete themeEngine;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
DECLARE_DYNAMIC_CLASS(wxUxThemeModule)
|
DECLARE_DYNAMIC_CLASS(wxUxThemeModule)
|
||||||
};
|
};
|
||||||
|
|
||||||
IMPLEMENT_DYNAMIC_CLASS(wxUxThemeModule, wxModule)
|
IMPLEMENT_DYNAMIC_CLASS(wxUxThemeModule, wxModule)
|
||||||
@@ -114,7 +114,7 @@ bool wxUxThemeEngine::Initialize()
|
|||||||
// themes
|
// themes
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
// we're prepared to handle the errors
|
// we're prepared to handle the errors
|
||||||
wxLogNull noLog;
|
wxLogNull noLog;
|
||||||
|
|
||||||
|
@@ -180,28 +180,28 @@ static unsigned GetBasicFlags(const wxChar* filename)
|
|||||||
// Purpose: Add a file to the list if it meets the filter requirement.
|
// Purpose: Add a file to the list if it meets the filter requirement.
|
||||||
// Notes: - See GetBasicFlags for remarks about the Mounted flag.
|
// Notes: - See GetBasicFlags for remarks about the Mounted flag.
|
||||||
//=============================================================================
|
//=============================================================================
|
||||||
static bool FilteredAdd(wxArrayString& list, const wxChar* filename,
|
static bool FilteredAdd(wxArrayString& list, const wxChar* filename,
|
||||||
unsigned flagsSet, unsigned flagsUnset)
|
unsigned flagsSet, unsigned flagsUnset)
|
||||||
{
|
{
|
||||||
bool accept = TRUE;
|
bool accept = true;
|
||||||
unsigned flags = GetBasicFlags(filename);
|
unsigned flags = GetBasicFlags(filename);
|
||||||
|
|
||||||
if (flagsSet & wxFS_VOL_MOUNTED && !(flags & wxFS_VOL_MOUNTED))
|
if (flagsSet & wxFS_VOL_MOUNTED && !(flags & wxFS_VOL_MOUNTED))
|
||||||
accept = FALSE;
|
accept = false;
|
||||||
else if (flagsUnset & wxFS_VOL_MOUNTED && (flags & wxFS_VOL_MOUNTED))
|
else if (flagsUnset & wxFS_VOL_MOUNTED && (flags & wxFS_VOL_MOUNTED))
|
||||||
accept = FALSE;
|
accept = false;
|
||||||
else if (flagsSet & wxFS_VOL_REMOVABLE && !(flags & wxFS_VOL_REMOVABLE))
|
else if (flagsSet & wxFS_VOL_REMOVABLE && !(flags & wxFS_VOL_REMOVABLE))
|
||||||
accept = FALSE;
|
accept = false;
|
||||||
else if (flagsUnset & wxFS_VOL_REMOVABLE && (flags & wxFS_VOL_REMOVABLE))
|
else if (flagsUnset & wxFS_VOL_REMOVABLE && (flags & wxFS_VOL_REMOVABLE))
|
||||||
accept = FALSE;
|
accept = false;
|
||||||
else if (flagsSet & wxFS_VOL_READONLY && !(flags & wxFS_VOL_READONLY))
|
else if (flagsSet & wxFS_VOL_READONLY && !(flags & wxFS_VOL_READONLY))
|
||||||
accept = FALSE;
|
accept = false;
|
||||||
else if (flagsUnset & wxFS_VOL_READONLY && (flags & wxFS_VOL_READONLY))
|
else if (flagsUnset & wxFS_VOL_READONLY && (flags & wxFS_VOL_READONLY))
|
||||||
accept = FALSE;
|
accept = false;
|
||||||
else if (flagsSet & wxFS_VOL_REMOTE && !(flags & wxFS_VOL_REMOTE))
|
else if (flagsSet & wxFS_VOL_REMOTE && !(flags & wxFS_VOL_REMOTE))
|
||||||
accept = FALSE;
|
accept = false;
|
||||||
else if (flagsUnset & wxFS_VOL_REMOTE && (flags & wxFS_VOL_REMOTE))
|
else if (flagsUnset & wxFS_VOL_REMOTE && (flags & wxFS_VOL_REMOTE))
|
||||||
accept = FALSE;
|
accept = false;
|
||||||
|
|
||||||
// Add to the list if passed the filter.
|
// Add to the list if passed the filter.
|
||||||
if (accept)
|
if (accept)
|
||||||
@@ -217,7 +217,7 @@ static bool FilteredAdd(wxArrayString& list, const wxChar* filename,
|
|||||||
// all items while determining which are connected and not. So this
|
// all items while determining which are connected and not. So this
|
||||||
// function will find either all items or connected items.
|
// function will find either all items or connected items.
|
||||||
//=============================================================================
|
//=============================================================================
|
||||||
static void BuildListFromNN(wxArrayString& list, NETRESOURCE* pResSrc,
|
static void BuildListFromNN(wxArrayString& list, NETRESOURCE* pResSrc,
|
||||||
unsigned flagsSet, unsigned flagsUnset)
|
unsigned flagsSet, unsigned flagsUnset)
|
||||||
{
|
{
|
||||||
HANDLE hEnum;
|
HANDLE hEnum;
|
||||||
@@ -303,19 +303,19 @@ static int CompareFcn(const wxString& first, const wxString& second)
|
|||||||
// way manually.
|
// way manually.
|
||||||
// - The resulting list is sorted alphabetically.
|
// - The resulting list is sorted alphabetically.
|
||||||
//=============================================================================
|
//=============================================================================
|
||||||
static bool BuildRemoteList(wxArrayString& list, NETRESOURCE* pResSrc,
|
static bool BuildRemoteList(wxArrayString& list, NETRESOURCE* pResSrc,
|
||||||
unsigned flagsSet, unsigned flagsUnset)
|
unsigned flagsSet, unsigned flagsUnset)
|
||||||
{
|
{
|
||||||
// NN query depends on dynamically loaded library.
|
// NN query depends on dynamically loaded library.
|
||||||
if (!s_pWNetOpenEnum || !s_pWNetEnumResource || !s_pWNetCloseEnum)
|
if (!s_pWNetOpenEnum || !s_pWNetEnumResource || !s_pWNetCloseEnum)
|
||||||
{
|
{
|
||||||
wxLogError(_("Failed to load mpr.dll."));
|
wxLogError(_("Failed to load mpr.dll."));
|
||||||
return FALSE;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
// Don't waste time doing the work if the flags conflict.
|
// Don't waste time doing the work if the flags conflict.
|
||||||
if (flagsSet & wxFS_VOL_MOUNTED && flagsUnset & wxFS_VOL_MOUNTED)
|
if (flagsSet & wxFS_VOL_MOUNTED && flagsUnset & wxFS_VOL_MOUNTED)
|
||||||
return FALSE;
|
return false;
|
||||||
|
|
||||||
//----------------------------------------------
|
//----------------------------------------------
|
||||||
// Generate the list according to the flags set.
|
// Generate the list according to the flags set.
|
||||||
@@ -344,7 +344,7 @@ static bool BuildRemoteList(wxArrayString& list, NETRESOURCE* pResSrc,
|
|||||||
wxString all(list[iList]);
|
wxString all(list[iList]);
|
||||||
wxString mount(mounted[iMounted]);
|
wxString mount(mounted[iMounted]);
|
||||||
|
|
||||||
while (compare =
|
while (compare =
|
||||||
wxStricmp(list[iList].c_str(), mounted[iMounted].c_str()),
|
wxStricmp(list[iList].c_str(), mounted[iMounted].c_str()),
|
||||||
compare > 0 && iList >= 0)
|
compare > 0 && iList >= 0)
|
||||||
{
|
{
|
||||||
@@ -367,7 +367,7 @@ static bool BuildRemoteList(wxArrayString& list, NETRESOURCE* pResSrc,
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
return TRUE;
|
return true;
|
||||||
} // BuildRemoteList
|
} // BuildRemoteList
|
||||||
|
|
||||||
//+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
|
//+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
|
||||||
@@ -381,7 +381,7 @@ static bool BuildRemoteList(wxArrayString& list, NETRESOURCE* pResSrc,
|
|||||||
//=============================================================================
|
//=============================================================================
|
||||||
wxArrayString wxFSVolumeBase::GetVolumes(int flagsSet, int flagsUnset)
|
wxArrayString wxFSVolumeBase::GetVolumes(int flagsSet, int flagsUnset)
|
||||||
{
|
{
|
||||||
InterlockedExchange(&s_cancelSearch, FALSE); // reset
|
::InterlockedExchange(&s_cancelSearch, FALSE); // reset
|
||||||
|
|
||||||
if (!s_mprLib.IsLoaded() && s_mprLib.Load(_T("mpr.dll")))
|
if (!s_mprLib.IsLoaded() && s_mprLib.Load(_T("mpr.dll")))
|
||||||
{
|
{
|
||||||
@@ -450,7 +450,7 @@ wxArrayString wxFSVolumeBase::GetVolumes(int flagsSet, int flagsUnset)
|
|||||||
//=============================================================================
|
//=============================================================================
|
||||||
void wxFSVolumeBase::CancelSearch()
|
void wxFSVolumeBase::CancelSearch()
|
||||||
{
|
{
|
||||||
InterlockedExchange(&s_cancelSearch, TRUE);
|
::InterlockedExchange(&s_cancelSearch, TRUE);
|
||||||
} // CancelSearch
|
} // CancelSearch
|
||||||
|
|
||||||
//=============================================================================
|
//=============================================================================
|
||||||
@@ -459,7 +459,7 @@ void wxFSVolumeBase::CancelSearch()
|
|||||||
//=============================================================================
|
//=============================================================================
|
||||||
wxFSVolumeBase::wxFSVolumeBase()
|
wxFSVolumeBase::wxFSVolumeBase()
|
||||||
{
|
{
|
||||||
m_isOk = FALSE;
|
m_isOk = false;
|
||||||
} // wxVolume
|
} // wxVolume
|
||||||
|
|
||||||
//=============================================================================
|
//=============================================================================
|
||||||
@@ -478,7 +478,7 @@ wxFSVolumeBase::wxFSVolumeBase(const wxString& name)
|
|||||||
bool wxFSVolumeBase::Create(const wxString& name)
|
bool wxFSVolumeBase::Create(const wxString& name)
|
||||||
{
|
{
|
||||||
// assume fail.
|
// assume fail.
|
||||||
m_isOk = FALSE;
|
m_isOk = false;
|
||||||
|
|
||||||
// supplied.
|
// supplied.
|
||||||
m_volName = name;
|
m_volName = name;
|
||||||
@@ -494,12 +494,12 @@ bool wxFSVolumeBase::Create(const wxString& name)
|
|||||||
m_dispName = fi.szDisplayName;
|
m_dispName = fi.szDisplayName;
|
||||||
|
|
||||||
// all tests passed.
|
// all tests passed.
|
||||||
return m_isOk = TRUE;
|
return m_isOk = true;
|
||||||
} // Create
|
} // Create
|
||||||
|
|
||||||
//=============================================================================
|
//=============================================================================
|
||||||
// Function: IsOk
|
// Function: IsOk
|
||||||
// Purpose: returns TRUE if the volume is legal.
|
// Purpose: returns true if the volume is legal.
|
||||||
// Notes: For fixed disks, it must exist. For removable disks, it must also
|
// Notes: For fixed disks, it must exist. For removable disks, it must also
|
||||||
// be present. For Network Shares, it must also be logged in, etc.
|
// be present. For Network Shares, it must also be logged in, etc.
|
||||||
//=============================================================================
|
//=============================================================================
|
||||||
@@ -588,7 +588,7 @@ wxIcon wxFSVolume::GetIcon(wxFSIconType type) const
|
|||||||
case wxFS_VOL_ICO_SEL_LARGE:
|
case wxFS_VOL_ICO_SEL_LARGE:
|
||||||
flags |= SHGFI_SHELLICONSIZE | SHGFI_OPENICON;
|
flags |= SHGFI_SHELLICONSIZE | SHGFI_OPENICON;
|
||||||
break;
|
break;
|
||||||
|
|
||||||
case wxFS_VOL_ICO_MAX:
|
case wxFS_VOL_ICO_MAX:
|
||||||
wxFAIL_MSG(_T("wxFS_VOL_ICO_MAX is not valid icon type"));
|
wxFAIL_MSG(_T("wxFS_VOL_ICO_MAX is not valid icon type"));
|
||||||
break;
|
break;
|
||||||
|
@@ -1737,7 +1737,7 @@ bool wxWindowMSW::DoPopupMenu(wxMenu *menu, int x, int y)
|
|||||||
menu->SetInvokingWindow(this);
|
menu->SetInvokingWindow(this);
|
||||||
menu->UpdateUI();
|
menu->UpdateUI();
|
||||||
|
|
||||||
if ( x == -1 && y == -1 )
|
if ( x == wxDefaultCoord && y == wxDefaultCoord )
|
||||||
{
|
{
|
||||||
wxPoint mouse = ScreenToClient(wxGetMousePosition());
|
wxPoint mouse = ScreenToClient(wxGetMousePosition());
|
||||||
x = mouse.x; y = mouse.y;
|
x = mouse.x; y = mouse.y;
|
||||||
@@ -4014,7 +4014,7 @@ extern wxCOLORMAP *wxGetStdColourMap()
|
|||||||
bool wxWindowMSW::HandlePaint()
|
bool wxWindowMSW::HandlePaint()
|
||||||
{
|
{
|
||||||
// if (GetExtraStyle() & wxWS_EX_THEMED_BACKGROUND)
|
// if (GetExtraStyle() & wxWS_EX_THEMED_BACKGROUND)
|
||||||
// return FALSE;
|
// return false;
|
||||||
|
|
||||||
HRGN hRegion = ::CreateRectRgn(0, 0, 0, 0); // Dummy call to get a handle
|
HRGN hRegion = ::CreateRectRgn(0, 0, 0, 0); // Dummy call to get a handle
|
||||||
if ( !hRegion )
|
if ( !hRegion )
|
||||||
|
@@ -39,7 +39,7 @@ int main( int argc, char *argv [] )
|
|||||||
for (i = 2; i < argc; i++) strcat(strcat(lpszCmdParam, " "), argv[i]);
|
for (i = 2; i < argc; i++) strcat(strcat(lpszCmdParam, " "), argv[i]);
|
||||||
|
|
||||||
return WinMain (hInstance, /* hInstance */
|
return WinMain (hInstance, /* hInstance */
|
||||||
0, /* hPrevInstance */
|
0, /* hPrevInstance */
|
||||||
lpszCmdParam, /* lpszCmdParam */
|
lpszCmdParam, /* lpszCmdParam */
|
||||||
SW_NORMAL); /* nCmdShow */
|
SW_NORMAL); /* nCmdShow */
|
||||||
}
|
}
|
||||||
|
Reference in New Issue
Block a user