PDFium Delphi Component Docs

WindowHandle property

Component: TPdfView  ·  Unit: PDFium
The control's native platform widget handle

Syntax

property WindowHandle: HWND;

Description

Returns the handle inherited from the platform control: VCL supplies a Windows HWND, whilst native LCL supplies its widget set's handle, which must never be passed to Windows APIs

Zero means that the platform widget has not been allocated; parent the viewer and allow its framework to create the widget before using this handle

Use the handle on the UI thread with its matching framework and widget set only; it is separate from PDFium document/page handles and expires when the widget is destroyed

Remarks

Example

begin
  if PdfView1.WindowHandle <> 0 then
    PdfView1.Invalidate;
end;

See Also

Active, Pdf, Options, Zoom