Windows OS Library

This section contains reference information for the windows library. All these functions are stored in a global table: wnd ; so must with a prefix 'wnd.' to call function. (e.g. wnd.GetCursorPos() )

 Function Name  Parameter  Return  Explain
 PostMessage dword hwnd, msg, wparam, lparam dword Places (posts) a message in the message queue associated with the thread that created the specified window and then returns without waiting for the thread to process the message.
 SendMessage dword hwnd, msg, wparam, lparam dword Sends the specified message to a window or windows. The function calls the window procedure for the specified window and does not return until the window procedure has processed the message.
 EnableWindow dword hwnd
boolean enable
boolean Enables or disables mouse and keyboard input to the specified window or control.
 FindWindow string classname, wndname dword hwnd Retrieves a handle to the top-level window whose class name and window name match the specified strings.
 GetClientRect dword hwnd number
left, top, right, bottom
Retrieves the coordinates of a window's client area.
 GetWindowRect dword hwnd number
left, top, right, bottom
Retrieves the dimensions of the bounding rectangle of the specified window.
 GetWindowText dword hwnd string text Gets the text of the specified window's title bar.
 SetWindowText dword hwnd
string text
boolean Changes the text of the specified window's title bar.
 IsIconic dword hwnd boolean Determines whether the specified window is minimized.
 IsWindow dword hwnd boolean Determines whether the specified window handle identifies an existing window.
 IsWindowVisible dword hwnd boolean Retrieves the visibility state of the specified window.
 IsZoomed dword hwnd boolean Determines whether a window is maximized.
 ShowWindow dword hwnd
number cmdshow
boolean Sets the specified window's show state.
 MoveWindow dword hwnd
number x, y, width, height
boolean Changes the position and dimensions of the specified window.
 ClientToScreen dword hwnd
number x, y
number x, y   boolean Converts the client coordinates of a specified point to screen coordinates.
 ScreenToClient dword hwnd
number x, y
number x, y   boolean Converts the screen coordinates of a specified point on the screen to client coordinates.
 GetCapture None dword hwnd Retrieves the handle of the window (if any) that has captured the mouse. If no window in the thread has captured the mouse, the return value is NULL.
 SetCapture dword hwnd dword holdwnd Sets the mouse capture to the specified window belonging to the current thread. The return value is the handle of the window that had previously captured the mouse.
 ReleaseCapture None boolean Releases the mouse capture from a window in the current thread and restores normal mouse input processing.
 BeginWaitCursor None None Display the cursor as an hourglass when you expect a command to take a noticeable time interval to execute.
 EndWaitCursor None None Call this function after you have called the BeginWaitCursor function to return from the hourglass cursor to the previous cursor.
 ShowCursor boolean show None Displays or hides the cursor.
Frequency of calling this function will change the windows internal cursor display counter. So use below codes to reset the counter when scene end:

wnd.ShowCursor(false)
wnd.ShowCursor(true)
 GetCursorPos None number x, y Retrieves the cursor's position, in screen coordinates.
 SetCursorPos number x, y boolean Moves the cursor to the specified screen coordinates.
 IsKeyDown number vk boolean Determines whether a key is up or down at the time the function is called (also for mouse buttons).
See Virtual Keys .
 MessageBox string text, caption
dword type, hwnd
number Creates, displays, and operates a message box.
 ChooseColor dword color, flag, hwnd dword color Creates a Color common dialog box that enables the user to select a color.
 ChooseFile boolean open
string defext, filename
dword flag
string filter
dword hwnd
1. string filepath

2. None
Creates an Open / Save common dialog box that lets the user specify the drive, directory, and the name of a file to open / save.
 Sleep number milliseconds None Suspends the execution of the current thread for a specified interval.
 GetCurrentDirectory None string path Retrieves the current directory for the current process.
 SetCurrentDirectory string path boolean Changes the current directory for the current process