mirror of
https://gitlab.com/freepascal.org/lazarus/lazarus.git
synced 2025-08-11 19:36:32 +02:00
parent
e30dfa934a
commit
a99c9eaabd
@ -1693,21 +1693,23 @@ end;
|
||||
|
||||
function TCocoaWidgetSet.GetDC(hWnd: HWND): HDC;
|
||||
var
|
||||
ctx: TCocoaContext;
|
||||
ctx: TCocoaContext = nil;
|
||||
lCallback: ICommonCallback;
|
||||
begin
|
||||
if hWnd = 0 then
|
||||
Result := HDC(ScreenContext)
|
||||
else
|
||||
begin
|
||||
ctx := NSObject(hWnd).lclGetCallback.GetContext;
|
||||
lCallback := NSObject(hWnd).lclGetCallback;
|
||||
if lCallback <> nil then
|
||||
ctx := lCallback.GetContext;
|
||||
|
||||
if ctx = nil then
|
||||
begin
|
||||
ctx := TCocoaContext.Create(DefaultContext.ctx);
|
||||
with DefaultContext.size do
|
||||
ctx.InitDraw(cx, cy);
|
||||
ctx.InitDraw(DefaultContext.size.cx, DefaultContext.size.cy);
|
||||
end;
|
||||
Result := HDC(ctx)
|
||||
Result := HDC(ctx);
|
||||
end;
|
||||
|
||||
{$IFDEF VerboseWinAPI}
|
||||
|
@ -174,6 +174,7 @@ function SetScrollInfo(Handle : HWND; SBStyle : Integer; ScrollInfo: TScrollInfo
|
||||
function SetSysColors(cElements: Integer; const lpaElements; const lpaRgbValues): Boolean; override;
|
||||
function SetTextColor(DC: HDC; Color: TColorRef): TColorRef; override;
|
||||
function SetViewPortOrgEx(DC: HDC; NewX, NewY: Integer; OldPoint: PPoint): Boolean; override;
|
||||
//function SetWindowLong(Handle: HWND; Idx: Integer; NewLong : PtrInt): PtrInt; override;
|
||||
function SetWindowOrgEx(DC: HDC; NewX, NewY: Integer; OldPoint: PPoint) : Boolean; override;
|
||||
function ShowCaret(Handle: HWND): Boolean; override;
|
||||
function ShowScrollBar(Handle: HWND; wBar: Integer; bShow: Boolean): Boolean; override;
|
||||
|
Loading…
Reference in New Issue
Block a user