TalanSoft Toolkits  201707
 All Classes Namespaces Functions Variables Typedefs Enumerations Enumerator Groups Pages
Public Member Functions | Protected Attributes | List of all members
BaseWindow Class Reference
Inheritance diagram for BaseWindow:
cIUnknownImpl< ni::iUnknown > Dialog Window cAboutDlg Button ClipboardViewer ComboBox Edit FrameWindow Header ListBox ProgressBar ReBar Slider Splitter Static StatusBar TabControl ToolBar TreeView

Detailed Description

Base window class for Dialog and Window.

Public Member Functions

 BaseWindow ()
 
 BaseWindow (HWND hWnd, BOOL bDestroy)
 
virtual ~BaseWindow ()
 
virtual BOOL Reshape (UINT iCX, UINT iCY)
 
HWND GetHWND () const
 
bool Attach (HWND hWnd, BOOL bDestroy)
 Attach object to an existing handle. More...
 
void Detach ()
 
bool AttachDlgItem (HWND hDlg, INT iItemID)
 
void CenterOnScreen ()
 
void AddStyle (DWORD dwStyle)
 
virtual void Destroy ()
 
virtual WINUI_INL BOOL IsCreated () const
 
virtual BOOL ShowWindow (int iCmdShow)
 
virtual BOOL SetWindowPos (HWND hWndAfter, int iX, int iY, int iCX, int iCY, UINT iFlags=SWP_NOZORDER)
 
virtual BOOL GetWindowRect (Rect &rcWnd)
 
virtual BOOL SetWindowRect (Rect rcWnd)
 
virtual BOOL GetClientRect (Rect &rcClient)
 
virtual LRESULT SendMessage (UINT Msg, WPARAM wParam, LPARAM lParam)
 
virtual BOOL PostMessage (UINT Msg, WPARAM wParam, LPARAM lParam)
 
virtual void SetParent (BaseWindow *pWnd)
 
virtual LONG GetTextLength () const
 
virtual void GetText (TCHAR *aszOut, ULONG nMaxChar) const
 
virtual void SetText (const TCHAR *aszStr)
 
virtual ni::cString GetText () const
 
virtual HDC GetDC ()
 
virtual void ReleaseDC (HDC hDC)
 
virtual HWND SetCapture ()
 
virtual BOOL ReleaseCapture () const
 
virtual BOOL UpdateWindow ()
 
virtual DWORD GetStyle () const
 
virtual DWORD GetExStyle () const
 
virtual LONG GetWindowLong (int nIndex) const
 
virtual LONG SetWindowLong (int nIndex, LONG dwNewLong)
 
BOOL SendNotifyMessage (UINT message, WPARAM wParam=0, LPARAM lParam=0)
 
int GetWindowTextLength () const
 
void SetFont (HFONT hFont, BOOL bRedraw=TRUE)
 
HFONT GetFont () const
 
BOOL BringWindowToTop ()
 
BOOL GetWindowPlacement (WINDOWPLACEMENT *lpwndpl) const
 
BOOL SetWindowPlacement (const WINDOWPLACEMENT *lpwndpl)
 
BOOL ClientToScreen (LPPOINT lpPoint) const
 
BOOL ClientToScreen (Rect *pRect) const
 
BOOL ScreenToClient (LPPOINT lpPoint) const
 
BOOL ScreenToClient (Rect *pRect) const
 
BOOL Invalidate (BOOL bErase=TRUE)
 
BOOL InvalidateRect (LPCRECT lpRect, BOOL bErase=TRUE)
 
BOOL ValidateRect (LPCRECT lpRect)
 
void InvalidateRgn (HRGN hRgn, BOOL bErase=TRUE)
 
BOOL IsVisible () const
 
BOOL IsEnabled () const
 
BOOL Enable (BOOL bEnable=TRUE)
 
HWND SetActiveWindow ()
 
HWND SetFocus ()
 
int GetScrollPos (int nBar) const
 
BOOL GetScrollRange (int nBar, LPINT lpMinPos, LPINT lpMaxPos) const
 
BOOL ScrollWindow (int xAmount, int yAmount, Rect *pRect=NULL, Rect *pClipRect=NULL)
 
int ScrollWindowEx (int dx, int dy, Rect *pRectScroll, Rect *pRectClip, HRGN hRgnUpdate, Rect *pRectUpdate, UINT uFlags)
 
int ScrollWindowEx (int dx, int dy, UINT uFlags, Rect *pRectScroll=NULL, Rect *pRectClip=NULL, HRGN hRgnUpdate=NULL, Rect *pRectUpdate=NULL)
 
int SetScrollPos (int nBar, int nPos, BOOL bRedraw=TRUE)
 
BOOL SetScrollRange (int nBar, int nMinPos, int nMaxPos, BOOL bRedraw=TRUE)
 
BOOL ShowScrollBar (UINT nBar, BOOL bShow=TRUE)
 
BOOL EnableScrollBar (UINT uSBFlags, UINT uArrowFlags=ESB_ENABLE_BOTH)
 
BOOL IsChild (HWND hWnd) const
 
BOOL FlashWindow (BOOL bInvert)
 
HICON SetIcon (HICON hIcon, BOOL bBigIcon=TRUE)
 
HICON GetIcon (BOOL bBigIcon=TRUE) const
 
int GetWindowRgn (HRGN hRgn)
 
int SetWindowRgn (HRGN hRgn, BOOL bRedraw=FALSE)
 
BOOL SetTopMost ()
 
- Public Member Functions inherited from cIUnknownImpl< ni::iUnknown >
 cIUnknownImpl ()
 
virtual tBool IsOK () const
 
virtual void Invalidate ()
 
virtual iUnknownQueryInterface (const ni::tUUID &aIID)
 
virtual void ListInterfaces (iMutableCollection *apLst, tU32) const
 

Protected Attributes

HWND m_hWnd
 
BOOL m_bDestroy
 

Additional Inherited Members

- Public Types inherited from cIUnknownImpl< ni::iUnknown >
typedef cIUnknownImpl
< ni::iUnknown, FLAGS, T1, T2,
T3, T4 > 
BaseImpl
 
typedef ni::iUnknown Base0
 
typedef T1 Base1
 
typedef T2 Base2
 
typedef T3 Base3
 
typedef T4 Base4
 

Constructor & Destructor Documentation

BaseWindow ( HWND  hWnd,
BOOL  bDestroy 
)
See also
Attach()
virtual ~BaseWindow ( )
virtual

Member Function Documentation

virtual BOOL Reshape ( UINT  iCX,
UINT  iCY 
)
virtual

Reimplemented in Splitter.

HWND GetHWND ( ) const
bool Attach ( HWND  hWnd,
BOOL  bDestroy 
)

Attach object to an existing handle.

Returns
true in case of success
Parameters
hWndWindow handle which should be attached
bDestroy
See also
Detach(), AttachDlgItem()
Remarks
Destroies existing window
void Detach ( )
bool AttachDlgItem ( HWND  hDlg,
INT  iItemID 
)
See also
Attach(), Detach()
void CenterOnScreen ( )
void AddStyle ( DWORD  dwStyle)
virtual void Destroy ( )
virtual
virtual WINUI_INL BOOL IsCreated ( ) const
virtual
virtual BOOL ShowWindow ( int  iCmdShow)
virtual
virtual BOOL SetWindowPos ( HWND  hWndAfter,
int  iX,
int  iY,
int  iCX,
int  iCY,
UINT  iFlags = SWP_NOZORDER 
)
virtual
virtual BOOL GetWindowRect ( Rect rcWnd)
virtual
virtual BOOL SetWindowRect ( Rect  rcWnd)
virtual
virtual BOOL GetClientRect ( Rect rcClient)
virtual
virtual LRESULT SendMessage ( UINT  Msg,
WPARAM  wParam,
LPARAM  lParam 
)
virtual
virtual BOOL PostMessage ( UINT  Msg,
WPARAM  wParam,
LPARAM  lParam 
)
virtual
virtual void SetParent ( BaseWindow pWnd)
virtual
virtual LONG GetTextLength ( ) const
virtual
virtual void GetText ( TCHAR *  aszOut,
ULONG  nMaxChar 
) const
virtual
virtual void SetText ( const TCHAR *  aszStr)
virtual
virtual ni::cString GetText ( ) const
virtual
virtual HDC GetDC ( )
virtual
virtual void ReleaseDC ( HDC  hDC)
virtual
virtual HWND SetCapture ( )
virtual
virtual BOOL ReleaseCapture ( ) const
virtual
virtual BOOL UpdateWindow ( )
virtual
virtual DWORD GetStyle ( ) const
virtual
virtual DWORD GetExStyle ( ) const
virtual
virtual LONG GetWindowLong ( int  nIndex) const
virtual
virtual LONG SetWindowLong ( int  nIndex,
LONG  dwNewLong 
)
virtual
BOOL SendNotifyMessage ( UINT  message,
WPARAM  wParam = 0,
LPARAM  lParam = 0 
)
int GetWindowTextLength ( ) const
void SetFont ( HFONT  hFont,
BOOL  bRedraw = TRUE 
)
HFONT GetFont ( ) const
BOOL BringWindowToTop ( )
BOOL GetWindowPlacement ( WINDOWPLACEMENT *  lpwndpl) const
BOOL SetWindowPlacement ( const WINDOWPLACEMENT *  lpwndpl)
BOOL ClientToScreen ( LPPOINT  lpPoint) const
BOOL ClientToScreen ( Rect pRect) const
BOOL ScreenToClient ( LPPOINT  lpPoint) const
BOOL ScreenToClient ( Rect pRect) const
BOOL Invalidate ( BOOL  bErase = TRUE)
BOOL InvalidateRect ( LPCRECT  lpRect,
BOOL  bErase = TRUE 
)
BOOL ValidateRect ( LPCRECT  lpRect)
void InvalidateRgn ( HRGN  hRgn,
BOOL  bErase = TRUE 
)
BOOL IsVisible ( ) const
BOOL IsEnabled ( ) const
BOOL Enable ( BOOL  bEnable = TRUE)
HWND SetActiveWindow ( )
HWND SetFocus ( )
int GetScrollPos ( int  nBar) const
BOOL GetScrollRange ( int  nBar,
LPINT  lpMinPos,
LPINT  lpMaxPos 
) const
BOOL ScrollWindow ( int  xAmount,
int  yAmount,
Rect pRect = NULL,
Rect pClipRect = NULL 
)
int ScrollWindowEx ( int  dx,
int  dy,
Rect pRectScroll,
Rect pRectClip,
HRGN  hRgnUpdate,
Rect pRectUpdate,
UINT  uFlags 
)
int ScrollWindowEx ( int  dx,
int  dy,
UINT  uFlags,
Rect pRectScroll = NULL,
Rect pRectClip = NULL,
HRGN  hRgnUpdate = NULL,
Rect pRectUpdate = NULL 
)
int SetScrollPos ( int  nBar,
int  nPos,
BOOL  bRedraw = TRUE 
)
BOOL SetScrollRange ( int  nBar,
int  nMinPos,
int  nMaxPos,
BOOL  bRedraw = TRUE 
)
BOOL ShowScrollBar ( UINT  nBar,
BOOL  bShow = TRUE 
)
BOOL EnableScrollBar ( UINT  uSBFlags,
UINT  uArrowFlags = ESB_ENABLE_BOTH 
)
BOOL IsChild ( HWND  hWnd) const
BOOL FlashWindow ( BOOL  bInvert)
HICON SetIcon ( HICON  hIcon,
BOOL  bBigIcon = TRUE 
)
HICON GetIcon ( BOOL  bBigIcon = TRUE) const
int GetWindowRgn ( HRGN  hRgn)
int SetWindowRgn ( HRGN  hRgn,
BOOL  bRedraw = FALSE 
)
BOOL SetTopMost ( )

Member Data Documentation

HWND m_hWnd
protected
BOOL m_bDestroy
protected