|
sprint 1-alpha
|
#include <Window.h>
Inherited by sprint::gtl::Button, sprint::gtl::CDialog, sprint::gtl::ComboBox, sprint::gtl::ListBox, sprint::gtl::ListView, sprint::gtl::ReBar, sprint::gtl::StatusBar, sprint::gtl::TabCtrl, sprint::gtl::ToolBar, sprint::gtl::TreeView, and sprint::gtl::VWindow.
Public Member Functions | |
| CWindow (HWND hWnd=NULL) | |
| Ctor: require a valid hInst. | |
| void | SetHwnd (HWND hwnd) |
| operator HWND () const | |
| cast | |
| operator bool () const | |
| RECT | GetClientRect () const |
| Ritorna il Rettangolo della Client Area della Window. | |
| RECT | GetWindowRect () const |
| Ritorna il Rettangolo della Client Area della Window. | |
| LONG | SetText (const char *txt) |
| Imposta un dato utente all'indice nIndex. | |
| LONG | SetText (const std::string &txt) |
| LONG | GetText (char *buffer, int buf_len) const |
| Ritorna il dato utente memorizzato nell'indice nIndex. | |
| LONG | SetWindowLong (int nIndex, LONG dwNewLong) |
| Imposta un dato utente all'indice nIndex. | |
| LONG | GetWindowLong (int nIndex) |
| Ritorna il dato utente memorizzato nell'indice nIndex. | |
| HMODULE | GetInstance () |
| return INSTANCE who create this window | |
| void | Show (int mode=SW_SHOW) |
| void | Hide () |
| void | Enable () |
| void | Disable () |
| bool | IsEnabled () const |
| void | Move (int x, int y) const |
| void | Resize (int sx, int sy) const |
| void | Redraw (bool RedrawBg=TRUE) const |
| void | SetCapture () const |
| Tutti gli eventi Mouse e Tastiera vengono inviati a questa finestra. | |
| void | ReleaseCapture () const |
| Tutti gli eventi Mouse e Tastiera tornano alla finestra corretta. | |
| void | Destroy () const |
| Distrugge la finestra e genera un comando WM_DESTROY. | |
| HWND | Parent (void) const |
| ritorna il genitore | |
| CMenuHandle | Menu (void) const |
| bool | SetMenu (HMENU hmenu) |
| void | SetTimer (UINT uTimeOut, UINT nIDEvent=0) const |
| void | KillTimer (UINT nIDEvent=0) const |
| Distrugge il timer nIDEvent associato alla finestra. | |
| CWindow | GetDlgItem (int id) |
| Ritorna l'handle della finestra figlia della corrente di ID id. | |
| void | MoveWindow (int X, int Y, int nWidth, int nHeight, BOOL bRepaint=TRUE) |
| Move current window in X,Y with Width and Height. | |
| void | MoveWindow (const RECT &rc, BOOL bRepaint=TRUE) |
| void | Close () |
| void | DrawMenuBar () |
Public Attributes | |
| HWND | m_hwnd |
Static Public Attributes | |
| static const int | Default = CW_USEDEFAULT |
A Generic Win32 Wrapper, ATL compliant
E' il wrapper di qualsiasi funzione che usa una HWND
| void sprint::gtl::CWindow::Hide | ( | ) |
ShowWindow(m_hwnd, SW_HIDE); Nasconde la finestra
| void sprint::gtl::CWindow::Move | ( | int | x, |
| int | y | ||
| ) | const |
SetWindowPos Imposta la posizione della finestra (corner top left)
| void sprint::gtl::CWindow::Redraw | ( | bool | RedrawBg = TRUE | ) | const |
InvalidateRect(m_hwnd, NULL, TRUE) Dice alla finestra di ridisegnarsi completamente (genera un WM_PAINT)
| void sprint::gtl::CWindow::Resize | ( | int | sx, |
| int | sy | ||
| ) | const |
SetWindowPos Imposta la dimensione della finestra
| void sprint::gtl::CWindow::SetTimer | ( | UINT | uTimeOut, |
| UINT | nIDEvent = 0 |
||
| ) | const |
Imposta un Timer. A ogni scadenza del timeout viene generato un messaggio WM_TIMER
| uTimeOut | timeout in Msec |
| nIDEvent | un ID che viene passato alla funzione che gestisce WM_TIMER |
| void sprint::gtl::CWindow::Show | ( | int | mode = SW_SHOW | ) |
ShowWindow, mostra la finestra
| mode | SW_SHOWNORMAL (default) o SW_HIDE |
1.7.4