X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/03647350fc7cd141953c72e0284e928847d30f44..be74a2a21a491f5d0ec6a333b2fdc4bedb578eaa:/src/msw/utilsgui.cpp?ds=sidebyside diff --git a/src/msw/utilsgui.cpp b/src/msw/utilsgui.cpp index 513a56f810..7c44c41a18 100644 --- a/src/msw/utilsgui.cpp +++ b/src/msw/utilsgui.cpp @@ -1,12 +1,12 @@ /////////////////////////////////////////////////////////////////////////////// -// Name: msw/utilsgui.cpp +// Name: src/msw/utilsgui.cpp // Purpose: Various utility functions only available in GUI // Author: Vadim Zeitlin // Modified by: // Created: 21.06.2003 (extracted from msw/utils.cpp) // RCS-ID: $Id$ // Copyright: (c) Julian Smart -// License: wxWindows licence +// Licence: wxWindows licence /////////////////////////////////////////////////////////////////////////////// // ============================================================================ @@ -104,44 +104,6 @@ bool wxCheckForInterrupt(wxWindow *wnd) return true; } -// MSW only: get user-defined resource from the .res file. -// Returns NULL or newly-allocated memory, so use delete[] to clean up. - -#ifndef __WXMICROWIN__ -wxChar *wxLoadUserResource(const wxString& resourceName, const wxString& resourceType) -{ - HRSRC hResource = ::FindResource(wxGetInstance(), - resourceName.wx_str(), - resourceType.wx_str()); - if ( hResource == 0 ) - return NULL; - - HGLOBAL hData = ::LoadResource(wxGetInstance(), hResource); - if ( hData == 0 ) - return NULL; - - wxChar *theText = (wxChar *)::LockResource(hData); - if ( !theText ) - return NULL; - - // Not all compilers put a zero at the end of the resource (e.g. BC++ doesn't). - // so we need to find the length of the resource. - int len = ::SizeofResource(wxGetInstance(), hResource) + 1; - wxChar *s = new wxChar[len]; - wxStrlcpy(s, theText, len); - - // Obsolete in WIN32 -#ifndef __WIN32__ - UnlockResource(hData); -#endif - - // No need?? - // GlobalFree(hData); - - return s; -} -#endif // __WXMICROWIN__ - // ---------------------------------------------------------------------------- // get display info // ---------------------------------------------------------------------------- @@ -151,7 +113,7 @@ wxChar *wxLoadUserResource(const wxString& resourceName, const wxString& resourc void wxGetMousePosition( int* x, int* y ) { POINT pt; - GetCursorPos( & pt ); + wxGetCursorPosMSW( & pt ); if ( x ) *x = pt.x; if ( y ) *y = pt.y; } @@ -412,7 +374,6 @@ bool wxLaunchDefaultApplication(const wxString& document, int flags) WinStruct sei; sei.lpFile = document.wx_str(); - sei.lpVerb = wxT("open"); #ifdef __WXWINCE__ sei.nShow = SW_SHOWNORMAL; // SW_SHOWDEFAULT not defined under CE (#10216) #else