Fixes compiling the wince interface for desktop windows

git-svn-id: trunk@19827 -
This commit is contained in:
sekelsenmat 2009-05-06 14:45:03 +00:00
parent df85c2d5c1
commit 8c14b33a27
2 changed files with 11 additions and 3 deletions

View File

@ -110,11 +110,19 @@ type
TimerFunc: TFNTimerProc; // owner function to handle timer
end;
{$ifdef WinCE}
function EnumDisplayMonitors(hdc: HDC; lprcClip: PRect; lpfnEnum: MONITORENUMPROC; dwData: LPARAM): LongBool; cdecl; external KernelDLL name 'EnumDisplayMonitors';
function GetMonitorInfo(hMonitor: HMONITOR; lpmi: PMonitorInfo): LongBool; cdecl; external KernelDLL name 'GetMonitorInfo';
function GetMonitorInfoW(hMonitor: HMONITOR; lpmi: PMonitorInfo): LongBool; cdecl; external KernelDLL name 'GetMonitorInfo';
function MonitorFromWindow(hWnd: HWND; dwFlags: DWORD): HMONITOR; cdecl; external KernelDLL name 'MonitorFromWindow';
function MonitorFromRect(lprcScreenCoords: PRect; dwFlags: DWord): HMONITOR; cdecl; external KernelDLL name 'MonitorFromRect';
function MonitorFromPoint(ptScreenCoords: TPoint; dwFlags: DWord): HMONITOR; cdecl; external KernelDLL name 'MonitorFromPoint';
{$else}
function EnumDisplayMonitors(hdc: HDC; lprcClip: PRect; lpfnEnum: MONITORENUMPROC; dwData: LPARAM): LongBool; stdcall; external 'user32.dll' name 'EnumDisplayMonitors';
function GetMonitorInfoW(hMonitor: HMONITOR; lpmi: PMonitorInfo): LongBool; stdcall; external 'user32.dll' name 'GetMonitorInfoW';
function MonitorFromWindow(hWnd: HWND; dwFlags: DWORD): HMONITOR; stdcall; external 'user32.dll' name 'MonitorFromWindow';
function MonitorFromRect(lprcScreenCoords: PRect; dwFlags: DWord): HMONITOR; stdcall; external 'user32.dll' name 'MonitorFromRect';
function MonitorFromPoint(ptScreenCoords: TPoint; dwFlags: DWord): HMONITOR; stdcall; external 'user32.dll' name 'MonitorFromPoint';
{$endif}
var
// FTimerData contains the currently running timers

View File

@ -1357,14 +1357,14 @@ begin
if (lpmi <> nil) and (lpmi^.cbSize >= SizeOf(TMonitorInfoEx)) then
begin
LocalInfo.cbSize := SizeOf(TMonitorInfoExW);
Result := WinCEDef.GetMonitorInfo(hMonitor, @LocalInfo);
Result := WinCEDef.GetMonitorInfoW(hMonitor, @LocalInfo);
lpmi^.rcMonitor := LocalInfo.rcMonitor;
lpmi^.rcWork := LocalInfo.rcWork;
lpmi^.dwFlags := LocalInfo.dwFlags;
PMonitorInfoEx(lpmi)^.szDevice := UTF16ToUTF8(LocalInfo.szDevice);
end
else
Result := WinCEDef.GetMonitorInfo(hMonitor, lpmi);
Result := WinCEDef.GetMonitorInfoW(hMonitor, lpmi);
end;
{------------------------------------------------------------------------------