hWnd

Pointer to the engine window.  LC 

Type:

HWND

Remarks:

Example:

// use Windows API functions for adding a menu to the engine window
function main()
{ 
  ...
  wait(1); // wait until hWnd is valid
  long hMenu = CreateMenu();
	long hSubMenu = CreateMenu();
	InsertMenu(hSubMenu,1,MF_BYPOSITION|MF_STRING,1,"Function1");
	InsertMenu(hSubMenu,2,MF_BYPOSITION|MF_STRING,2,"Function2");
	InsertMenu(hMenu,0,MF_BYPOSITION|MF_STRING|MF_POPUP,hSubMenu,"Submenu");
	SetMenu(hWnd,hMenu);
  ...

See also:

hWndTarget, on_message

► latest version online