LCL-CustomDrawn-Windows: Fixes compilation

git-svn-id: trunk@34338 -
This commit is contained in:
sekelsenmat 2011-12-21 07:09:33 +00:00
parent ac028a407b
commit 3625472f5d
3 changed files with 22 additions and 8 deletions

View File

@ -94,6 +94,16 @@ begin
inherited 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
// So we need to get the fonts by other means
FMetrics.cbSize := SizeOf(FMetrics);
@ -121,7 +131,7 @@ procedure TCDWidgetSet.BackendDestroy;
n: integer;
TimerInfo : PWinCETimerInfo;}
begin
//DebugLn('Trace:TWinCEWidgetSet is being destroyed');
DebugLn('[TCDWidgetSet.BackendDestroy]');
{ n := FTimerData.Count;
if (n > 0) then
@ -160,6 +170,10 @@ begin
Windows.UnregisterClass(@ClsName, System.HInstance);
inherited Destroy;}
{ Release the screen DC and Image }
ScreenDC.Free;
ScreenImage.Free;
end;
{------------------------------------------------------------------------------

View File

@ -823,7 +823,7 @@ begin
------------------------------------------------------------------------------}
else if aObject is TCDBitmap then
begin
{$ifdef VerboseCDWinAPI}
{$ifdef VerboseCDDrawing}
ObjType := 'Image';
{$endif}
end
@ -832,7 +832,7 @@ begin
------------------------------------------------------------------------------}
else if aObject is TLazRegion then
begin
{$ifdef VerboseCDWinAPI}
{$ifdef VerboseCDDrawing}
ObjType := 'Region';
{$endif}
end

View File

@ -2019,7 +2019,7 @@ begin
if NIndex = COLOR_FORM then
NIndex := COLOR_BTNFACE;
Result := Windows.GetSysColorBrush(nIndex);
end;
end;*)
{------------------------------------------------------------------------------
Method: GetSystemMetrics
@ -2028,12 +2028,12 @@ end;
Retrieves various system metrics.
------------------------------------------------------------------------------}
function TWin32WidgetSet.GetSystemMetrics(NIndex: Integer): Integer;
function TCDWidgetSet.GetSystemMetrics(NIndex: Integer): Integer;
begin
Result := Windows.GetSystemMetrics(NIndex);
end;
function TWin32WidgetSet.GetTextColor(DC: HDC): TColorRef;
(*function TWin32WidgetSet.GetTextColor(DC: HDC): TColorRef;
begin
Result := TColorRef(Windows.GetTextColor(DC));
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;
begin
Result := StretchMaskBlt(DestDC, X, Y, Width, Height, SrcDC, XSrc, YSrc, Width, Height, Mask, XMask, YMask, SRCCOPY);
end;
end;*)
{------------------------------------------------------------------------------
Method: MessageBox
@ -2537,7 +2537,7 @@ begin
PWideChar(WideLPCaption), UType);
end;
function TWin32WidgetSet.MonitorFromPoint(ptScreenCoords: TPoint; dwFlags: DWord): HMONITOR;
(*function TWin32WidgetSet.MonitorFromPoint(ptScreenCoords: TPoint; dwFlags: DWord): HMONITOR;
begin
Result := MultiMon.MonitorFromPoint(ptScreenCoords, dwFlags);
end;