-- Exit button for exiting a Neuron book -- which also closes the browser window to handle buttonClick linkDLL "user" WORD GetParent(WORD) WORD PostMessage(WORD, WORD, WORD, DWORD) end parentHWnd = parentHandle of mainWindow if parentHWnd <> 0 -- ToolBook is running as a child of -- another process. -- Work our way up through the window -- hierarchy until we can find -- the top-level window while (GetParent(parentHWnd) <> 0) parentHWnd = GetParent(parentHWnd) end -- Now, close the top-level window WM_CLOSE = 16 get PostMessage(parentHWnd, WM_CLOSE, 0, 0) end end