mirror of
https://gitlab.com/freepascal.org/lazarus/lazarus.git
synced 2025-08-31 17:20:37 +02:00
LCL-CustomDrawn-Windows: Fixes compilation
git-svn-id: trunk@34338 -
This commit is contained in:
parent
ac028a407b
commit
3625472f5d
@ -94,6 +94,16 @@ begin
|
|||||||
inherited Create;
|
inherited Create;
|
||||||
FTimerData := TList.Create;
|
FTimerData := TList.Create;
|
||||||
|
|
||||||
|
// Create the dummy screen DC
|
||||||
|
ScreenBitmapRawImage.Init;
|
||||||
|
ScreenBitmapHeight := 100;
|
||||||
|
ScreenBitmapWidth := 100;
|
||||||
|
ScreenBitmapRawImage.Description.Init_BPP32_A8R8G8B8_BIO_TTB(ScreenBitmapWidth, ScreenBitmapHeight);
|
||||||
|
ScreenBitmapRawImage.CreateData(True);
|
||||||
|
ScreenImage := TLazIntfImage.Create(0, 0);
|
||||||
|
ScreenImage.SetRawImage(ScreenBitmapRawImage);
|
||||||
|
ScreenDC := TLazCanvas.Create(ScreenImage);
|
||||||
|
|
||||||
// Metrics always fail because SPI_GETNONCLIENTMETRICS doesn't exist under WinCE
|
// Metrics always fail because SPI_GETNONCLIENTMETRICS doesn't exist under WinCE
|
||||||
// So we need to get the fonts by other means
|
// So we need to get the fonts by other means
|
||||||
FMetrics.cbSize := SizeOf(FMetrics);
|
FMetrics.cbSize := SizeOf(FMetrics);
|
||||||
@ -121,7 +131,7 @@ procedure TCDWidgetSet.BackendDestroy;
|
|||||||
n: integer;
|
n: integer;
|
||||||
TimerInfo : PWinCETimerInfo;}
|
TimerInfo : PWinCETimerInfo;}
|
||||||
begin
|
begin
|
||||||
//DebugLn('Trace:TWinCEWidgetSet is being destroyed');
|
DebugLn('[TCDWidgetSet.BackendDestroy]');
|
||||||
|
|
||||||
{ n := FTimerData.Count;
|
{ n := FTimerData.Count;
|
||||||
if (n > 0) then
|
if (n > 0) then
|
||||||
@ -160,6 +170,10 @@ begin
|
|||||||
Windows.UnregisterClass(@ClsName, System.HInstance);
|
Windows.UnregisterClass(@ClsName, System.HInstance);
|
||||||
|
|
||||||
inherited Destroy;}
|
inherited Destroy;}
|
||||||
|
|
||||||
|
{ Release the screen DC and Image }
|
||||||
|
ScreenDC.Free;
|
||||||
|
ScreenImage.Free;
|
||||||
end;
|
end;
|
||||||
|
|
||||||
{------------------------------------------------------------------------------
|
{------------------------------------------------------------------------------
|
||||||
|
@ -823,7 +823,7 @@ begin
|
|||||||
------------------------------------------------------------------------------}
|
------------------------------------------------------------------------------}
|
||||||
else if aObject is TCDBitmap then
|
else if aObject is TCDBitmap then
|
||||||
begin
|
begin
|
||||||
{$ifdef VerboseCDWinAPI}
|
{$ifdef VerboseCDDrawing}
|
||||||
ObjType := 'Image';
|
ObjType := 'Image';
|
||||||
{$endif}
|
{$endif}
|
||||||
end
|
end
|
||||||
@ -832,7 +832,7 @@ begin
|
|||||||
------------------------------------------------------------------------------}
|
------------------------------------------------------------------------------}
|
||||||
else if aObject is TLazRegion then
|
else if aObject is TLazRegion then
|
||||||
begin
|
begin
|
||||||
{$ifdef VerboseCDWinAPI}
|
{$ifdef VerboseCDDrawing}
|
||||||
ObjType := 'Region';
|
ObjType := 'Region';
|
||||||
{$endif}
|
{$endif}
|
||||||
end
|
end
|
||||||
|
@ -2019,7 +2019,7 @@ begin
|
|||||||
if NIndex = COLOR_FORM then
|
if NIndex = COLOR_FORM then
|
||||||
NIndex := COLOR_BTNFACE;
|
NIndex := COLOR_BTNFACE;
|
||||||
Result := Windows.GetSysColorBrush(nIndex);
|
Result := Windows.GetSysColorBrush(nIndex);
|
||||||
end;
|
end;*)
|
||||||
|
|
||||||
{------------------------------------------------------------------------------
|
{------------------------------------------------------------------------------
|
||||||
Method: GetSystemMetrics
|
Method: GetSystemMetrics
|
||||||
@ -2028,12 +2028,12 @@ end;
|
|||||||
|
|
||||||
Retrieves various system metrics.
|
Retrieves various system metrics.
|
||||||
------------------------------------------------------------------------------}
|
------------------------------------------------------------------------------}
|
||||||
function TWin32WidgetSet.GetSystemMetrics(NIndex: Integer): Integer;
|
function TCDWidgetSet.GetSystemMetrics(NIndex: Integer): Integer;
|
||||||
begin
|
begin
|
||||||
Result := Windows.GetSystemMetrics(NIndex);
|
Result := Windows.GetSystemMetrics(NIndex);
|
||||||
end;
|
end;
|
||||||
|
|
||||||
function TWin32WidgetSet.GetTextColor(DC: HDC): TColorRef;
|
(*function TWin32WidgetSet.GetTextColor(DC: HDC): TColorRef;
|
||||||
begin
|
begin
|
||||||
Result := TColorRef(Windows.GetTextColor(DC));
|
Result := TColorRef(Windows.GetTextColor(DC));
|
||||||
end;
|
end;
|
||||||
@ -2505,7 +2505,7 @@ end;
|
|||||||
function TWin32WidgetSet.MaskBlt(DestDC: HDC; X, Y, Width, Height: Integer; SrcDC: HDC; XSrc, YSrc: Integer; Mask: HBITMAP; XMask, YMask: Integer): Boolean;
|
function TWin32WidgetSet.MaskBlt(DestDC: HDC; X, Y, Width, Height: Integer; SrcDC: HDC; XSrc, YSrc: Integer; Mask: HBITMAP; XMask, YMask: Integer): Boolean;
|
||||||
begin
|
begin
|
||||||
Result := StretchMaskBlt(DestDC, X, Y, Width, Height, SrcDC, XSrc, YSrc, Width, Height, Mask, XMask, YMask, SRCCOPY);
|
Result := StretchMaskBlt(DestDC, X, Y, Width, Height, SrcDC, XSrc, YSrc, Width, Height, Mask, XMask, YMask, SRCCOPY);
|
||||||
end;
|
end;*)
|
||||||
|
|
||||||
{------------------------------------------------------------------------------
|
{------------------------------------------------------------------------------
|
||||||
Method: MessageBox
|
Method: MessageBox
|
||||||
@ -2537,7 +2537,7 @@ begin
|
|||||||
PWideChar(WideLPCaption), UType);
|
PWideChar(WideLPCaption), UType);
|
||||||
end;
|
end;
|
||||||
|
|
||||||
function TWin32WidgetSet.MonitorFromPoint(ptScreenCoords: TPoint; dwFlags: DWord): HMONITOR;
|
(*function TWin32WidgetSet.MonitorFromPoint(ptScreenCoords: TPoint; dwFlags: DWord): HMONITOR;
|
||||||
begin
|
begin
|
||||||
Result := MultiMon.MonitorFromPoint(ptScreenCoords, dwFlags);
|
Result := MultiMon.MonitorFromPoint(ptScreenCoords, dwFlags);
|
||||||
end;
|
end;
|
||||||
|
Loading…
Reference in New Issue
Block a user