use wxDynamicLibrary::GetSymbolAorW() instead of duplicating its functionality with macros
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@38114 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This commit is contained in:
@@ -1,12 +1,12 @@
|
|||||||
/////////////////////////////////////////////////////////////////////////////
|
/////////////////////////////////////////////////////////////////////////////
|
||||||
// Name: src/msw/display.cpp
|
// Name: src/msw/display.cpp
|
||||||
// Purpose: MSW Implementation of wxDisplay class
|
// Purpose: MSW Implementation of wxDisplay class
|
||||||
// Author: Royce Mitchell III
|
// Author: Royce Mitchell III, Vadim Zeitlin
|
||||||
// Modified by: VZ (resolutions enumeration/change support, DirectDraw, ...)
|
// Modified by: Ryan Norton (IsPrimary override)
|
||||||
// Ryan Norton (IsPrimary override)
|
|
||||||
// Created: 06/21/02
|
// Created: 06/21/02
|
||||||
// RCS-ID: $Id$
|
// RCS-ID: $Id$
|
||||||
// Copyright: (c) wxWidgets team
|
// Copyright: (c) wxWidgets team
|
||||||
|
// Copyright: (c) 2002-2006 wxWidgets team
|
||||||
// Licence: wxWindows licence
|
// Licence: wxWindows licence
|
||||||
/////////////////////////////////////////////////////////////////////////////
|
/////////////////////////////////////////////////////////////////////////////
|
||||||
|
|
||||||
@@ -65,16 +65,6 @@ const GUID wxIID_IDirectDraw2 =
|
|||||||
{ 0xB3A6F3E0, 0x2B43, 0x11CF, { 0xA2,0xDE,0x00,0xAA,0x00,0xB9,0x33,0x56 } };
|
{ 0xB3A6F3E0, 0x2B43, 0x11CF, { 0xA2,0xDE,0x00,0xAA,0x00,0xB9,0x33,0x56 } };
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
// ----------------------------------------------------------------------------
|
|
||||||
// macros
|
|
||||||
// ----------------------------------------------------------------------------
|
|
||||||
|
|
||||||
#ifdef _UNICODE
|
|
||||||
#define WINFUNC(x) _T(#x) L"W"
|
|
||||||
#else
|
|
||||||
#define WINFUNC(x) #x "A"
|
|
||||||
#endif
|
|
||||||
|
|
||||||
// ----------------------------------------------------------------------------
|
// ----------------------------------------------------------------------------
|
||||||
// typedefs for dynamically loaded Windows functions
|
// typedefs for dynamically loaded Windows functions
|
||||||
// ----------------------------------------------------------------------------
|
// ----------------------------------------------------------------------------
|
||||||
@@ -195,7 +185,7 @@ static bool OsSupportsMultipleMonitors()
|
|||||||
gs_MonitorFromWindow = (MonitorFromWindow_t)
|
gs_MonitorFromWindow = (MonitorFromWindow_t)
|
||||||
dllUser32.GetSymbol(wxT("MonitorFromWindow"));
|
dllUser32.GetSymbol(wxT("MonitorFromWindow"));
|
||||||
gs_GetMonitorInfo = (GetMonitorInfo_t)
|
gs_GetMonitorInfo = (GetMonitorInfo_t)
|
||||||
dllUser32.GetSymbol(WINFUNC(GetMonitorInfo));
|
dllUser32.GetSymbolAorW(wxT("GetMonitorInfo"));
|
||||||
if ( gs_EnumDisplayMonitors != NULL &&
|
if ( gs_EnumDisplayMonitors != NULL &&
|
||||||
gs_MonitorFromPoint != NULL &&
|
gs_MonitorFromPoint != NULL &&
|
||||||
gs_MonitorFromWindow != NULL &&
|
gs_MonitorFromWindow != NULL &&
|
||||||
@@ -318,7 +308,7 @@ static bool DoInitDirectX()
|
|||||||
return false;
|
return false;
|
||||||
|
|
||||||
DirectDrawEnumerateEx_t pDDEnumEx = (DirectDrawEnumerateEx_t)
|
DirectDrawEnumerateEx_t pDDEnumEx = (DirectDrawEnumerateEx_t)
|
||||||
dllDX.GetSymbol(WINFUNC(DirectDrawEnumerateEx));
|
dllDX.GetSymbolAorW(_T("DirectDrawEnumerateEx"));
|
||||||
if ( !pDDEnumEx )
|
if ( !pDDEnumEx )
|
||||||
return false;
|
return false;
|
||||||
|
|
||||||
@@ -867,7 +857,7 @@ bool wxDisplay::DoChangeModeWindows(const wxVideoMode& mode)
|
|||||||
if ( dllUser32.IsLoaded() )
|
if ( dllUser32.IsLoaded() )
|
||||||
{
|
{
|
||||||
pfnChangeDisplaySettingsEx = (ChangeDisplaySettingsEx_t)
|
pfnChangeDisplaySettingsEx = (ChangeDisplaySettingsEx_t)
|
||||||
dllUser32.GetSymbol(WINFUNC(ChangeDisplaySettingsEx));
|
dllUser32.GetSymbolAorW(_T("ChangeDisplaySettingsEx"));
|
||||||
}
|
}
|
||||||
//else: huh, no user32.dll??
|
//else: huh, no user32.dll??
|
||||||
|
|
||||||
|
Reference in New Issue
Block a user