![]() |
| home | graph lib | utility lib | auxiliary lib | custom lib | tutorials | |
|
Window PackageThe functions interact with the Lua callback function that should deal with eight parameters with the first being the message as string, the second as the Window's handle, the third to fifth as the wParam and its lower- and higher-order bytes, and the sixth to eigth as lParam and its lower- and higher-order bytes. Controls on the main window should be create in the "SIZE" message loop. Functions include create, choosecolor, choosefile, blank, button, label, checkbox, combobox, desktop, groupbox, radiobox, textbox, whitebox, gettext, settext, ischecked, message, move, menu, resize, setchecked, setunchecked, timer. .create(callback, width, heigh) callback - a Lua function name. width - window width.Height - window height. Creates a window of specified width and height. hwnd - handle of the parent window.x0, y0 - top-left position of the window. w - window width. h - window height. Creates a static blank rectangle box. Returns the handle to the control. .button(hwnd, x0, y0, w, h, s) hwnd - handle of the parent window.x0, y0 - top-left position of the window. w - window width. h - window height. s - a string as the label. Creates a command button control. Returns the handle to the control. Creates a color-picking disloag and return the red, green, and blue compents of the color selected by you. ext - a string to specify file extensions.mode - a string to specify opening or saving. Creates a file open/save disloag and return the full path and file name as string. .checkbox(hwnd, x0, y0, w, h, s) hwnd - handle of the parent window.x0, y0 - top-left position of the window. w - window width. h - window height. s - a string as the label. Creates a checkbox control. Returns the handle to the control. .combobox(hwnd, x0, y0, w, h, s1, s2, ...) hwnd - handle of the parent window.x0, y0 - top-left position of the window. w - window width. h - window height. s1, s2 - strings as items for selection. Creates a combobox control. You add as many item as necessary. The first item will has the ID of 1; the second of 2; and so on. Return the handle to the control. Returns the width and height of the desktop window. hwnd - handle of a window. Gets the window's text, whick may be the lable or selected item .groupbox(hwnd, x0, y0, w, h, s) hwnd - handle of the parent window.x0, y0 - top-left position of the window. w - window width. h - window height. s - a string as the label. Create a groupbox control. Returns the handle to the control. hwnd - handle of a rediobox or checkbox. Queries whether the control is cheked. hwnd - handle of the parent window.x0, y0 - top-left position of the window. w - window width. h - window height. s - a string as the label. Creates a static label control. Returns the handle to the control. s - a string. Creates a message dialog box. Multi-lines of texts are supported by embedding "\n" in the string. hwnd - handle of the window to be moved.x, y - numbers. Moves the top-left corner or the window to (x, y). hwnd - handle of the main window.s1, s2 - strings as items for selection. Creates a popup menu. You add as many item as necessary. The first item will has the ID of 1; the second of 2; and so on. .radiobox(hwnd, x0, y0, w, h, s) hwnd - handle of the parent window.x0, y0 - top-left position of the window. w - window width. h - window height. s - a string as the label. Creates a radiobox control. Returns the handle to the control. hwnd - handle of the window to be resized.x0, y0 - top-left position of the window. w - window width. h - window height. Resizes the window to the specified width and height. hwnd - handle of a rediobox or checkbox. Sets the control status as cheked. hwnd - handle of a rediobox or checkbox. Sets the control status as uncheked. hwnd - handle of a window.s - a string as the text. Setd the window's text to s. hwnd - handle of the parent window.x0, y0 - top-left position of the window. w - window width. h - window height. Create a textbox control. Returns the handle to the control. ms - time in millisecond. Creates a timer that will inform the callback function when the specified interval is passed. hwnd - handle of the parent window.x0, y0 - top-left position of the window. w - window width. h - window height. Creates a static white rectangle box with sunken edges. Returns the handle to the control.
|