From 46697f31a56e92d865bb7a90a6093de14d4e8e5f Mon Sep 17 00:00:00 2001 From: =?utf8?q?W=C5=82odzimierz=20Skiba?= Date: Tue, 4 Jan 2005 19:43:04 +0000 Subject: [PATCH] Old API depreciated. Use of new API. Source cleaning. git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@31235 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775 --- samples/xrc/custclas.cpp | 2 +- src/msw/control.cpp | 4 ++-- src/msw/dragimag.cpp | 4 ++-- src/msw/penwin.cpp | 4 ++-- src/msw/settings.cpp | 2 +- src/msw/treectrl.cpp | 6 +++--- utils/configtool/src/appsettings.cpp | 8 ++++---- 7 files changed, 15 insertions(+), 15 deletions(-) diff --git a/samples/xrc/custclas.cpp b/samples/xrc/custclas.cpp index 24669047db..a356a21c04 100644 --- a/samples/xrc/custclas.cpp +++ b/samples/xrc/custclas.cpp @@ -143,7 +143,7 @@ void MyResizableListCtrl::SetColumnWidths() // Subtract width of other columns, scrollbar, and some padding leftmostColumnWidth -= GetColumnWidth( ACTION_COLUMN ); leftmostColumnWidth -= GetColumnWidth( PRIORITY_COLUMN ); - leftmostColumnWidth -= wxSystemSettings::GetSystemMetric( wxSYS_VSCROLL_X ); + leftmostColumnWidth -= wxSystemSettings::GetMetric( wxSYS_VSCROLL_X ); leftmostColumnWidth -= 5; // Set the column width to the new value. diff --git a/src/msw/control.cpp b/src/msw/control.cpp index b83a78ae32..a74b5721ca 100644 --- a/src/msw/control.cpp +++ b/src/msw/control.cpp @@ -222,8 +222,8 @@ wxSize wxControl::GetBestSpinerSize(const bool is_vertical) const #if defined(__SMARTPHONE__) && defined(__WXWINCE__) 0,GetCharHeight() #else - GetSystemMetrics(is_vertical ? SM_CXVSCROLL : SM_CXHSCROLL), - GetSystemMetrics(is_vertical ? SM_CYVSCROLL : SM_CYHSCROLL) + ::GetSystemMetrics(is_vertical ? SM_CXVSCROLL : SM_CXHSCROLL), + ::GetSystemMetrics(is_vertical ? SM_CYVSCROLL : SM_CYHSCROLL) #endif ); diff --git a/src/msw/dragimag.cpp b/src/msw/dragimag.cpp index 4dcd3e57f8..b56c1ef18a 100644 --- a/src/msw/dragimag.cpp +++ b/src/msw/dragimag.cpp @@ -301,8 +301,8 @@ bool wxDragImage::BeginDrag(const wxPoint& hotspot, wxWindow* window, bool fullS #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); } diff --git a/src/msw/penwin.cpp b/src/msw/penwin.cpp index 8a32c9f708..ec3a6fccbb 100644 --- a/src/msw/penwin.cpp +++ b/src/msw/penwin.cpp @@ -62,7 +62,7 @@ void wxEnablePenAppHooks (bool hook) /////////////////////////////////////////////////////////////////////// // If running on a Pen Windows system, register this app so all // EDIT controls in dialogs are replaced by HEDIT controls. - if ((g_hPenWin = (HANDLE)GetSystemMetrics (SM_PENWINDOWS)) != (HANDLE) NULL) + if ((g_hPenWin = (HANDLE)::GetSystemMetrics (SM_PENWINDOWS)) != (HANDLE) NULL) { // We do this fancy GetProcAddress simply because we don't // know if we're running Pen Windows. @@ -97,7 +97,7 @@ void wxRegisterPenWin(void) // (Notice the CONTROL statement in the RC file is "EDIT", // RegisterPenApp will automatically change that control to // an HEDIT. - if ((g_hPenWin = (HANDLE)GetSystemMetrics(SM_PENWINDOWS)) != (HANDLE)NULL) { + if ((g_hPenWin = (HANDLE)::GetSystemMetrics(SM_PENWINDOWS)) != (HANDLE)NULL) { // We do this fancy GetProcAddress simply because we don't // know if we're running Pen Windows. if ( (RegPenApp = (void (CALLBACK *)(WORD, BOOL))GetProcAddress(g_hPenWin, "RegisterPenApp"))!= NULL) diff --git a/src/msw/settings.cpp b/src/msw/settings.cpp index 4e3e760cb1..b4436ce624 100644 --- a/src/msw/settings.cpp +++ b/src/msw/settings.cpp @@ -260,7 +260,7 @@ wxFont wxSystemSettingsNative::GetFont(wxSystemFont index) return *gs_fontDefault; #else // !__WXWINCE__ - // wxWindow ctor calls GetSystemFont(wxSYS_DEFAULT_GUI_FONT) so we're + // wxWindow ctor calls GetFont(wxSYS_DEFAULT_GUI_FONT) so we're // called fairly often -- this is why we cache this particular font const bool isDefaultRequested = index == wxSYS_DEFAULT_GUI_FONT; if ( isDefaultRequested ) diff --git a/src/msw/treectrl.cpp b/src/msw/treectrl.cpp index b74ae1f2ae..3ce3398cb0 100644 --- a/src/msw/treectrl.cpp +++ b/src/msw/treectrl.cpp @@ -716,8 +716,8 @@ bool wxTreeCtrl::Create(wxWindow *parent, HDC hdcMem = CreateCompatibleDC(NULL); // create a mono bitmap of the standard size - int x = GetSystemMetrics(SM_CXMENUCHECK); - int y = GetSystemMetrics(SM_CYMENUCHECK); + int x = ::GetSystemMetrics(SM_CXMENUCHECK); + int y = ::GetSystemMetrics(SM_CYMENUCHECK); wxImageList imagelistCheckboxes(x, y, false, 2); HBITMAP hbmpCheck = CreateBitmap(x, y, // bitmap size 1, // # of color planes @@ -2225,7 +2225,7 @@ WXLRESULT wxTreeCtrl::MSWWindowProc(WXUINT nMsg, WXWPARAM wParam, WXLPARAM lPara event.m_item = GetSelection(); event.SetEventObject( this ); GetEventHandler()->ProcessEvent( event ); - + return rc; } diff --git a/utils/configtool/src/appsettings.cpp b/utils/configtool/src/appsettings.cpp index 17f4a0f70b..19c0104dab 100644 --- a/utils/configtool/src/appsettings.cpp +++ b/utils/configtool/src/appsettings.cpp @@ -58,7 +58,7 @@ ctSettings::ctSettings() m_frameSize = wxRect(10, 10, 600, 500); // m_backgroundColour = wxColour(140, 172, 179); // blue-grey - m_editWindowFont = wxSystemSettings::GetSystemFont(wxSYS_DEFAULT_GUI_FONT); + m_editWindowFont = wxSystemSettings::GetFont(wxSYS_DEFAULT_GUI_FONT); m_appName = wxT("wxWidgets Configuration Tool"); m_appNameShort = wxT("Configuration Tool"); @@ -123,7 +123,7 @@ void ctSettings::Copy (const ctSettings& settings) bool ctSettings::Init() { m_lastSetupSaveDir = wxEmptyString; - if (m_userName.IsEmpty()) + if (m_userName.empty()) m_userName = wxGetUserName(); return true; @@ -133,7 +133,7 @@ bool ctSettings::Init() wxString ctSettings::GenerateFilename(const wxString& rootName) { wxString path; - if (!m_lastFilename.IsEmpty()) + if (!m_lastFilename.empty()) path = wxPathOnly(m_lastFilename); else path = wxGetApp().GetAppDir(); @@ -196,7 +196,7 @@ bool ctSettings::LoadConfig() fontSpec = wxEmptyString; config.Read(wxT("Style/EditWindowFont"), & fontSpec); - if (!fontSpec.IsEmpty()) + if (!fontSpec.empty()) m_editWindowFont = apStringToFont(fontSpec); // Crash-resistance -- 2.45.2