PDFium Delphi Component Docs

WindowHandle property

Component: TPdfView  ·  Unit: PDFium
Native platform widget handle of the control

Syntax

property WindowHandle: HWND;

Description

Exposes the window handle inherited from the platform control. VCL uses a Windows HWND; native LCL uses the selected widget set's handle, which must not be passed to Windows APIs

A zero value indicates that the platform widget has not yet been allocated. Parent the viewer and let the framework create its widget before using the handle

Use this value only with the matching framework and widget set on the UI thread. It is distinct from a PDFium document or page handle and becomes invalid when the widget is destroyed

Remarks

Example

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

See Also

Active, Pdf, Options, Zoom