ReactOS 0.4.16-dev-92-g0c2cdca
ATL::CContainedWindowT< TBase, TWinTraits > Class Template Reference

#include <atlwin.h>

Inheritance diagram for ATL::CContainedWindowT< TBase, TWinTraits >:
Collaboration diagram for ATL::CContainedWindowT< TBase, TWinTraits >:

Public Member Functions

 CContainedWindowT (CMessageMap *pObject, DWORD dwMsgMapID=0)
 
 CContainedWindowT (LPCTSTR lpszClassName, CMessageMap *pObject, DWORD dwMsgMapID=0)
 
LRESULT DefWindowProc (UINT uMsg, WPARAM wParam, LPARAM lParam)
 
BOOL SubclassWindow (HWND hWnd)
 
HWND UnsubclassWindow (BOOL bForce=FALSE)
 
- Public Member Functions inherited from ATL::CWindow
 CWindow (HWND hWnd=NULL)
 
 operator HWND () const
 
UINT ArrangeIconicWindows ()
 
void Attach (HWND hWndNew)
 
HDC BeginPaint (LPPAINTSTRUCT lpPaint)
 
BOOL BringWindowToTop ()
 
BOOL CenterWindow (HWND hWndCenter=NULL)
 
BOOL ChangeClipboardChain (HWND hWndNewNext)
 
BOOL CheckDlgButton (int nIDButton, UINT nCheck)
 
BOOL CheckRadioButton (int nIDFirstButton, int nIDLastButton, int nIDCheckButton)
 
HWND ChildWindowFromPoint (POINT point) const
 
HWND ChildWindowFromPointEx (POINT point, UINT uFlags) const
 
BOOL ClientToScreen (LPPOINT lpPoint) const
 
BOOL ClientToScreen (LPRECT lpRect) const
 
HWND Create (LPCTSTR lpstrWndClass, HWND hWndParent, _U_RECT rect=NULL, LPCTSTR szWindowName=NULL, DWORD dwStyle=0, DWORD dwExStyle=0, _U_MENUorID MenuOrID=0U, LPVOID lpCreateParam=NULL)
 
BOOL CreateCaret (HBITMAP pBitmap)
 
BOOL CreateGrayCaret (int nWidth, int nHeight)
 
BOOL CreateSolidCaret (int nWidth, int nHeight)
 
HDWP DeferWindowPos (HDWP hWinPosInfo, HWND hWndInsertAfter, int x, int y, int cx, int cy, UINT uFlags)
 
BOOL DestroyWindow ()
 
HWND Detach ()
 
int DlgDirList (LPTSTR lpPathSpec, int nIDListBox, int nIDStaticPath, UINT nFileType)
 
int DlgDirListComboBox (LPTSTR lpPathSpec, int nIDComboBox, int nIDStaticPath, UINT nFileType)
 
BOOL DlgDirSelect (LPTSTR lpString, int nCount, int nIDListBox)
 
BOOL DlgDirSelectComboBox (LPTSTR lpString, int nCount, int nIDComboBox)
 
void DragAcceptFiles (BOOL bAccept=TRUE)
 
BOOL DrawMenuBar ()
 
BOOL EnableScrollBar (UINT uSBFlags, UINT uArrowFlags=ESB_ENABLE_BOTH)
 
BOOL EnableWindow (BOOL bEnable=TRUE)
 
void EndPaint (LPPAINTSTRUCT lpPaint)
 
BOOL FlashWindow (BOOL bInvert)
 
BOOL GetClientRect (LPRECT lpRect) const
 
HDC GetDC ()
 
HDC GetDCEx (HRGN hRgnClip, DWORD flags)
 
HWND GetDescendantWindow (int nID) const
 
HRESULT GetDlgControl (int nID, REFIID iid, void **ppCtrl)
 
int GetDlgCtrlID () const
 
HRESULT GetDlgHost (int nID, REFIID iid, void **ppHost)
 
HWND GetDlgItem (_In_ int nID) const
 
UINT GetDlgItemInt (_In_ int nID, _Out_opt_ BOOL *lpTrans=NULL, _In_ BOOL bSigned=TRUE) const
 
UINT GetDlgItemText (_In_ int nID, _Out_writes_to_(nMaxCount, return+1) LPTSTR lpStr, _In_ int nMaxCount) const
 
BOOL GetDlgItemText (_In_ int nID, _Inout_ _Outref_result_maybenull_ _Post_z_ BSTR &bstrText) const
 
DWORD GetExStyle () const
 
HFONT GetFont () const
 
DWORD GetHotKey () const
 
HICON GetIcon (BOOL bBigIcon=TRUE) const
 
HWND GetLastActivePopup () const
 
HMENU GetMenu () const
 
HWND GetNextDlgGroupItem (HWND hWndCtl, BOOL bPrevious=FALSE) const
 
HWND GetNextDlgTabItem (HWND hWndCtl, BOOL bPrevious=FALSE) const
 
CWindow GetParent () const
 
BOOL GetScrollInfo (int nBar, LPSCROLLINFO lpScrollInfo)
 
BOOL GetScrollPos (int nBar)
 
BOOL GetScrollRange (int nBar, LPINT lpMinPos, LPINT lpMaxPos) const
 
DWORD GetStyle () const
 
HMENU GetSystemMenu (BOOL bRevert)
 
HWND GetTopLevelParent () const
 
HWND GetTopLevelWindow () const
 
HWND GetTopWindow () const
 
BOOL GetUpdateRect (LPRECT lpRect, BOOL bErase=FALSE)
 
int GetUpdateRgn (HRGN hRgn, BOOL bErase=FALSE)
 
HWND GetWindow (UINT nCmd) const
 
DWORD GetWindowContextHelpId () const
 
HDC GetWindowDC ()
 
LONG GetWindowLong (int nIndex) const
 
LONG_PTR GetWindowLongPtr (int nIndex) const
 
BOOL GetWindowPlacement (WINDOWPLACEMENT *lpwndpl) const
 
DWORD GetWindowProcessID ()
 
BOOL GetWindowRect (LPRECT lpRect) const
 
int GetWindowRgn (HRGN hRgn)
 
int GetWindowText (_Out_writes_to_(nMaxCount, return+1) LPTSTR lpszStringBuf, _In_ int nMaxCount) const
 
BOOL GetWindowText (_Inout_ _Outref_result_maybenull_ _Post_z_ BSTR &bstrText) const
 
int GetWindowTextLength () const
 
DWORD GetWindowThreadID ()
 
WORD GetWindowWord (int nIndex) const
 
void GotoDlgCtrl (HWND hWndCtrl) const
 
BOOL HideCaret ()
 
BOOL HiliteMenuItem (HMENU hMenu, UINT uHiliteItem, UINT uHilite)
 
BOOL Invalidate (BOOL bErase=TRUE)
 
BOOL InvalidateRect (LPCRECT lpRect, BOOL bErase=TRUE)
 
void InvalidateRgn (HRGN hRgn, BOOL bErase=TRUE)
 
BOOL IsChild (const HWND hWnd) const
 
BOOL IsDialogMessage (LPMSG lpMsg)
 
UINT IsDlgButtonChecked (int nIDButton) const
 
BOOL IsIconic () const
 
BOOL IsParentDialog ()
 
BOOL IsWindow () const
 
BOOL IsWindowEnabled () const
 
BOOL IsWindowVisible () const
 
BOOL IsWindowUnicode ()
 
BOOL IsZoomed () const
 
BOOL KillTimer (UINT_PTR nIDEvent)
 
BOOL LockWindowUpdate (BOOL bLock=TRUE)
 
int MapWindowPoints (HWND hWndTo, LPPOINT lpPoint, UINT nCount) const
 
int MapWindowPoints (HWND hWndTo, LPRECT lpRect) const
 
int MessageBox (LPCTSTR lpszText, LPCTSTR lpszCaption=NULL, UINT nType=MB_OK)
 
BOOL ModifyStyle (DWORD dwRemove, DWORD dwAdd, UINT nFlags=0)
 
BOOL ModifyStyleEx (DWORD dwRemove, DWORD dwAdd, UINT nFlags=0)
 
BOOL MoveWindow (int x, int y, int nWidth, int nHeight, BOOL bRepaint=TRUE)
 
void NextDlgCtrl () const
 
BOOL OpenClipboard ()
 
BOOL PostMessage (UINT message, WPARAM wParam=0, LPARAM lParam=0)
 
void PrevDlgCtrl () const
 
void Print (HDC hDC, DWORD dwFlags) const
 
void PrintClient (HDC hDC, DWORD dwFlags) const
 
BOOL RedrawWindow (LPCRECT lpRectUpdate=NULL, HRGN hRgnUpdate=NULL, UINT flags=RDW_INVALIDATE|RDW_UPDATENOW|RDW_ERASE)
 
int ReleaseDC (HDC hDC)
 
BOOL ResizeClient (int nWidth, int nHeight, BOOL bRedraw=FALSE)
 
BOOL ScreenToClient (LPPOINT lpPoint) const
 
BOOL ScrollWindow (int xAmount, int yAmount, LPCRECT lpRect=NULL, LPCRECT lpClipRect=NULL)
 
int ScrollWindowEx (int dx, int dy, LPCRECT lpRectScroll, LPCRECT lpRectClip, HRGN hRgnUpdate, LPRECT lpRectUpdate, UINT flags)
 
LRESULT SendDlgItemMessage (int nID, UINT message, WPARAM wParam=0, LPARAM lParam=0)
 
LRESULT SendMessage (UINT message, WPARAM wParam=0, LPARAM lParam=0)
 
void SendMessageToDescendants (UINT message, WPARAM wParam=0, LPARAM lParam=0, BOOL bDeep=TRUE)
 
BOOL SendNotifyMessage (UINT message, WPARAM wParam=0, LPARAM lParam=0)
 
HWND SetActiveWindow ()
 
HWND SetCapture ()
 
HWND SetClipboardViewer ()
 
int SetDlgCtrlID (int nID)
 
BOOL SetDlgItemInt (int nID, UINT nValue, BOOL bSigned=TRUE)
 
BOOL SetDlgItemText (int nID, LPCTSTR lpszString)
 
HWND SetFocus ()
 
void SetFont (HFONT hFont, BOOL bRedraw=TRUE)
 
int SetHotKey (WORD wVirtualKeyCode, WORD wModifiers)
 
HICON SetIcon (HICON hIcon, BOOL bBigIcon=TRUE)
 
BOOL SetMenu (HMENU hMenu)
 
HWND SetParent (HWND hWndNewParent)
 
void SetRedraw (BOOL bRedraw=TRUE)
 
int SetScrollInfo (int nBar, LPSCROLLINFO lpScrollInfo, BOOL bRedraw=TRUE)
 
int SetScrollPos (int nBar, int nPos, BOOL bRedraw=TRUE)
 
BOOL SetScrollRange (int nBar, int nMinPos, int nMaxPos, BOOL bRedraw=TRUE)
 
UINT_PTR SetTimer (UINT_PTR nIDEvent, UINT nElapse, void(CALLBACK *lpfnTimer)(HWND, UINT, UINT_PTR, DWORD)=NULL)
 
BOOL SetWindowContextHelpId (DWORD dwContextHelpId)
 
LONG SetWindowLong (int nIndex, LONG dwNewLong)
 
LONG_PTR SetWindowLongPtr (int nIndex, LONG_PTR dwNewLong)
 
BOOL SetWindowPlacement (const WINDOWPLACEMENT *lpwndpl)
 
BOOL SetWindowPos (HWND hWndInsertAfter, int x, int y, int cx, int cy, UINT nFlags)
 
int SetWindowRgn (HRGN hRgn, BOOL bRedraw=FALSE)
 
BOOL SetWindowText (LPCTSTR lpszString)
 
WORD SetWindowWord (int nIndex, WORD wNewWord)
 
BOOL ShowCaret ()
 
BOOL ShowOwnedPopups (BOOL bShow=TRUE)
 
BOOL ShowScrollBar (UINT nBar, BOOL bShow=TRUE)
 
BOOL ShowWindow (int nCmdShow)
 
BOOL ShowWindowAsync (int nCmdShow)
 
BOOL UpdateWindow ()
 
BOOL ValidateRect (LPCRECT lpRect)
 
BOOL ValidateRgn (HRGN hRgn)
 
BOOL WinHelp (LPCTSTR lpszHelp, UINT nCmd=HELP_CONTEXT, DWORD dwData=0)
 

Static Public Member Functions

static LRESULT CALLBACK StartWindowProc (HWND hWnd, UINT uMsg, WPARAM wParam, LPARAM lParam)
 
static LRESULT CALLBACK WindowProc (HWND hWnd, UINT uMsg, WPARAM wParam, LPARAM lParam)
 
- Static Public Member Functions inherited from ATL::CWindow
static LPCTSTR GetWndClassName ()
 
static LRESULT SendMessage (HWND hWnd, UINT message, WPARAM wParam, LPARAM lParam)
 

Public Attributes

CWndProcThunk m_thunk
 
LPCTSTR m_lpszClassName
 
WNDPROC m_pfnSuperWindowProc
 
CMessageMapm_pObject
 
DWORD m_dwMsgMapID
 
const _ATL_MSGm_pCurrentMsg
 
- Public Attributes inherited from ATL::CWindow
HWND m_hWnd
 

Additional Inherited Members

- Static Public Attributes inherited from ATL::CWindow
static RECT rcDefault
 

Detailed Description

template<class TBase = CWindow, class TWinTraits = CControlWinTraits>
class ATL::CContainedWindowT< TBase, TWinTraits >

Definition at line 1758 of file atlwin.h.

Constructor & Destructor Documentation

◆ CContainedWindowT() [1/2]

template<class TBase = CWindow, class TWinTraits = CControlWinTraits>
ATL::CContainedWindowT< TBase, TWinTraits >::CContainedWindowT ( CMessageMap pObject,
DWORD  dwMsgMapID = 0 
)
inline

Definition at line 1773 of file atlwin.h.

1774 {
1775 m_lpszClassName = TBase::GetWndClassName();
1778 m_dwMsgMapID = dwMsgMapID;
1780 }
CMessageMap * m_pObject
Definition: atlwin.h:1768
WNDPROC m_pfnSuperWindowProc
Definition: atlwin.h:1767
LPCTSTR m_lpszClassName
Definition: atlwin.h:1766
const _ATL_MSG * m_pCurrentMsg
Definition: atlwin.h:1770
#define NULL
Definition: types.h:112
FxObject * pObject
#define DefWindowProc
Definition: ros2win.h:31

◆ CContainedWindowT() [2/2]

template<class TBase = CWindow, class TWinTraits = CControlWinTraits>
ATL::CContainedWindowT< TBase, TWinTraits >::CContainedWindowT ( LPCTSTR  lpszClassName,
CMessageMap pObject,
DWORD  dwMsgMapID = 0 
)
inline

Definition at line 1782 of file atlwin.h.

1783 {
1784 m_lpszClassName = lpszClassName;
1787 m_dwMsgMapID = dwMsgMapID;
1789 }

Member Function Documentation

◆ DefWindowProc()

template<class TBase = CWindow, class TWinTraits = CControlWinTraits>
LRESULT ATL::CContainedWindowT< TBase, TWinTraits >::DefWindowProc ( UINT  uMsg,
WPARAM  wParam,
LPARAM  lParam 
)
inline

Definition at line 1791 of file atlwin.h.

1792 {
1793 return ::CallWindowProc(m_pfnSuperWindowProc, this->m_hWnd, uMsg, wParam, lParam);
1794 }
HWND m_hWnd
Definition: atlwin.h:273
WPARAM wParam
Definition: combotst.c:138
LPARAM lParam
Definition: combotst.c:139

Referenced by ATL::CContainedWindowT< TBase, TWinTraits >::WindowProc().

◆ StartWindowProc()

template<class TBase = CWindow, class TWinTraits = CControlWinTraits>
static LRESULT CALLBACK ATL::CContainedWindowT< TBase, TWinTraits >::StartWindowProc ( HWND  hWnd,
UINT  uMsg,
WPARAM  wParam,
LPARAM  lParam 
)
inlinestatic

Definition at line 1840 of file atlwin.h.

1841 {
1842 CContainedWindowT<TBase>* pThis;
1843 WNDPROC newWindowProc;
1844 WNDPROC GCCU(pOldProc);
1845
1846 pThis = reinterpret_cast<CContainedWindowT<TBase>*>(_AtlWinModule.ExtractCreateWndData());
1847 ATLASSERT(pThis != NULL);
1848 if (pThis == NULL)
1849 return 0;
1850 pThis->m_thunk.Init(WindowProc, pThis);
1851 newWindowProc = pThis->m_thunk.GetWNDPROC();
1852 pOldProc = reinterpret_cast<WNDPROC>(::SetWindowLongPtr(hWnd, GWLP_WNDPROC, reinterpret_cast<LONG_PTR>(newWindowProc)));
1853 Unused(pOldProc); // TODO: should generate trace message if overwriting another subclass
1854 pThis->m_hWnd = hWnd;
1855 return newWindowProc(hWnd, uMsg, wParam, lParam);
1856 }
#define ATLASSERT(x)
Definition: CComVariant.cpp:10
HWND hWnd
Definition: settings.c:17
static LRESULT CALLBACK WindowProc(HWND hWnd, UINT uMsg, WPARAM wParam, LPARAM lParam)
Definition: atlwin.h:1858
#define GCCU(x)
Definition: atlwin.h:27
#define Unused(x)
Definition: atlwin.h:28
__int3264 LONG_PTR
Definition: mstsclib_h.h:276
#define SetWindowLongPtr
Definition: treelist.c:70
#define GWLP_WNDPROC
Definition: treelist.c:66
LRESULT(CALLBACK * WNDPROC)(HWND, UINT, WPARAM, LPARAM)
Definition: winuser.h:2909

◆ SubclassWindow()

template<class TBase = CWindow, class TWinTraits = CControlWinTraits>
BOOL ATL::CContainedWindowT< TBase, TWinTraits >::SubclassWindow ( HWND  hWnd)
inline

Definition at line 1796 of file atlwin.h.

1797 {
1798 ATLASSERT(m_hWnd == NULL);
1800
1801 CContainedWindowT<TBase>* pThis;
1802 pThis = reinterpret_cast<CContainedWindowT<TBase>*>(this);
1803
1804 BOOL result = m_thunk.Init(WindowProc, pThis);
1805 if (result == FALSE)
1806 return FALSE;
1807
1808 WNDPROC newWindowProc = m_thunk.GetWNDPROC();
1809 WNDPROC oldWindowProc = reinterpret_cast<WNDPROC>(
1810 ::SetWindowLongPtr(hWnd, GWLP_WNDPROC, reinterpret_cast<LONG_PTR>(newWindowProc)));
1811 if (oldWindowProc == NULL)
1812 return FALSE;
1813
1814 pThis->m_pfnSuperWindowProc = oldWindowProc;
1815 pThis->m_hWnd = hWnd;
1816 return TRUE;
1817 }
CWndProcThunk m_thunk
Definition: atlwin.h:1765
BOOL IsWindow() const
Definition: atlwin.h:947
WNDPROC GetWNDPROC()
Definition: atlwin.h:258
BOOL Init(WNDPROC proc, void *pThis)
Definition: atlwin.h:250
#define TRUE
Definition: types.h:120
#define FALSE
Definition: types.h:117
unsigned int BOOL
Definition: ntddk_ex.h:94
GLuint64EXT * result
Definition: glext.h:11304

Referenced by CAddressEditBox::Init().

◆ UnsubclassWindow()

template<class TBase = CWindow, class TWinTraits = CControlWinTraits>
HWND ATL::CContainedWindowT< TBase, TWinTraits >::UnsubclassWindow ( BOOL  bForce = FALSE)
inline

Definition at line 1819 of file atlwin.h.

1820 {
1821 ATLASSERT(m_hWnd != NULL);
1823
1824 CContainedWindowT<TBase>* pThis;
1825 pThis = reinterpret_cast<CContainedWindowT<TBase>*>(this);
1826 HWND hwndOld = pThis->m_hWnd;
1827
1828 WNDPROC subclassedProc = reinterpret_cast<WNDPROC>(
1830 if (!bForce && m_thunk.GetWNDPROC() != subclassedProc)
1831 return NULL;
1832
1834 (LONG_PTR)pThis->m_pfnSuperWindowProc);
1835 pThis->m_pfnSuperWindowProc = ::DefWindowProc;
1836 pThis->m_hWnd = NULL;
1837 return hwndOld;
1838 }
#define GetWindowLongPtr
Definition: treelist.c:73

◆ WindowProc()

template<class TBase = CWindow, class TWinTraits = CControlWinTraits>
static LRESULT CALLBACK ATL::CContainedWindowT< TBase, TWinTraits >::WindowProc ( HWND  hWnd,
UINT  uMsg,
WPARAM  wParam,
LPARAM  lParam 
)
inlinestatic

Definition at line 1858 of file atlwin.h.

1859 {
1860 CContainedWindowT<TBase>* pThis = reinterpret_cast<CContainedWindowT<TBase>*>(hWnd);
1861 _ATL_MSG msg(pThis->m_hWnd, uMsg, wParam, lParam);
1862 LRESULT lResult;
1863 const _ATL_MSG *previousMessage;
1864 BOOL handled;
1865 LONG_PTR saveWindowProc;
1866
1867 ATLASSERT(pThis != NULL && pThis->m_hWnd != NULL && pThis->m_pObject != NULL);
1868 if (pThis == NULL || pThis->m_hWnd == NULL || pThis->m_pObject == NULL)
1869 return 0;
1870
1871 hWnd = pThis->m_hWnd;
1872 previousMessage = pThis->m_pCurrentMsg;
1873 pThis->m_pCurrentMsg = &msg;
1874
1875 handled = pThis->m_pObject->ProcessWindowMessage(hWnd, uMsg, wParam, lParam, lResult, pThis->m_dwMsgMapID);
1876 ATLASSERT(pThis->m_pCurrentMsg == &msg);
1877
1878 pThis->m_pCurrentMsg = previousMessage;
1879 if (handled == FALSE)
1880 {
1881 if (uMsg == WM_NCDESTROY)
1882 {
1883 saveWindowProc = ::GetWindowLongPtr(hWnd, GWLP_WNDPROC);
1884 lResult = pThis->DefWindowProc(uMsg, wParam, lParam);
1885 if (pThis->m_pfnSuperWindowProc != ::DefWindowProc && saveWindowProc == ::GetWindowLongPtr(hWnd, GWLP_WNDPROC))
1886 ::SetWindowLongPtr(hWnd, GWLP_WNDPROC, reinterpret_cast<LONG_PTR>(pThis->m_pfnSuperWindowProc));
1887 pThis->m_hWnd = NULL;
1888 }
1889 else
1890 lResult = pThis->DefWindowProc(uMsg, wParam, lParam);
1891 }
1892 return lResult;
1893 }
#define msg(x)
Definition: auth_time.c:54
LONG_PTR LRESULT
Definition: windef.h:209
#define WM_NCDESTROY
Definition: winuser.h:1687

Referenced by ATL::CContainedWindowT< TBase, TWinTraits >::StartWindowProc(), and ATL::CContainedWindowT< TBase, TWinTraits >::SubclassWindow().

Member Data Documentation

◆ m_dwMsgMapID

template<class TBase = CWindow, class TWinTraits = CControlWinTraits>
DWORD ATL::CContainedWindowT< TBase, TWinTraits >::m_dwMsgMapID

◆ m_lpszClassName

template<class TBase = CWindow, class TWinTraits = CControlWinTraits>
LPCTSTR ATL::CContainedWindowT< TBase, TWinTraits >::m_lpszClassName

◆ m_pCurrentMsg

template<class TBase = CWindow, class TWinTraits = CControlWinTraits>
const _ATL_MSG* ATL::CContainedWindowT< TBase, TWinTraits >::m_pCurrentMsg

◆ m_pfnSuperWindowProc

◆ m_pObject

template<class TBase = CWindow, class TWinTraits = CControlWinTraits>
CMessageMap* ATL::CContainedWindowT< TBase, TWinTraits >::m_pObject

◆ m_thunk


The documentation for this class was generated from the following file: