|
Window help
Function help:
Real API_Window_Create (Real Parent Handle, Real X, Real Y, Real Width, Real Height, Real Style Flags, Real Extended Style Flags);
This function creates a new window.
Argument list:
(0) Parent Handle: Identifies the window handle of the window.
(1) X: The horizontal position of the control in pixels.
(2) Y: The vertical position of the control in pixels.
(3) Width: The horizontal size of the control in pixels.
(4) Height: The vertical size of the control in pixels.
(5) Style Flags: The style flags, use the Window Styles.
(6) Extended Style Flags: This can be any combination of the Extended Window Styles.
Return value:
If this function succeeds, it returns the window handle of the window, otherwise it returns 0.
Real API_Window_Show (Real Window handle, Real Show flags );
This function changes the show state of a window.
Argument list:
(0) Window handle: The window handle of the window.
(1) Show flags: One of the show flags.
Return value:
If the window was previously visible, the return value is nonzero.
If the window was previously hidden, the return value is zero.
Real API_Window_GetLeft (Real Window handle);
Real API_Window_GetTop (Real Window handle);
Real API_Window_GetRight (Real Window handle);
Real API_Window_GetBottom (Real Window handle);
These functions return the coordinates of the window relative to the screen in pixels.
For example, API_Window_GetLeft returns the X position of the window, and API_Window_GetRight returns the X position + the width of the window.
Return value:
The coordinate in pixels.
Real API_Window_GetClientLeft (Real Window handle);
Real API_Window_GetClientTop (Real Window handle);
Real API_Window_GetClientRight (Real Window handle);
Real API_Window_GetClientBottom (Real Window handle);
These functions return the coordinates of the client rectangle of the window relative to screen in pixels.
The client rectangle is the part of the window that contains its children.
Return value:
The coordinate in pixels.
Real API_Window_GetX (Real Window handle);
Real API_Window_GetY (Real Window handle);
These functions return the position of a window relative to the screen in pixels.
Return value:
The position in pixels.
Real API_Window_SetPos (Real Window handle, Real X, Real Y);
This function changes the position of the window to the specified position.
Return value:
Returns true (1) when succesful, and false (0) when failed.
Real API_Window_SetPosSize (Real Window handle, Real X, Real Y, Real Width, Real Height);
This function changes the position and the size of a window.
Return value:
Returns true (1) when succesful, and false (0) when failed.
Real API_Window_SetSize (Real Window handle,Real Width, Real Height);
This function changes the size of a window.
Return value:
Returns true (1) when succesful, and false (0) when failed.
Real API_Window_SetZOrder (Real Window handle,Real Window Handle To Insert After );
This function puts a window in a specified Z-order.
Argument list:
Argument0: Window handle: The window handle of the window.
Argument1: The window handle to put this window after or one of these variables:
HWND_BOTTOM
Places the window at the bottom of the Z order. If argument0 identifies a topmost window, the window loses its topmost status and is placed at the bottom of all other windows.
HWND_NOTOPMOST
Places the window above all non-topmost windows (that is, behind all topmost windows). This flag has no effect if the window is already a non-topmost window.
HWND_TOP
Places the window at the top of the Z order.
HWND_TOPMOST
Places the window above all non-topmost windows. The window maintains its topmost position even when it is deactivated.
Return value:
Returns true (1) when succesful, and false (0) when failed.
Real API_Window_GetBorderWidth (Real Window handle);
Real API_Window_GetBorderHeight (Real Window handle);
Use these functions to get the size of the window border.
Return value:
Returns the size of the border in pixels.
Real API_Window_GetWidth (Real Window handle);
Real API_Window_GetHeight (Real Window handle);
Use this functions to get the size of the window.
Return value:
Returns the size of the window in pixels.
Real API_Window_GetClientWidth (Real Window handle);
Real API_Window_GetClientHeight (Real Window handle);
Use this functions to get the size of the client rectangle.
The client rectangle is the part of the window that contains its children.
Return value:
Returns the size of the client rectangle in pixels.
Real API_Window_GetParent (Real Window handle);
This function returns the parent of the specified window.
Return value:
Returns the window handle of the parent or false (0) when failed.
Real API_Window_SetParent (Real Window handle, Real Parent window handle );
This function sets the parent window of the specified window.
Return value:
This function returns the previous parent of the window or false (0) otherwise.
Real API_Window_SetText (Real Window handle, String Text) ;
This function sets the text ( window caption) of a window.
Return value:
Returns true (1) when succesful, or false (0) when failed.
String API_Window_GetText (Real Window handle) ;
This function returns the text (window caption) of a window.
Return value:
Returns the window text or an empty string "" otherwise.
Real API_Window_GetDC (Real Window handle) ;
This function returns the Device Context handle of the window.
Return value:
Returns the DC when succesful or false (0) otherwise.
Real API_Window_SetAlpha (Real Window handle, Real Alpha value ) ;
This function changes the alpha value of a window.
This function needs at least Windows 2000 to work.
The window using this function needs to use the WS_EX_LAYERED extended window style.
Argument list:
(0) Window handle: The window handle to change the alpha value of.
(1) Alpha value: Changes the alpha value of a window (0 = fully transparent, 255 = fully opaque)
Return value:
Returns true (1) when succesful, or false (0) otherwise.
Real API_Window_SetStyle (Real Window handle, Real Style Flags ) ;
This function changes the window style (like argument5 of API_Window_Create).
If you want to use the old styles, but you want to change some flags, use the '|' and '&~' operators.
Like this:
Style = API_Window_GetStyle (Win);
Style = Style | WS_SIZEBOX;
Style = Style &~ WS_SIZEBOX; API_Window_SetStyle (Win,Style); |
Use the Window Styles.
Return value:
This function returns the old style value when succesful, or false (0) otherwise.
Real API_Window_GetStyle (Real Window handle, Real Style Flags ) ;
This function returns the window style flags of the specified window.
Return value:
This function returns the window style value when succesful, or false (0) otherwise.
Real API_Window_SetExStyle (Real Window handle, Real Style Flags) ;
This function changes the extended window style (like argument6 of API_Window_Create).
If you want to use the old styles, but you want to change some flags, use the '|' and '&~' operators.
Use the Extended Window Styles.
Return value:
This function returns the old style value when succesful, or false (0) otherwise.
Real API_Window_GetExStyle(Real Window handle, Real Style Flags ) ;
This function returns the extended window style flags of the specified window.
Return value:
This function returns the extended window style value when succesful, or false (0) otherwise.
Real API_Window_SetIcon (Real Window handle, Real Icon Resource Handle ) ;
This function changes the icon of a window.
This affects the icon shown in Alt+Tab.
If you want to load an icon from a file, use the API_Resource_LoadIcon function.
Return value:
This function returns the icon resource handle of the previous icon when succesful or false (0) otherwise.
Real API_Window_SetSmIcon (Real Window handle, Real Icon Resource Handle ) ;
This function changes the small icon of a window.
This affects the icon shown in the window caption.
If you want to load an icon from a file, use the API_Resource_LoadIcon function.
Return value:
This function returns the icon resource handle of the previous icon when succesful or false (0) otherwise.
Real API_Window_GetIcon (Real Window handle ) ;
This function returns the icon resource handle of the icon assigned to the window.
Return value:
This function returns the icon resource handle of the icon when succesful or false (0) otherwise.
Real API_Window_GetSmIcon (Real Window handle ) ;
This function returns the icon resource handle of the small icon assigned to the window.
Return value:
This function returns the icon resource handle of the icon when succesful or false (0) otherwise.
Real API_Window_IsChild (Real Parent Window handle, Real Child window handle ) ;
This function checks wether a window is a child of a window.
Return value:
When the child is a child, the return value is true (1) or false (0) otherwise.
Real API_Window_Exists (Real Window handle ) ;
This function checks wether a window handle is valid.
Return value:
The return value is true (1) when the window exists, or false (0) otherwise.
Real API_Window_SetBrush (Real Window handle, Real Brush Resource Handle ) ;
This function changes the background brush of a window.
Return value:
This function returns the brush resource handle of the previous brush when succesful or false (0) otherwise.
Real API_Window_GetBrush (Real Window handle) ;
This function gets the resource handle of the background brush of a window.
Return value:
This function returns the brush resource handle of the brush when succesful or false (0) otherwise.
Real API_Window_Redraw (Real Window handle) ;
This function redraws the specified window.
Return value:
Returns true (1) when succesful, or false (0) otherwise.
Real API_Window_SetFocus (Real Window handle) ;
This function sets the focus to the specified window.
Return value:
This function returns the handle to the window that will receive the keyboard input.
Real API_Window_GetFocus () ;
This function returns the window handle that has the focus.
Return value:
The window handle to the focussed window.
Real API_Window_Destroy (Real Window handle ) ;
This function destroys a window.
Return value:
If this function succeeds, it returns true (1) or false (0) otherwise.
Real API_Window_SetRegion (Real Window handle, Real Region Handle) ;
This function sets the region of a window, to change the shape of it.
Return value:
If this function succeeds, it returns true (1) or false (0) otherwise.
String API_Window_GetClassName (Real Window handle) ;
This function sets the region of a window, to change the shape of it.
Return value:
If this function succeeds, it the classname, or an empty string when the function fails.
Real API_Window_GetWindow (Real Window handle, Real Flags);
The GetWindow function retrieves a handle to a window that has the specified relationship (Z-Order or owner) to the specified window.
GW_OWNER
The retrieved handle identifies the specified window's owner window, if any.
GW_CHILD
The retrieved handle identifies the child window at the top of the Z order, if the specified window is a parent window; otherwise, the retrieved handle is NULL. The function examines only child windows of the specified window. It does not examine descendant windows.
GW_ENABLEDPOPUP
Windows 2000/XP: The retrieved handle identifies the enabled popup window owned by the specified window (the search uses the first such window found using GW_HWNDNEXT); otherwise, if there are no enabled popup windows, the retrieved handle is that of the specified window.
GW_HWNDFIRST
The retrieved handle identifies the window of the same type that is highest in the Z order. If the specified window is a topmost window, the handle identifies the topmost window that is highest in the Z order. If the specified window is a top-level window, the handle identifies the top-level window that is highest in the Z order. If the specified window is a child window, the handle identifies the sibling window that is highest in the Z order.
GW_HWNDLAST
The retrieved handle identifies the window of the same type that is lowest in the Z order. If the specified window is a topmost window, the handle identifies the topmost window that is lowest in the Z order. If the specified window is a top-level window, the handle identifies the top-level window that is lowest in the Z order. If the specified window is a child window, the handle identifies the sibling window that is lowest in the Z order.
GW_HWNDNEXT
The retrieved handle identifies the window below the specified window in the Z order. If the specified window is a topmost window, the handle identifies the topmost window below the specified window. If the specified window is a top-level window, the handle identifies the top-level window below the specified window. If the specified window is a child window, the handle identifies the sibling window below the specified window.
GW_HWNDPREV
The retrieved handle identifies the window above the specified window in the Z order. If the specified window is a topmost window, the handle identifies the topmost window above the specified window. If the specified window is a top-level window, the handle identifies the top-level window above the specified window. If the specified window is a child window, the handle identifies the sibling window above the specified window.
Return value:
Returns the window handle of the parent or false (0) when failed.
Example code:
Win = API_Window_Create (0,50,50,640,480,WS_CAPTION|WS_SYSMENU,WS_EX_ACCEPTFILES); |
Return to help index
|
|