Pointer to the engine window.
- This variable can be used for accessing the engine window, or set to a different window (together with hWndTarget). In the latter case all window functions (such as video_set) then affect the new window. Additionally, the engine message loop (on_message) should be called by the target window's message loop for catching keyboard input.
- For rendering into a target window, use the hWndTarget variable.
This variable is only valid after the engine window is opened in the first frame. So one wait() command is necessary in the main function before hWnd can be accessed.
// use Windows API functions for adding a menu to the engine window
wait(1); // wait until hWnd is valid
long hMenu = CreateMenu();
long hSubMenu = CreateMenu();