X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/7f555861b7e50f335c7b929bb76be38e9ebd69c5..520e470fdd0daef09c77938db642e4583933c90d:/src/msw/utils.cpp diff --git a/src/msw/utils.cpp b/src/msw/utils.cpp index 9cb654cd38..447b3be632 100644 --- a/src/msw/utils.cpp +++ b/src/msw/utils.cpp @@ -10,9 +10,7 @@ ///////////////////////////////////////////////////////////////////////////// #ifdef __GNUG__ -// Note: this is done in utilscmn.cpp now. -// #pragma implementation -// #pragma implementation "utils.h" +// #pragma implementation "utils.h" // Note: this is done in utilscmn.cpp now. #endif // For compilers that support precompilation, includes "wx.h". @@ -189,7 +187,7 @@ bool wxGetUserName(char *buf, int maxSize) return *buf ? TRUE : FALSE; // } #else -#if !defined(__WATCOMC__) && !defined(__GNUWIN32__) && USE_PENWINDOWS +#if !defined(__WATCOMC__) && !defined(__GNUWIN32__) && wxUSE_PENWINDOWS extern HANDLE g_hPenWin; // PenWindows Running? if (g_hPenWin) { @@ -366,7 +364,7 @@ int wxGetOsVersion(int *majorVsn, int *minorVsn) # ifdef __WINDOWS_386__ retValue = wxWIN386; # else -# if !defined(__WATCOMC__) && !defined(GNUWIN32) && USE_PENWINDOWS +# if !defined(__WATCOMC__) && !defined(GNUWIN32) && wxUSE_PENWINDOWS extern HANDLE g_hPenWin; retValue = g_hPenWin ? wxPENWINDOWS : wxWINDOWS ; # endif @@ -379,7 +377,7 @@ int wxGetOsVersion(int *majorVsn, int *minorVsn) } // Reading and writing resources (eg WIN.INI, .Xdefaults) -#if USE_RESOURCES +#if wxUSE_RESOURCES bool wxWriteResource(const wxString& section, const wxString& entry, const wxString& value, const wxString& file) { if (file != "") @@ -469,7 +467,7 @@ bool wxGetResource(const wxString& section, const wxString& entry, int *value, c } else return FALSE; } -#endif // USE_RESOURCES +#endif // wxUSE_RESOURCES // Old cursor static HCURSOR wxBusyCursorOld = 0; @@ -731,6 +729,16 @@ bool wxDirExists(const wxString& dir) #endif } +wxString WXDLLEXPORT wxGetWindowText(WXHWND hWnd) +{ + wxString str; + int len = GetWindowTextLength((HWND)hWnd) + 1; + GetWindowText((HWND)hWnd, str.GetWriteBuf(len), len); + str.UngetWriteBuf(); + + return str; +} + #if 0 //------------------------------------------------------------------------ // wild character routines