RAD Studio VCL Reference
TWinControl.WindowHandle Property

Provides access to a window handle for the control.

property WindowHandle: HWnd;
__property HWnd WindowHandle;

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. 


Copyright(C) 2009 Embarcadero Technologies, Inc. All Rights Reserved.
What do you think about this topic? Send feedback!