From d71cc120e315b27466cce577115b9bdf56b1ca55 Mon Sep 17 00:00:00 2001 From: =?utf8?q?W=C5=82odzimierz=20Skiba?= Date: Tue, 24 Aug 2004 10:31:41 +0000 Subject: [PATCH] Code cleaning: whitespaces, -1/wxID_ANY/wxDefaultCoord, TRUE/true, FALSE/false, !!/!NotEmpty(). git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@28875 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775 --- include/wx/msw/dc.h | 8 ++--- include/wx/msw/dcprint.h | 6 ++-- include/wx/msw/dcscreen.h | 6 ++-- include/wx/msw/dde.h | 4 +-- include/wx/msw/dialog.h | 4 +-- include/wx/msw/dirdlg.h | 2 +- include/wx/msw/display.h | 4 +-- include/wx/msw/dragimag.h | 2 +- src/msw/dcclient.cpp | 2 +- src/msw/dcmemory.cpp | 2 +- src/msw/dcprint.cpp | 30 ++++++++--------- src/msw/dde.cpp | 6 ++-- src/msw/dialog.cpp | 2 +- src/msw/dialup.cpp | 70 +++++++++++++++++++-------------------- src/msw/dir.cpp | 24 +++++++------- src/msw/dirdlg.cpp | 2 +- src/msw/display.cpp | 4 +-- src/msw/dragimag.cpp | 30 ++++++++--------- 18 files changed, 104 insertions(+), 104 deletions(-) diff --git a/include/wx/msw/dc.h b/include/wx/msw/dc.h index cd92147a45..045299277b 100644 --- a/include/wx/msw/dc.h +++ b/include/wx/msw/dc.h @@ -113,7 +113,7 @@ public: } WXHDC GetHDC() const { return m_hDC; } - void SetHDC(WXHDC dc, bool bOwnsDC = FALSE) + void SetHDC(WXHDC dc, bool bOwnsDC = false) { m_hDC = dc; m_bOwnsDC = bOwnsDC; @@ -168,7 +168,7 @@ protected: virtual void DoDrawIcon(const wxIcon& icon, wxCoord x, wxCoord y); virtual void DoDrawBitmap(const wxBitmap &bmp, wxCoord x, wxCoord y, - bool useMask = FALSE); + bool useMask = false); virtual void DoDrawText(const wxString& text, wxCoord x, wxCoord y); virtual void DoDrawRotatedText(const wxString& text, wxCoord x, wxCoord y, @@ -176,7 +176,7 @@ protected: virtual bool DoBlit(wxCoord xdest, wxCoord ydest, wxCoord width, wxCoord height, wxDC *source, wxCoord xsrc, wxCoord ysrc, - int rop = wxCOPY, bool useMask = FALSE, wxCoord xsrcMask = -1, wxCoord ysrcMask = -1); + int rop = wxCOPY, bool useMask = false, wxCoord xsrcMask = wxDefaultCoord, wxCoord ysrcMask = wxDefaultCoord); // this is gnarly - we can't even call this function DoSetClippingRegion() // because of virtual function hiding @@ -209,7 +209,7 @@ protected: // (tell windows to translate pixel from other palettes to our custom one // and vice versa) // Realize tells it to also reset the system palette to this one. - void DoSelectPalette(bool realize = FALSE); + void DoSelectPalette(bool realize = false); // Find out what palette our parent window has, then select it into the dc void InitializePalette(); diff --git a/include/wx/msw/dcprint.h b/include/wx/msw/dcprint.h index 68e1e2d10c..c39ddbfc8e 100644 --- a/include/wx/msw/dcprint.h +++ b/include/wx/msw/dcprint.h @@ -25,7 +25,7 @@ class WXDLLEXPORT wxPrinterDC : public wxDC { public: // Create a printer DC (obsolete function: use wxPrintData version now) - wxPrinterDC(const wxString& driver, const wxString& device, const wxString& output, bool interactive = TRUE, int orientation = wxPORTRAIT); + wxPrinterDC(const wxString& driver, const wxString& device, const wxString& output, bool interactive = true, int orientation = wxPORTRAIT); // Create from print data wxPrinterDC(const wxPrintData& data); @@ -40,11 +40,11 @@ public: protected: virtual void DoDrawBitmap(const wxBitmap &bmp, wxCoord x, wxCoord y, - bool useMask = FALSE); + bool useMask = false); virtual bool DoBlit(wxCoord xdest, wxCoord ydest, wxCoord width, wxCoord height, wxDC *source, wxCoord xsrc, wxCoord ysrc, - int rop = wxCOPY, bool useMask = FALSE, wxCoord xsrcMask = -1, wxCoord ysrcMask = -1); + int rop = wxCOPY, bool useMask = false, wxCoord xsrcMask = wxDefaultCoord, wxCoord ysrcMask = wxDefaultCoord); // init the dc void Init(); diff --git a/include/wx/msw/dcscreen.h b/include/wx/msw/dcscreen.h index f45f903d06..035e547e23 100644 --- a/include/wx/msw/dcscreen.h +++ b/include/wx/msw/dcscreen.h @@ -25,9 +25,9 @@ public: wxScreenDC(); // Compatibility with X's requirements for drawing on top of all windows - static bool StartDrawingOnTop(wxWindow* WXUNUSED(window)) { return TRUE; } - static bool StartDrawingOnTop(wxRect* WXUNUSED(rect) = NULL) { return TRUE; } - static bool EndDrawingOnTop() { return TRUE; } + static bool StartDrawingOnTop(wxWindow* WXUNUSED(window)) { return true; } + static bool StartDrawingOnTop(wxRect* WXUNUSED(rect) = NULL) { return true; } + static bool EndDrawingOnTop() { return true; } protected: virtual void DoGetSize(int *width, int *height) const; diff --git a/include/wx/msw/dde.h b/include/wx/msw/dde.h index dd55e69610..407039b784 100644 --- a/include/wx/msw/dde.h +++ b/include/wx/msw/dde.h @@ -67,7 +67,7 @@ public: // Calls that both can make virtual bool Disconnect(void); - // Default behaviour is to delete connection and return TRUE + // Default behaviour is to delete connection and return true virtual bool OnDisconnect(void); public: @@ -90,7 +90,7 @@ class WXDLLIMPEXP_BASE wxDDEServer: public wxServerBase wxDDEServer(void); ~wxDDEServer(void); - bool Create(const wxString& server_name); // Returns FALSE if can't create server (e.g. port + bool Create(const wxString& server_name); // Returns false if can't create server (e.g. port // number is already in use) virtual wxConnectionBase *OnAcceptConnection(const wxString& topic); diff --git a/include/wx/msw/dialog.h b/include/wx/msw/dialog.h index 879ae3a79d..aae10aa23e 100644 --- a/include/wx/msw/dialog.h +++ b/include/wx/msw/dialog.h @@ -63,7 +63,7 @@ public: // ------------------------------- // override some base class virtuals - virtual bool Show(bool show = TRUE); + virtual bool Show(bool show = true); virtual void Raise(); @@ -93,7 +93,7 @@ public: // use the other ctor wxDEPRECATED( wxDialog(wxWindow *parent, const wxString& title, bool modal, - int x = -1, int y= -1, int width = 500, int height = 500, + int x = wxDefaultCoord, int y = wxDefaultCoord, int width = 500, int height = 500, long style = wxDEFAULT_DIALOG_STYLE, const wxString& name = wxDialogNameStr) ); diff --git a/include/wx/msw/dirdlg.h b/include/wx/msw/dirdlg.h index a53cd1fff8..0c44bfb51e 100644 --- a/include/wx/msw/dirdlg.h +++ b/include/wx/msw/dirdlg.h @@ -6,7 +6,7 @@ // Created: 01/02/97 // RCS-ID: $Id$ // Copyright: (c) Julian Smart -// Licence: wxWindows licence +// Licence: wxWindows licence ///////////////////////////////////////////////////////////////////////////// #ifndef _WX_DIRDLG_H_ diff --git a/include/wx/msw/display.h b/include/wx/msw/display.h index 87dc56b39f..598326e87a 100644 --- a/include/wx/msw/display.h +++ b/include/wx/msw/display.h @@ -2,7 +2,7 @@ // Name: display.h // Purpose: wxDisplay class customization for WXMSW // Author: Royce Mitchell III -// Modified by: +// Modified by: // Created: 06/21/02 // RCS-ID: $Id$ // Copyright: (c) wxWidgets team @@ -49,7 +49,7 @@ private: wxArrayVideoModes DoGetModesWindows(const wxVideoMode& modeMatch) const; bool DoChangeModeWindows(const wxVideoMode& mode); - + DECLARE_NO_COPY_CLASS(wxDisplay) }; diff --git a/include/wx/msw/dragimag.h b/include/wx/msw/dragimag.h index 2fd58cb881..5286ab847b 100644 --- a/include/wx/msw/dragimag.h +++ b/include/wx/msw/dragimag.h @@ -216,7 +216,7 @@ public: // Begin drag. hotspot is the location of the drag position relative to the upper-left // corner of the image. - bool BeginDrag(const wxPoint& hotspot, wxWindow* window, bool fullScreen = FALSE, wxRect* rect = (wxRect*) NULL); + bool BeginDrag(const wxPoint& hotspot, wxWindow* window, bool fullScreen = false, wxRect* rect = (wxRect*) NULL); // Begin drag. hotspot is the location of the drag position relative to the upper-left // corner of the image. This is full screen only. fullScreenRect gives the diff --git a/src/msw/dcclient.cpp b/src/msw/dcclient.cpp index b2a21e9de5..d8d6562774 100644 --- a/src/msw/dcclient.cpp +++ b/src/msw/dcclient.cpp @@ -312,7 +312,7 @@ WXHDC wxPaintDC::FindDCInCache(wxWindow* win) /* * wxPaintDCEx */ - + // TODO: don't duplicate wxPaintDC code here!! wxPaintDCEx::wxPaintDCEx(wxWindow *canvas, WXHDC dc) : saveState(0) diff --git a/src/msw/dcmemory.cpp b/src/msw/dcmemory.cpp index 3427da41a1..f93d3b7962 100644 --- a/src/msw/dcmemory.cpp +++ b/src/msw/dcmemory.cpp @@ -89,7 +89,7 @@ bool wxMemoryDC::CreateCompatible(wxDC *dc) m_hDC = (WXHDC)::CreateCompatibleDC(dc ? GetHdcOf(*dc) : NULL); // as we created the DC, we must delete it in the dtor - m_bOwnsDC = TRUE; + m_bOwnsDC = true; m_ok = m_hDC != 0; diff --git a/src/msw/dcprint.cpp b/src/msw/dcprint.cpp index 819514bb60..f0202b8b88 100644 --- a/src/msw/dcprint.cpp +++ b/src/msw/dcprint.cpp @@ -123,10 +123,10 @@ wxPrinterDC::wxPrinterDC(const wxString& driver_name, m_hDC = wxGetPrinterDC(printData); } - m_ok = m_hDC ? TRUE: FALSE; + m_ok = m_hDC ? true: false; // as we created it, we must delete it as well - m_bOwnsDC = TRUE; + m_bOwnsDC = true; } Init(); @@ -136,11 +136,11 @@ wxPrinterDC::wxPrinterDC(const wxPrintData& printData) { m_printData = printData; - m_isInteractive = FALSE; + m_isInteractive = false; m_hDC = wxGetPrinterDC(printData); m_ok = m_hDC != 0; - m_bOwnsDC = TRUE; + m_bOwnsDC = true; Init(); } @@ -148,11 +148,11 @@ wxPrinterDC::wxPrinterDC(const wxPrintData& printData) wxPrinterDC::wxPrinterDC(WXHDC dc) { - m_isInteractive = FALSE; + m_isInteractive = false; m_hDC = dc; - m_bOwnsDC = TRUE; - m_ok = TRUE; + m_bOwnsDC = true; + m_ok = true; } void wxPrinterDC::Init() @@ -191,7 +191,7 @@ bool wxPrinterDC::StartDoc(const wxString& message) #endif if (!m_hDC) - return FALSE; + return false; int ret = ::StartDoc(GetHdc(), &docinfo); @@ -254,7 +254,7 @@ static bool wxGetDefaultDeviceName(wxString& deviceName, wxString& portName) if (pd.hDevNames) GlobalFree(pd.hDevNames); - return FALSE; + return false; } if (pd.hDevNames) @@ -340,14 +340,14 @@ bool DrawBitmapUsingStretchDIBits(HDC hdc, wxDIB dib(bmp); bool ok = dib.IsOk(); if ( !ok ) - return FALSE; + return false; DIBSECTION ds; if ( !::GetObject(dib.GetHandle(), sizeof(ds), &ds) ) { wxLogLastError(_T("GetObject(DIBSECTION)")); - return FALSE; + return false; } // ok, we've got all data we need, do blit it @@ -366,12 +366,12 @@ bool DrawBitmapUsingStretchDIBits(HDC hdc, { wxLogLastError(wxT("StretchDIBits")); - return FALSE; + return false; } - return TRUE; + return true; #else - return FALSE; + return false; #endif } @@ -468,7 +468,7 @@ bool wxPrinterDC::DoBlit(wxCoord xdest, wxCoord ydest, } } - return TRUE; + return true; } #endif diff --git a/src/msw/dde.cpp b/src/msw/dde.cpp index 9fd53fd87d..26a13fc678 100644 --- a/src/msw/dde.cpp +++ b/src/msw/dde.cpp @@ -308,7 +308,7 @@ bool wxDDEServer::Create(const wxString& server) wxDDEServer::~wxDDEServer() { - if ( !!m_serviceName ) + if ( !m_serviceName.IsEmpty() ) { HSZ hsz = DDEAtomFromString(m_serviceName); @@ -561,7 +561,7 @@ bool wxDDEConnection::Execute(const wxChar *data, int size, wxIPCFormat format) size = wxStrlen(data) + 1; } - bool ok = DdeClientTransaction((LPBYTE)data, + bool ok = DdeClientTransaction((LPBYTE)data, size * sizeof(wxChar), GetHConv(), NULL, @@ -621,7 +621,7 @@ bool wxDDEConnection::Poke(const wxString& item, wxChar *data, int size, wxIPCFo } HSZ item_atom = DDEGetAtom(item); - bool ok = DdeClientTransaction((LPBYTE)data, + bool ok = DdeClientTransaction((LPBYTE)data, size * sizeof(wxChar), GetHConv(), item_atom, format, diff --git a/src/msw/dialog.cpp b/src/msw/dialog.cpp index 5d86517ffd..90f30bb4f6 100644 --- a/src/msw/dialog.cpp +++ b/src/msw/dialog.cpp @@ -206,7 +206,7 @@ wxDialog::wxDialog(wxWindow *parent, { Init(); - Create(parent, -1, title, wxPoint(x, y), wxSize(w, h), style, name); + Create(parent, wxID_ANY, title, wxPoint(x, y), wxSize(w, h), style, name); } void wxDialog::SetModal(bool WXUNUSED(flag)) diff --git a/src/msw/dialup.cpp b/src/msw/dialup.cpp index 0fc8e9eb32..ac394e26ab 100644 --- a/src/msw/dialup.cpp +++ b/src/msw/dialup.cpp @@ -179,7 +179,7 @@ public: virtual bool HangUp(); virtual bool IsAlwaysOnline() const; virtual bool IsOnline() const; - virtual void SetOnlineStatus(bool isOnline = TRUE); + virtual void SetOnlineStatus(bool isOnline = true); virtual bool EnableAutoCheckOnlineStatus(size_t nSeconds); virtual void DisableAutoCheckOnlineStatus(); virtual void SetWellKnownHost(const wxString& hostname, int port); @@ -205,7 +205,7 @@ private: static HRASCONN FindActiveConnection(); // notify the application about status change - void NotifyApp(bool connected, bool fromOurselves = FALSE) const; + void NotifyApp(bool connected, bool fromOurselves = false) const; // destroy the thread data and the thread itself void CleanUpThreadData(); @@ -630,14 +630,14 @@ void wxDialUpManagerMSW::OnDialProgress(RASCONNSTATE rasconnstate, ms_dialer = NULL; - NotifyApp(FALSE /* !connected */, TRUE /* we dialed ourselves */); + NotifyApp(false /* !connected */, true /* we dialed ourselves */); } else if ( rasconnstate == RASCS_Connected ) { - ms_isConnected = TRUE; + ms_isConnected = true; ms_dialer = NULL; - NotifyApp(TRUE /* connected */, TRUE /* we dialed ourselves */); + NotifyApp(true /* connected */, true /* we dialed ourselves */); } } @@ -707,13 +707,13 @@ bool wxDialUpManagerMSW::Dial(const wxString& nameOfISP, bool async) { // check preconditions - wxCHECK_MSG( IsOk(), FALSE, wxT("using uninitialized wxDialUpManager") ); + wxCHECK_MSG( IsOk(), false, wxT("using uninitialized wxDialUpManager") ); if ( ms_hRasConnection ) { wxFAIL_MSG(wxT("there is already an active connection")); - return TRUE; + return true; } // get the default ISP if none given @@ -728,7 +728,7 @@ bool wxDialUpManagerMSW::Dial(const wxString& nameOfISP, // no known ISPs, abort wxLogError(_("Failed to connect: no ISP to dial.")); - return FALSE; + return false; case 1: // only one ISP, choose it @@ -757,7 +757,7 @@ bool wxDialUpManagerMSW::Dial(const wxString& nameOfISP, if ( !entryName ) { // cancelled by user - return FALSE; + return false; } } } @@ -782,7 +782,7 @@ bool wxDialUpManagerMSW::Dial(const wxString& nameOfISP, { wxLogError(_("Failed to connect: missing username/password.")); - return FALSE; + return false; } } else @@ -853,16 +853,16 @@ bool wxDialUpManagerMSW::Dial(const wxString& nameOfISP, ms_dialer = NULL; - return FALSE; + return false; } // for async dialing, we're not yet connected if ( !async ) { - ms_isConnected = TRUE; + ms_isConnected = true; } - return TRUE; + return true; } bool wxDialUpManagerMSW::IsDialing() const @@ -875,7 +875,7 @@ bool wxDialUpManagerMSW::CancelDialing() if ( !GetDialer() ) { // silently ignore - return FALSE; + return false; } wxASSERT_MSG( ms_hRasConnection, wxT("dialing but no connection?") ); @@ -887,7 +887,7 @@ bool wxDialUpManagerMSW::CancelDialing() bool wxDialUpManagerMSW::HangUp() { - wxCHECK_MSG( IsOk(), FALSE, wxT("using uninitialized wxDialUpManager") ); + wxCHECK_MSG( IsOk(), false, wxT("using uninitialized wxDialUpManager") ); // we may terminate either the connection we initiated or another one which // is active now @@ -907,7 +907,7 @@ bool wxDialUpManagerMSW::HangUp() { wxLogError(_("Cannot hang up - no active dialup connection.")); - return FALSE; + return false; } DWORD dwRet = ms_pfnRasHangUp(hRasConn); @@ -917,15 +917,15 @@ bool wxDialUpManagerMSW::HangUp() GetErrorString(dwRet).c_str()); } - ms_isConnected = FALSE; + ms_isConnected = false; - return TRUE; + return true; } bool wxDialUpManagerMSW::IsAlwaysOnline() const { // assume no permanent connection by default - bool isAlwaysOnline = FALSE; + bool isAlwaysOnline = false; // try to use WinInet functions @@ -962,7 +962,7 @@ bool wxDialUpManagerMSW::IsAlwaysOnline() const bool wxDialUpManagerMSW::IsOnline() const { - wxCHECK_MSG( IsOk(), FALSE, wxT("using uninitialized wxDialUpManager") ); + wxCHECK_MSG( IsOk(), false, wxT("using uninitialized wxDialUpManager") ); if ( IsAlwaysOnline() ) { @@ -977,7 +977,7 @@ bool wxDialUpManagerMSW::IsOnline() const } else { - // return TRUE if there is at least one active connection + // return true if there is at least one active connection return FindActiveConnection() != 0; } } @@ -991,12 +991,12 @@ void wxDialUpManagerMSW::SetOnlineStatus(bool isOnline) bool wxDialUpManagerMSW::EnableAutoCheckOnlineStatus(size_t nSeconds) { - wxCHECK_MSG( IsOk(), FALSE, wxT("using uninitialized wxDialUpManager") ); + wxCHECK_MSG( IsOk(), false, wxT("using uninitialized wxDialUpManager") ); if ( m_autoCheckLevel++ ) { // already checking - return TRUE; + return true; } bool ok = ms_pfnRasConnectionNotification != 0; @@ -1010,12 +1010,12 @@ bool wxDialUpManagerMSW::EnableAutoCheckOnlineStatus(size_t nSeconds) if ( m_hThread != 0 ) { if ( ::ResumeThread(m_hThread) != (DWORD)-1 ) - return TRUE; + return true; // we're leaving a zombie thread... but what else can we do? wxLogLastError(wxT("ResumeThread(RasThread)")); - ok = FALSE; + ok = false; } } @@ -1025,7 +1025,7 @@ bool wxDialUpManagerMSW::EnableAutoCheckOnlineStatus(size_t nSeconds) if ( ok ) { // first create an event to wait on - m_data->hEventRas = CreateEvent + m_data->hEventRas = ::CreateEvent ( NULL, // security attribute (default) FALSE, // manual reset (no, it is automatic) @@ -1036,7 +1036,7 @@ bool wxDialUpManagerMSW::EnableAutoCheckOnlineStatus(size_t nSeconds) { wxLogLastError(wxT("CreateEvent(RasStatus)")); - ok = FALSE; + ok = false; } } @@ -1046,7 +1046,7 @@ bool wxDialUpManagerMSW::EnableAutoCheckOnlineStatus(size_t nSeconds) // here avoids problems with missing the event if wxDialUpManagerMSW // is created and destroyed immediately, before wxRasStatusWindowProc // starts waiting on the event - m_data->hEventQuit = CreateEvent + m_data->hEventQuit = ::CreateEvent ( NULL, // default security TRUE, // manual event @@ -1059,7 +1059,7 @@ bool wxDialUpManagerMSW::EnableAutoCheckOnlineStatus(size_t nSeconds) CleanUpThreadData(); - ok = FALSE; + ok = false; } } @@ -1078,7 +1078,7 @@ bool wxDialUpManagerMSW::EnableAutoCheckOnlineStatus(size_t nSeconds) CleanUpThreadData(); - ok = FALSE; + ok = false; } // and subclass it @@ -1130,7 +1130,7 @@ bool wxDialUpManagerMSW::EnableAutoCheckOnlineStatus(size_t nSeconds) } else { - return TRUE; + return true; } } @@ -1144,7 +1144,7 @@ bool wxDialUpManagerMSW::EnableAutoCheckOnlineStatus(size_t nSeconds) } m_timerStatusPolling.Start(nSeconds * 1000); - return TRUE; + return true; } void wxDialUpManagerMSW::DisableAutoCheckOnlineStatus() @@ -1202,10 +1202,10 @@ static DWORD wxRasMonitorThread(wxRasThreadData *data) handles[0] = data->hEventRas; handles[1] = data->hEventQuit; - bool cont = TRUE; + bool cont = true; while ( cont ) { - DWORD dwRet = WaitForMultipleObjects(2, handles, FALSE, INFINITE); + DWORD dwRet = ::WaitForMultipleObjects(2, handles, FALSE, INFINITE); switch ( dwRet ) { @@ -1216,7 +1216,7 @@ static DWORD wxRasMonitorThread(wxRasThreadData *data) break; case WAIT_OBJECT_0 + 1: - cont = FALSE; + cont = false; break; default: diff --git a/src/msw/dir.cpp b/src/msw/dir.cpp index fc9c933185..4240cd0930 100644 --- a/src/msw/dir.cpp +++ b/src/msw/dir.cpp @@ -175,7 +175,7 @@ void wxDirData::Rewind() bool wxDirData::Read(wxString *filename) { - bool first = FALSE; + bool first = false; WIN32_FIND_DATA finddata; #define PTR_TO_FINDDATA (&finddata) @@ -192,7 +192,7 @@ bool wxDirData::Read(wxString *filename) m_finddata = FindFirst(filespec, PTR_TO_FINDDATA); - first = TRUE; + first = true; } if ( !IsFindDataOk(m_finddata) ) @@ -208,7 +208,7 @@ bool wxDirData::Read(wxString *filename) #endif // __WIN32__ //else: not an error, just no (such) files - return FALSE; + return false; } const wxChar *name; @@ -218,7 +218,7 @@ bool wxDirData::Read(wxString *filename) { if ( first ) { - first = FALSE; + first = false; } else { @@ -234,7 +234,7 @@ bool wxDirData::Read(wxString *filename) #endif // __WIN32__ //else: not an error, just no more (such) files - return FALSE; + return false; } } @@ -277,7 +277,7 @@ bool wxDirData::Read(wxString *filename) break; } - return TRUE; + return true; } // ---------------------------------------------------------------------------- @@ -306,7 +306,7 @@ bool wxDir::Open(const wxString& dirname) delete M_DIR; m_data = new wxDirData(dirname); - return TRUE; + return true; } bool wxDir::IsOpened() const @@ -349,7 +349,7 @@ bool wxDir::GetFirst(wxString *filename, const wxString& filespec, int flags) const { - wxCHECK_MSG( IsOpened(), FALSE, _T("must wxDir::Open() first") ); + wxCHECK_MSG( IsOpened(), false, _T("must wxDir::Open() first") ); M_DIR->Rewind(); @@ -361,9 +361,9 @@ bool wxDir::GetFirst(wxString *filename, bool wxDir::GetNext(wxString *filename) const { - wxCHECK_MSG( IsOpened(), FALSE, _T("must wxDir::Open() first") ); + wxCHECK_MSG( IsOpened(), false, _T("must wxDir::Open() first") ); - wxCHECK_MSG( filename, FALSE, _T("bad pointer in wxDir::GetNext()") ); + wxCHECK_MSG( filename, false, _T("bad pointer in wxDir::GetNext()") ); return M_DIR->Read(filename); } @@ -386,7 +386,7 @@ wxGetDirectoryTimes(const wxString& dirname, FIND_DATA fd = FindFirst(dirname, &fs); if ( !IsFindDataOk(fd) ) { - return FALSE; + return false; } *ftAccess = fs.ftLastAccessTime; @@ -395,7 +395,7 @@ wxGetDirectoryTimes(const wxString& dirname, FindClose(fd); - return TRUE; + return true; } #endif // __WIN32__ diff --git a/src/msw/dirdlg.cpp b/src/msw/dirdlg.cpp index 30a877ce83..f3f6771ae7 100644 --- a/src/msw/dirdlg.cpp +++ b/src/msw/dirdlg.cpp @@ -226,7 +226,7 @@ BrowseCallbackProc(HWND hwnd, UINT uMsg, LPARAM lp, LPARAM pData) // // wParam = TRUE => lParam is a string and not a PIDL #ifndef __WXWINCE__ - SendMessage(hwnd, BFFM_SETSELECTION, TRUE, pData); + ::SendMessage(hwnd, BFFM_SETSELECTION, TRUE, pData); #endif break; diff --git a/src/msw/display.cpp b/src/msw/display.cpp index 86f353b6d8..ba43859eda 100644 --- a/src/msw/display.cpp +++ b/src/msw/display.cpp @@ -216,7 +216,7 @@ wxDDEnumExCallback(GUID *pGuid, return true; } -HRESULT WINAPI wxDDEnumModesCallback(LPDDSURFACEDESC lpDDSurfaceDesc, +HRESULT WINAPI wxDDEnumModesCallback(LPDDSURFACEDESC lpDDSurfaceDesc, LPVOID lpContext) { // we need at least the mode size @@ -658,7 +658,7 @@ bool wxDisplay::DoChangeModeDirectX(const wxVideoMode& mode) return false; } - + return true; } diff --git a/src/msw/dragimag.cpp b/src/msw/dragimag.cpp index 6c39b446f0..4dcd3e57f8 100644 --- a/src/msw/dragimag.cpp +++ b/src/msw/dragimag.cpp @@ -103,7 +103,7 @@ void wxDragImage::Init() m_hCursorImageList = 0; #endif m_window = (wxWindow*) NULL; - m_fullScreen = FALSE; + m_fullScreen = false; } // Attributes @@ -192,7 +192,7 @@ bool wxDragImage::Create(const wxIcon& image, const wxCursor& cursor) else flags = ILC_COLOR32; #endif - bool mask = TRUE; + bool mask = true; if ( mask ) flags |= ILC_MASK; @@ -270,7 +270,7 @@ bool wxDragImage::Create(const wxListCtrl& listCtrl, long id) POINT pt; pt.x = 0; pt.y = 0; m_hImageList = (WXHIMAGELIST) ListView_CreateDragImage((HWND) listCtrl.GetHWND(), id, & pt); - return TRUE; + return true; } #endif @@ -290,20 +290,20 @@ bool wxDragImage::BeginDrag(const wxPoint& hotspot, wxWindow* window, bool fullS { wxFAIL_MSG( _T("BeginDrag failed.") ); - return FALSE; + return false; } if (m_cursor.Ok()) { #if wxUSE_SIMPLER_DRAGIMAGE - m_oldCursor = window->GetCursor(); - window->SetCursor(m_cursor); + m_oldCursor = window->GetCursor(); + window->SetCursor(m_cursor); #else if (!m_hCursorImageList) - { - int cxCursor = GetSystemMetrics(SM_CXCURSOR); - int cyCursor = GetSystemMetrics(SM_CYCURSOR); - + { + int cxCursor = GetSystemMetrics(SM_CXCURSOR); + int cyCursor = GetSystemMetrics(SM_CYCURSOR); + m_hCursorImageList = (WXHIMAGELIST) ImageList_Create(cxCursor, cyCursor, ILC_MASK, 1, 1); } @@ -347,7 +347,7 @@ bool wxDragImage::BeginDrag(const wxPoint& hotspot, wxWindow* window, bool fullS ::SetCapture(GetHwndOf(window)); - return TRUE; + return true; } // Begin drag. hotspot is the location of the drag position relative to the upper-left @@ -359,7 +359,7 @@ bool wxDragImage::BeginDrag(const wxPoint& hotspot, wxWindow* window, wxWindow* int x = fullScreenRect->GetPosition().x; int y = fullScreenRect->GetPosition().y; - + wxSize sz = fullScreenRect->GetSize(); if (fullScreenRect->GetParent() && !fullScreenRect->IsKindOf(CLASSINFO(wxFrame))) @@ -368,7 +368,7 @@ bool wxDragImage::BeginDrag(const wxPoint& hotspot, wxWindow* window, wxWindow* rect.x = x; rect.y = y; rect.width = sz.x; rect.height = sz.y; - return BeginDrag(hotspot, window, TRUE, & rect); + return BeginDrag(hotspot, window, true, & rect); } // End drag @@ -385,14 +385,14 @@ bool wxDragImage::EndDrag() #if wxUSE_SIMPLER_DRAGIMAGE if (m_cursor.Ok() && m_oldCursor.Ok()) - m_window->SetCursor(m_oldCursor); + m_window->SetCursor(m_oldCursor); #else ::ShowCursor(TRUE); #endif m_window = (wxWindow*) NULL; - return TRUE; + return true; } // Move the image: call from OnMouseMove. Pt is in window client coordinates if window -- 2.45.2