ReactOS 0.4.15-dev-6069-g56a4501
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 1752 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 1767 of file atlwin.h.

1768 {
1769 m_lpszClassName = TBase::GetWndClassName();
1772 m_dwMsgMapID = dwMsgMapID;
1774 }
CMessageMap * m_pObject
Definition: atlwin.h:1762
WNDPROC m_pfnSuperWindowProc
Definition: atlwin.h:1761
LPCTSTR m_lpszClassName
Definition: atlwin.h:1760
const _ATL_MSG * m_pCurrentMsg
Definition: atlwin.h:1764
#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 1776 of file atlwin.h.

1777 {
1778 m_lpszClassName = lpszClassName;
1781 m_dwMsgMapID = dwMsgMapID;
1783 }

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 1785 of file atlwin.h.

1786 {
1787 return ::CallWindowProc(m_pfnSuperWindowProc, this->m_hWnd, uMsg, wParam, lParam);
1788 }
HWND m_hWnd
Definition: atlwin.h:267
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 1834 of file atlwin.h.

1835 {
1836 CContainedWindowT<TBase>* pThis;
1837 WNDPROC newWindowProc;
1838 WNDPROC GCCU(pOldProc);
1839
1840 pThis = reinterpret_cast<CContainedWindowT<TBase>*>(_AtlWinModule.ExtractCreateWndData());
1841 ATLASSERT(pThis != NULL);
1842 if (pThis == NULL)
1843 return 0;
1844 pThis->m_thunk.Init(WindowProc, pThis);
1845 newWindowProc = pThis->m_thunk.GetWNDPROC();
1846 pOldProc = reinterpret_cast<WNDPROC>(::SetWindowLongPtr(hWnd, GWLP_WNDPROC, reinterpret_cast<LONG_PTR>(newWindowProc)));
1847 Unused(pOldProc); // TODO: should generate trace message if overwriting another subclass
1848 pThis->m_hWnd = hWnd;
1849 return newWindowProc(hWnd, uMsg, wParam, lParam);
1850 }
#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:1852
#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:2896

◆ SubclassWindow()

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

Definition at line 1790 of file atlwin.h.

1791 {
1792 ATLASSERT(m_hWnd == NULL);
1794
1795 CContainedWindowT<TBase>* pThis;
1796 pThis = reinterpret_cast<CContainedWindowT<TBase>*>(this);
1797
1798 BOOL result = m_thunk.Init(WindowProc, pThis);
1799 if (result == FALSE)
1800 return FALSE;
1801
1802 WNDPROC newWindowProc = m_thunk.GetWNDPROC();
1803 WNDPROC oldWindowProc = reinterpret_cast<WNDPROC>(
1804 ::SetWindowLongPtr(hWnd, GWLP_WNDPROC, reinterpret_cast<LONG_PTR>(newWindowProc)));
1805 if (oldWindowProc == NULL)
1806 return FALSE;
1807
1808 pThis->m_pfnSuperWindowProc = oldWindowProc;
1809 pThis->m_hWnd = hWnd;
1810 return TRUE;
1811 }
CWndProcThunk m_thunk
Definition: atlwin.h:1759
BOOL IsWindow() const
Definition: atlwin.h:941
WNDPROC GetWNDPROC()
Definition: atlwin.h:252
BOOL Init(WNDPROC proc, void *pThis)
Definition: atlwin.h:244
#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 1813 of file atlwin.h.

1814 {
1815 ATLASSERT(m_hWnd != NULL);
1817
1818 CContainedWindowT<TBase>* pThis;
1819 pThis = reinterpret_cast<CContainedWindowT<TBase>*>(this);
1820 HWND hwndOld = pThis->m_hWnd;
1821
1822 WNDPROC subclassedProc = reinterpret_cast<WNDPROC>(
1824 if (!bForce && m_thunk.GetWNDPROC() != subclassedProc)
1825 return NULL;
1826
1828 (LONG_PTR)pThis->m_pfnSuperWindowProc);
1829 pThis->m_pfnSuperWindowProc = ::DefWindowProc;
1830 pThis->m_hWnd = NULL;
1831 return hwndOld;
1832 }
#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 1852 of file atlwin.h.

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

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: