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
This commit is contained in:
Włodzimierz Skiba
2005-01-04 19:43:04 +00:00
parent ec157c8f95
commit 46697f31a5
7 changed files with 15 additions and 15 deletions

View File

@@ -143,7 +143,7 @@ void MyResizableListCtrl::SetColumnWidths()
// Subtract width of other columns, scrollbar, and some padding // Subtract width of other columns, scrollbar, and some padding
leftmostColumnWidth -= GetColumnWidth( ACTION_COLUMN ); leftmostColumnWidth -= GetColumnWidth( ACTION_COLUMN );
leftmostColumnWidth -= GetColumnWidth( PRIORITY_COLUMN ); leftmostColumnWidth -= GetColumnWidth( PRIORITY_COLUMN );
leftmostColumnWidth -= wxSystemSettings::GetSystemMetric( wxSYS_VSCROLL_X ); leftmostColumnWidth -= wxSystemSettings::GetMetric( wxSYS_VSCROLL_X );
leftmostColumnWidth -= 5; leftmostColumnWidth -= 5;
// Set the column width to the new value. // Set the column width to the new value.

View File

@@ -222,8 +222,8 @@ wxSize wxControl::GetBestSpinerSize(const bool is_vertical) const
#if defined(__SMARTPHONE__) && defined(__WXWINCE__) #if defined(__SMARTPHONE__) && defined(__WXWINCE__)
0,GetCharHeight() 0,GetCharHeight()
#else #else
GetSystemMetrics(is_vertical ? SM_CXVSCROLL : SM_CXHSCROLL), ::GetSystemMetrics(is_vertical ? SM_CXVSCROLL : SM_CXHSCROLL),
GetSystemMetrics(is_vertical ? SM_CYVSCROLL : SM_CYHSCROLL) ::GetSystemMetrics(is_vertical ? SM_CYVSCROLL : SM_CYHSCROLL)
#endif #endif
); );

View File

@@ -301,8 +301,8 @@ bool wxDragImage::BeginDrag(const wxPoint& hotspot, wxWindow* window, bool fullS
#else #else
if (!m_hCursorImageList) if (!m_hCursorImageList)
{ {
int cxCursor = GetSystemMetrics(SM_CXCURSOR); int cxCursor = ::GetSystemMetrics(SM_CXCURSOR);
int cyCursor = GetSystemMetrics(SM_CYCURSOR); int cyCursor = ::GetSystemMetrics(SM_CYCURSOR);
m_hCursorImageList = (WXHIMAGELIST) ImageList_Create(cxCursor, cyCursor, ILC_MASK, 1, 1); m_hCursorImageList = (WXHIMAGELIST) ImageList_Create(cxCursor, cyCursor, ILC_MASK, 1, 1);
} }

View File

@@ -62,7 +62,7 @@ void wxEnablePenAppHooks (bool hook)
/////////////////////////////////////////////////////////////////////// ///////////////////////////////////////////////////////////////////////
// If running on a Pen Windows system, register this app so all // If running on a Pen Windows system, register this app so all
// EDIT controls in dialogs are replaced by HEDIT controls. // 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 // We do this fancy GetProcAddress simply because we don't
// know if we're running Pen Windows. // know if we're running Pen Windows.
@@ -97,7 +97,7 @@ void wxRegisterPenWin(void)
// (Notice the CONTROL statement in the RC file is "EDIT", // (Notice the CONTROL statement in the RC file is "EDIT",
// RegisterPenApp will automatically change that control to // RegisterPenApp will automatically change that control to
// an HEDIT. // 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 // We do this fancy GetProcAddress simply because we don't
// know if we're running Pen Windows. // know if we're running Pen Windows.
if ( (RegPenApp = (void (CALLBACK *)(WORD, BOOL))GetProcAddress(g_hPenWin, "RegisterPenApp"))!= NULL) if ( (RegPenApp = (void (CALLBACK *)(WORD, BOOL))GetProcAddress(g_hPenWin, "RegisterPenApp"))!= NULL)

View File

@@ -260,7 +260,7 @@ wxFont wxSystemSettingsNative::GetFont(wxSystemFont index)
return *gs_fontDefault; return *gs_fontDefault;
#else // !__WXWINCE__ #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 // called fairly often -- this is why we cache this particular font
const bool isDefaultRequested = index == wxSYS_DEFAULT_GUI_FONT; const bool isDefaultRequested = index == wxSYS_DEFAULT_GUI_FONT;
if ( isDefaultRequested ) if ( isDefaultRequested )

View File

@@ -716,8 +716,8 @@ bool wxTreeCtrl::Create(wxWindow *parent,
HDC hdcMem = CreateCompatibleDC(NULL); HDC hdcMem = CreateCompatibleDC(NULL);
// create a mono bitmap of the standard size // create a mono bitmap of the standard size
int x = GetSystemMetrics(SM_CXMENUCHECK); int x = ::GetSystemMetrics(SM_CXMENUCHECK);
int y = GetSystemMetrics(SM_CYMENUCHECK); int y = ::GetSystemMetrics(SM_CYMENUCHECK);
wxImageList imagelistCheckboxes(x, y, false, 2); wxImageList imagelistCheckboxes(x, y, false, 2);
HBITMAP hbmpCheck = CreateBitmap(x, y, // bitmap size HBITMAP hbmpCheck = CreateBitmap(x, y, // bitmap size
1, // # of color planes 1, // # of color planes
@@ -2225,7 +2225,7 @@ WXLRESULT wxTreeCtrl::MSWWindowProc(WXUINT nMsg, WXWPARAM wParam, WXLPARAM lPara
event.m_item = GetSelection(); event.m_item = GetSelection();
event.SetEventObject( this ); event.SetEventObject( this );
GetEventHandler()->ProcessEvent( event ); GetEventHandler()->ProcessEvent( event );
return rc; return rc;
} }

View File

@@ -58,7 +58,7 @@ ctSettings::ctSettings()
m_frameSize = wxRect(10, 10, 600, 500); m_frameSize = wxRect(10, 10, 600, 500);
// m_backgroundColour = wxColour(140, 172, 179); // blue-grey // 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_appName = wxT("wxWidgets Configuration Tool");
m_appNameShort = wxT("Configuration Tool"); m_appNameShort = wxT("Configuration Tool");
@@ -123,7 +123,7 @@ void ctSettings::Copy (const ctSettings& settings)
bool ctSettings::Init() bool ctSettings::Init()
{ {
m_lastSetupSaveDir = wxEmptyString; m_lastSetupSaveDir = wxEmptyString;
if (m_userName.IsEmpty()) if (m_userName.empty())
m_userName = wxGetUserName(); m_userName = wxGetUserName();
return true; return true;
@@ -133,7 +133,7 @@ bool ctSettings::Init()
wxString ctSettings::GenerateFilename(const wxString& rootName) wxString ctSettings::GenerateFilename(const wxString& rootName)
{ {
wxString path; wxString path;
if (!m_lastFilename.IsEmpty()) if (!m_lastFilename.empty())
path = wxPathOnly(m_lastFilename); path = wxPathOnly(m_lastFilename);
else else
path = wxGetApp().GetAppDir(); path = wxGetApp().GetAppDir();
@@ -196,7 +196,7 @@ bool ctSettings::LoadConfig()
fontSpec = wxEmptyString; fontSpec = wxEmptyString;
config.Read(wxT("Style/EditWindowFont"), & fontSpec); config.Read(wxT("Style/EditWindowFont"), & fontSpec);
if (!fontSpec.IsEmpty()) if (!fontSpec.empty())
m_editWindowFont = apStringToFont(fontSpec); m_editWindowFont = apStringToFont(fontSpec);
// Crash-resistance // Crash-resistance