BASE CLASS FOR ANY WINDOWS CONTROLS. More...
#include <Zclass.h>
Public Member Functions | |
| COLORREF | BackColor (void) |
| void | BackColor (COLORREF color) |
| void | Brush (COLORREF color) |
| COLORREF | BrushColor (void) |
| void | CaptureMouse (void) |
| void | ClientRectangle (void) |
| void | WindowRectangle (void) |
| void | Clear (void) |
| void | DrawMenu (void) |
| void | Disable (void) |
| void | Enable (void) |
| void | EnableFlag (bool flag) |
| void | Align (void) |
| void | Focus (void) |
| void | onForeground (void) |
| COLORREF | ForeColor (void) |
| void | ForeColor (COLORREF color) |
| bool | isEnabled (void) |
| bool | isNotEnabled (void) |
| bool | isNotNull (void) |
| bool | isNotValidDate (void) |
| bool | isNull (void) |
| bool | isValidDate (void) |
| bool | isVisible (void) |
| bool | isNotVisible (void) |
| bool | hasFocus (void) |
| bool | hasNoFocus (void) |
| int | Height (void) |
| void | MoveAndResize (int x, int y, int cx, int cy) |
| void | Freeze (void) |
| void | Unfreeze (void) |
| void | Invalidate (LPCRECT rect=0, bool erase=__yes) |
| void | ReleaseMouse (void) |
| void | MoveY2Center (void) |
| void | MoveX2Center (void) |
| void | Move2Center (void) |
| void | Move2ParentCenter (void) |
| void | Restyle (bool refresh=__no) |
| void | SendChar (TCHAR chCharCode) |
| void | SendKey (WPARAM KeyCode) |
| void | Show (int nCmdShow=SW_RESTORE) |
| void | Style (void) |
| void | Text (zDBColumn &) |
| void | Text (LPCTSTR) |
| xstring | Text (void) |
| int | TextLength (void) |
| int | Width (void) |
| HWND | Handle (void) |
| void | ZOrder (HWND hWndInsertAfter) |
| virtual void | Load (void) |
| virtual void | Define (void) |
Public Attributes | |
| bind_info | bind |
| init_info | init |
| style_info | style |
| scroll_info | scroll |
| label_info | label |
| align_info | align |
| xicon | icon |
| zWindow * | parent |
| short | win_show_state |
| int | win_type |
| xrectangle | win_rect |
| xrectangle | client_rect |
| void * | userdata |
| xstring | cargo |
| xstring | tag |
| xstring | name |
| xstring | hint |
| xstring | null_msg |
| xfont | font |
| xstring | image |
| int | image_rop |
| short | effects |
BASE CLASS FOR ANY WINDOWS CONTROLS.
% Provides methods for manipulating a generic window. In a graphical Win32-based application,a window is a rectangular area of the screen where the application displays output and receives input from the user. Therefore, one of the first tasks of a graphical Win32-based application is to create a window. A window shares the screen with other windows,including those from other applications. Only one window at a time can receive input from the user. The user can use the mouse, keyboard, or other input device to interact with this window and the application that owns it.
| void zWindow::Align | ( | void | ) |
Resizes and aligns the window using the align-to-parent informations.
| void zWindow::BackColor | ( | COLORREF | color | ) | [inline] |
Sets the background color used to display text.
| color | - A COLORREF value representing the color. When specifying an explicit RGB color, the COLORREF value has the following hexadecimal form: 0x00bbggrr The low-order byte contains a value for the relative intensity of red; the second byte contains a value for green; and the third byte contains a value for blue. The high-order byte must be zero. The maximum value for a single byte is 0xFF. |
| COLORREF zWindow::BackColor | ( | void | ) | [inline] |
Retrieves the background color used to display text. When specifying an explicit RGB color, the COLORREF value has the following hexadecimal form: 0x00bbggrr The low-order byte contains a value for the relative intensity of red; the second byte contains a value for green; and the third byte contains a value for blue. The high-order byte must be zero. The maximum value for a single byte is 0xFF.
| void zWindow::Brush | ( | COLORREF | color | ) |
Sets the brush color used to erase the window's background.
| color | - A COLORREF value representing the color. When specifying an explicit RGB color, the COLORREF value has the following hexadecimal form: 0x00bbggrr The low-order byte contains a value for the relative intensity of red; the second byte contains a value for green; and the third byte contains a value for blue. The high-order byte must be zero. The maximum value for a single byte is 0xFF. |
| COLORREF zWindow::BrushColor | ( | void | ) | [inline] |
Retrieves the brush color used to erase the window's background. When specifying an explicit RGB color, the COLORREF value has the following hexadecimal form: 0x00bbggrr The low-order byte contains a value for the relative intensity of red; the second byte contains a value for green; and the third byte contains a value for blue. The high-order byte must be zero. The maximum value for a single byte is 0xFF.
| void zWindow::CaptureMouse | ( | void | ) | [inline] |
Sets the mouse capture to the specified window belonging to the current thread. Once a window has captured the mouse, all mouse input is directed to that window, regardless of whether the cursor is within the borders of that window. Only one window at a time can capture the mouse.
| void zWindow::Clear | ( | void | ) | [inline] |
Clears the window's text.
Reimplemented in zDateTime.
| void zWindow::ClientRectangle | ( | void | ) | [inline] |
Retrieves the xrectangle object that represents the client area of the control. Because client coordinates are relative to the upper-left corner of the client area of the control, the coordinates of the upper-left corner of the returned rectangle are (0,0). Refer to zWindow::client_rect.
Reimplemented in zForm.
| virtual void zWindow::Define | ( | void | ) | [inline, virtual] |
Loads the default properties. A property is an attribute of a control, field, or database object that you set to define one of the object's characteristics or an aspect of its behavior. For example, the Visible property affects whether a control can be seen at run time. You can change an object's property settings at design-time.
| void zWindow::Disable | ( | void | ) | [inline] |
Disables mouse and keyboard input to the specified window or control. When input is disabled, the window does not receive input such as mouse clicks and key presses.
| void zWindow::DrawMenu | ( | void | ) | [inline] |
Redraws the menu bar of the specified window. If the menu bar changes after the system has created the window, this function must be called to draw the changed menu bar.
| void zWindow::Enable | ( | void | ) | [inline] |
Enables mouse and keyboard input to the specified window or control. When input is enabled, the window receives all input.
| void zWindow::EnableFlag | ( | bool | flag | ) |
Enables or disables mouse and keyboard input to the specified window or control. When input is disabled, the window does not receive input such as mouse clicks and key presses. When input is enabled, the window receives all input.
| void zWindow::Focus | ( | void | ) | [inline] |
Sets the keyboard focus to the specified window. The window must be associated with the calling thread's message queue.
| void zWindow::ForeColor | ( | COLORREF | color | ) | [inline] |
Sets the foreground color used to display text.
| color | - A COLORREF value representing the color. When specifying an explicit RGB color, the COLORREF value has the following hexadecimal form: 0x00bbggrr The low-order byte contains a value for the relative intensity of red; the second byte contains a value for green; and the third byte contains a value for blue. The high-order byte must be zero. The maximum value for a single byte is 0xFF. |
Reimplemented in zMonthCal.
| COLORREF zWindow::ForeColor | ( | void | ) | [inline] |
Retrieves the foreground color used to display text. When specifying an explicit RGB color, the COLORREF value has the following hexadecimal form: 0x00bbggrr The low-order byte contains a value for the relative intensity of red; the second byte contains a value for green; and the third byte contains a value for blue. The high-order byte must be zero. The maximum value for a single byte is 0xFF.
| void zWindow::Freeze | ( | void | ) | [inline] |
Clears the redraw flag. If the redraw flag is cleared, the content of the given window is not updated after each change, and the window is not repainted until the redraw flag is set. For example, an application that must add several items to a list box can clear the redraw flag, add the items, and then set the redraw flag. Finally, the application can call the InvalidateRect function to cause the list box to be repainted.
Reimplemented in zGrid.
| HWND zWindow::Handle | ( | void | ) | [inline] |
| bool zWindow::hasFocus | ( | void | ) | [inline] |
| bool zWindow::hasNoFocus | ( | void | ) | [inline] |
| int zWindow::Height | ( | void | ) | [inline] |
Retrieves the height of a window in pixels.
| void zWindow::Invalidate | ( | LPCRECT | rect = 0, |
|
| bool | erase = __yes | |||
| ) |
Adds a rectangle to the specified window's update region. The update region represents the portion of the window's client area that must be redrawn.
| rect | - Pointer to a RECT structure that contains the client coordinates of the rectangle to be added to the update region. If this parameter is NULL, the entire client area is added to the update region. | |
| erase | - Specifies whether the background within the update region is to be erased when the update region is processed. If this parameter is TRUE, the background is erased. If this parameter is FALSE, the background remains unchanged. |
| bool zWindow::isEnabled | ( | void | ) | [inline] |
| bool zWindow::isNotEnabled | ( | void | ) | [inline] |
| bool zWindow::isNotNull | ( | void | ) | [inline] |
| bool zWindow::isNotValidDate | ( | void | ) | [inline] |
| bool zWindow::isNotVisible | ( | void | ) | [inline] |
| bool zWindow::isNull | ( | void | ) |
| bool zWindow::isValidDate | ( | void | ) |
| bool zWindow::isVisible | ( | void | ) | [inline] |
| virtual void zWindow::Load | ( | void | ) | [inline, virtual] |
Creates the window, show it and sets the basic properties. The WMCreate events will occurs before and after the creation of the window.
| void zWindow::Move2Center | ( | void | ) | [inline] |
Centers the window on the central axes of the screen.
| void zWindow::Move2ParentCenter | ( | void | ) | [inline] |
Centers the window on the central axes of its own parent window.
| void zWindow::MoveAndResize | ( | int | x, | |
| int | y, | |||
| int | cx, | |||
| int | cy | |||
| ) |
Changes the size and position of the window.
| x | - Specifies the new position of the left side of the window, in client coordinates. | |
| y | - Specifies the new position of the top of the window, in client coordinates. | |
| cx | - Specifies the new width of the window, in pixels. | |
| cy | - Specifies the new height of the window, in pixels. |
| void zWindow::MoveX2Center | ( | void | ) | [inline] |
Centers the window on the X central axe of the screen.
| void zWindow::MoveY2Center | ( | void | ) | [inline] |
Centers the window on the X central axe of the screen.
| void zWindow::onForeground | ( | void | ) | [inline] |
Puts the thread that created the specified window into the foreground and activates the window. Keyboard input is directed to the window, and various visual cues are changed for the user. The system assigns a slightly higher priority to the thread that created the foreground window than it does to other threads. The foreground window is the window at the top of the Z order. It is the window that the user is working with. In a preemptive multitasking environment, you should generally let the user control which window is the foreground window.
| void zWindow::ReleaseMouse | ( | void | ) | [inline] |
Releases the mouse capture from a window in the current thread and restores normal mouse input processing. A window that has captured the mouse receives all mouse input, regardless of the position of the cursor, except when a mouse button is clicked while the cursor hot spot is in the window of another thread.
| void zWindow::Restyle | ( | bool | refresh = __no |
) |
Modifies the window styles and the extended window styles. Refreshs the window using stored values into public attributes style.base and style.extended.
| void zWindow::SendChar | ( | TCHAR | chCharCode | ) | [inline] |
Posts a character code to the window with the keyboard focus.
| chCharCode | - Specifies the character code of the key. |
| void zWindow::SendKey | ( | WPARAM | KeyCode | ) | [inline] |
Posts a character code to the window with the keyboard focus.
| chCharCode | - Specifies the character code of the key. |
| void zWindow::Show | ( | int | nCmdShow = SW_RESTORE |
) |
Sets the specified window's show state. zWindow::win_show_state will be set to store the current show state.
| nCmdShow | - Specifies how the window is to be shown. This parameter is ignored the first time an application calls ShowWindow, if the program that launched the application provides a STARTUPINFO structure. Otherwise, the first time ShowWindow is called, the value should be the value obtained by the WinMain function in its nCmdShow parameter. In subsequent calls, this parameter can be one of the following values:
|
Reimplemented in zGrid.
| void zWindow::Style | ( | void | ) |
Refreshes public values of style.base and style.extended.
| xstring zWindow::Text | ( | void | ) | [inline] |
Retrieves the window’s title to the specified text. If the window is a control, the text within the control is retrieived.
Reimplemented in zDateTime.
| void zWindow::Text | ( | LPCTSTR | ) |
| void zWindow::Text | ( | zDBColumn & | ) |
Sets the window’s text by interpreting a value retrieved from a zDBColumn object.
| int zWindow::TextLength | ( | void | ) | [inline] |
Retrieves the length, in characters, of the text associated with a window. The length does not include the terminating null character.
| void zWindow::Unfreeze | ( | void | ) | [inline] |
Sets the redraw flag. If the redraw flag is cleared, the content of the given window is not updated after each change, and the window is not repainted until the redraw flag is set. For example, an application that must add several items to a list box can clear the redraw flag, add the items, and then set the redraw flag. Finally, the application can call the InvalidateRect function to cause the list box to be repainted.
Reimplemented in zGrid.
| int zWindow::Width | ( | void | ) | [inline] |
Retrieves the width of a window in pixels.
| void zWindow::WindowRectangle | ( | void | ) | [inline] |
Retrieves the xrectangle object that represents the bounding area of the control. The dimensions are given in screen coordinates that are relative to the upper-left corner of the screen. Refer to zWindow::win_rect.
| void zWindow::ZOrder | ( | HWND | hWndInsertAfter | ) |
Changes the Z order and position of the window. The Z order is the stack of overlapping windows. Each window has a unique position in the Z order.
| hWndInsertAfter | - Handle to the window to precede the positioned window in the Z order. This parameter must be a window handle or one of the following values: HWND_BOTTOM - Places the window at the bottom of the Z order. If the hWnd parameter 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. |
Values that determines whether an object is displayed in any size anywhere on a form or whether it's displayed at the top, bottom, left, or right of the form and is automatically sized to fit the form's width
Binding informations. A bound object is a control on a form or report whose contents are associated with a particular field in the underlying table or query. For example, a text box that displays an employee's last name might be bound to the LastName field in the Employees table.
Is the string value associated with the window. Each window has a corresponding string value intended for use by the application that created the window.
It is used by the zWindow::ClientRectangle method to receives the coordinates of a window's client area. The client coordinates specify the upper-left and lower-right corners of the client area. Because client coordinates are relative to the upper-left corner of a window's client area, the coordinates of the upper-left corner are (0,0).
| short zWindow::effects |
Sets the specials. If contains __transparentback the device context background remains untouched when drawing text.
The font's object.
Specifies the text that appears as a tooltip control or into mainform's status bar.
The icon associated with the object.
Specifies the graphics file to be displayed on the control or an instance resource name.
Specifies how the source pixels, the destination device context's current brush, and the destination pixels are to be combined to form the image to be displayed on the control.
Binding initialization informations. A bound object is a control on a form or report whose contents are associated with a particular field in the underlying table or query. For example, a text box that displays an employee's last name might be bound to the LastName field in the Employees table.
Label informations. Nedeed to displays a string of text next to the window object.
The name's object.
Specifies the text that is displayed to indicate null window text.
The pointer to the parent window object.
Vertical and horizontal scroll informations. Nedeed to control the process of shifting a data object in a window's client area in order to see parts of the object that extend beyond the border of the client area.
Styles informations. Represents the display type and behavior of the object.
Specifies the value assigned to a radio/check button to toggle against the binded database column value.
| void* zWindow::userdata |
Is the 32-bit value associated with the window. Each window has a corresponding 32-bit value intended for use by the application that created the window.
It is used by the zWindow::WindowRectangle method to receives the screen coordinates of the upper-left and lower-right corners of the window.
| short zWindow::win_show_state |
Specifies the current window's show state. Refer to zWindow::Show method for values.
Specifies the internal window type; it can be one of the following values:
1.6.1