Show: Delphi C++
Display Preferences

Vcl.Controls.TWinControl.WindowHandle

From RAD Studio API Documentation
Jump to: navigation, search

Delphi

property WindowHandle: HWnd read FHandle write FHandle;

C++

__property HWND WindowHandle = {read=FHandle, write=FHandle, nodefault};

Properties

Type Visibility Source Unit Parent
property protected
Vcl.Controls.pas
Vcl.Controls.hpp
Vcl.Controls TWinControl

Description

Provides access to a window handle for the control.

The WindowHandle property provides access to the same window handle as the Handle property, but WindowHandle is protected, and therefore only accessible to code inside the control.

The advantage to using WindowHandle is that it can be written to, while the Handle property is read-only. Use WindowHandle when implementing methods that need to change the value of the control's window handle. Unlike the Handle property, reading the value of WindowHandle doesn't automatically create a valid handle. Reading WindowHandle can return a zero value.

See Also

Personal tools
In Other Languages
Previous Versions
Assistance