mirror of
https://gitlab.com/freepascal.org/lazarus/lazarus.git
synced 2025-08-13 18:29:12 +02:00
Fixes compiling the wince interface for desktop windows
git-svn-id: trunk@19827 -
This commit is contained in:
parent
df85c2d5c1
commit
8c14b33a27
@ -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
|
||||
|
@ -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;
|
||||
|
||||
{------------------------------------------------------------------------------
|
||||
|
Loading…
Reference in New Issue
Block a user