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:
@@ -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.
|
||||
|
@@ -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
|
||||
);
|
||||
|
||||
|
@@ -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);
|
||||
}
|
||||
|
@@ -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)
|
||||
|
@@ -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 )
|
||||
|
@@ -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
|
||||
|
@@ -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
|
||||
|
Reference in New Issue
Block a user