.WNDPROC calls the Windows message callback procedure attached to main window of the Logo programming environment. Its input is a list of three numbers corresponding to the message's nMsg, wParam and lParam parameters, respectively.
.WNDPROC is used with a message handling event procedure installed with the .MESSAGE command. When this procedure does not process the message and its contents, it forwards the message to the Logo programming environment to be handled there.
The following procedure responds to the menu item "Help/Last error". When this menu item is selected, the message HELP / LAST ERROR SELECTED is displayed. All other menu selections are routed to PC Logo so PC Logo remains fully functional.
TO HELP_HANDLER :ARGS
- IF (ITEM 2 :ARGS) = 1602 \
- THEN PR [HELP / LAST ERROR SELECTED] \
- ELSE .WNDPROC :ARGS
? .MESSAGE 273 "HELP_HANDLER