Vcl.Menus.TMenu.WindowHandle

From RAD Studio API Documentation
Jump to: navigation, search

Delphi

property WindowHandle: HWND read FWindowHandle write SetWindowHandle;

C++

__property HWND WindowHandle = {read=FWindowHandle, write=SetWindowHandle, nodefault};

Properties

Type Visibility Source Unit Parent
property public
Vcl.Menus.pas
Vcl.Menus.hpp
Vcl.Menus TMenu

Description

Provides access to the handle of the window that uses the menu.

Read WindowHandle to get the window handle of the control that receives WM_COMMAND messages when the user clicks on an item in the menu. When menu items are selected, use this handle in an OnClick event handler to send messages to the control that uses the menu or to make Windows API calls that affect the control.

Set WindowHandle to associate the menu with a control.

See Also