Include order is wxprec.h=>defs.h=>platform.h=>setup.h so remove explicit setup.h inclusion not touched by chckconf.h.
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@37162 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This commit is contained in:
@@ -1,5 +1,5 @@
|
||||
///////////////////////////////////////////////////////////////////////////////
|
||||
// Name: os2/utilsgui.cpp
|
||||
// Name: src/os2/utilsgui.cpp
|
||||
// Purpose: Various utility functions only available in GUI
|
||||
// Author: David Webster
|
||||
// Modified by:
|
||||
@@ -25,7 +25,6 @@
|
||||
#endif
|
||||
|
||||
#ifndef WX_PRECOMP
|
||||
#include "wx/setup.h"
|
||||
#include "wx/utils.h"
|
||||
#include "wx/app.h"
|
||||
#include "wx/cursor.h"
|
||||
@@ -69,7 +68,7 @@ bool wxWriteResource(
|
||||
HAB hab = 0;
|
||||
HINI hIni = 0;
|
||||
|
||||
if (rFile != "")
|
||||
if (!rFile.empty())
|
||||
{
|
||||
hIni = ::PrfOpenProfile(hab, (PSZ)WXSTRINGCAST rFile);
|
||||
if (hIni != 0L)
|
||||
@@ -153,7 +152,7 @@ bool wxGetResource(
|
||||
wxChar zDefunkt[] = _T("$$default");
|
||||
char zBuf[1000];
|
||||
|
||||
if (rFile != "")
|
||||
if (!rFile.empty())
|
||||
{
|
||||
hIni = ::PrfOpenProfile(hab, (PSZ)WXSTRINGCAST rFile);
|
||||
if (hIni != 0L)
|
||||
@@ -484,7 +483,7 @@ void wxGUIAppTraits::TerminateGui(unsigned long ulHab)
|
||||
|
||||
wxToolkitInfo & wxGUIAppTraits::GetToolkitInfo()
|
||||
{
|
||||
static wxToolkitInfo vInfo;
|
||||
static wxToolkitInfo vInfo;
|
||||
ULONG ulSysInfo[QSV_MAX] = {0};
|
||||
APIRET ulrc;
|
||||
|
||||
@@ -512,44 +511,40 @@ wxToolkitInfo & wxGUIAppTraits::GetToolkitInfo()
|
||||
// window information functions
|
||||
// ---------------------------------------------------------------------------
|
||||
|
||||
wxString WXDLLEXPORT wxGetWindowText(
|
||||
WXHWND hWnd
|
||||
)
|
||||
wxString WXDLLEXPORT wxGetWindowText( WXHWND hWnd )
|
||||
{
|
||||
wxString vStr;
|
||||
wxString vStr;
|
||||
|
||||
if ( hWnd )
|
||||
{
|
||||
long lLen = ::WinQueryWindowTextLength((HWND)hWnd) + 1;
|
||||
::WinQueryWindowText((HWND)hWnd, lLen, (PSZ)(wxChar*)wxStringBuffer(vStr, lLen));
|
||||
long lLen = ::WinQueryWindowTextLength((HWND)hWnd) + 1;
|
||||
::WinQueryWindowText((HWND)hWnd, lLen, (PSZ)(wxChar*)wxStringBuffer(vStr, lLen));
|
||||
}
|
||||
|
||||
return vStr;
|
||||
}
|
||||
|
||||
wxString WXDLLEXPORT wxGetWindowClass(
|
||||
WXHWND hWnd
|
||||
)
|
||||
wxString WXDLLEXPORT wxGetWindowClass( WXHWND hWnd )
|
||||
{
|
||||
wxString vStr;
|
||||
wxString vStr;
|
||||
if ( hWnd )
|
||||
{
|
||||
int nLen = 256; // some starting value
|
||||
int nLen = 256; // some starting value
|
||||
|
||||
for ( ;; )
|
||||
{
|
||||
int nCount = ::WinQueryClassName((HWND)hWnd, nLen, (PSZ)(wxChar*)wxStringBuffer(vStr, nLen));
|
||||
for ( ;; )
|
||||
{
|
||||
int nCount = ::WinQueryClassName((HWND)hWnd, nLen, (PSZ)(wxChar*)wxStringBuffer(vStr, nLen));
|
||||
|
||||
if (nCount == nLen )
|
||||
{
|
||||
// the class name might have been truncated, retry with larger
|
||||
// buffer
|
||||
nLen *= 2;
|
||||
}
|
||||
else
|
||||
{
|
||||
break;
|
||||
}
|
||||
if (nCount == nLen )
|
||||
{
|
||||
// the class name might have been truncated, retry with larger
|
||||
// buffer
|
||||
nLen *= 2;
|
||||
}
|
||||
else
|
||||
{
|
||||
break;
|
||||
}
|
||||
}
|
||||
}
|
||||
return vStr;
|
||||
|
||||
Reference in New Issue
Block a user