ReactOS  0.4.15-dev-3456-g4a17d4b
ATL::CDialogImplBaseT< TBase > Class Template Reference

#include <atlwin.h>

Inheritance diagram for ATL::CDialogImplBaseT< TBase >:
Collaboration diagram for ATL::CDialogImplBaseT< TBase >:

Public Member Functions

virtual ~CDialogImplBaseT ()
 
virtual DLGPROC GetDialogProc ()
 
virtual void OnFinalMessage (HWND)
 
- Public Member Functions inherited from ATL::CWindowImplRoot< TBase >
 CWindowImplRoot ()
 
virtual ~CWindowImplRoot ()
 
- Public Member Functions inherited from ATL::CMessageMap
virtual BOOL ProcessWindowMessage (HWND hWnd, UINT uMsg, WPARAM wParam, LPARAM lParam, LRESULT &lResult, DWORD dwMsgMapID)=0
 

Static Public Member Functions

static INT_PTR CALLBACK StartDialogProc (HWND hWnd, UINT uMsg, WPARAM wParam, LPARAM lParam)
 
static INT_PTR CALLBACK DialogProc (HWND hWnd, UINT uMsg, WPARAM wParam, LPARAM lParam)
 

Additional Inherited Members

- Public Types inherited from ATL::CWindowImplRoot< TBase >
enum  { WINSTATE_DESTROYED = 0x00000001 }
 
- Public Attributes inherited from ATL::CWindowImplRoot< TBase >
CWndProcThunk m_thunk
 
const _ATL_MSGm_pCurrentMsg
 
DWORD m_dwState
 

Detailed Description

template<class TBase = CWindow>
class ATL::CDialogImplBaseT< TBase >

Definition at line 1331 of file atlwin.h.

Constructor & Destructor Documentation

◆ ~CDialogImplBaseT()

template<class TBase = CWindow>
virtual ATL::CDialogImplBaseT< TBase >::~CDialogImplBaseT ( )
inlinevirtual

Definition at line 1338 of file atlwin.h.

1339  {
1340  }

Member Function Documentation

◆ DialogProc()

template<class TBase = CWindow>
static INT_PTR CALLBACK ATL::CDialogImplBaseT< TBase >::DialogProc ( HWND  hWnd,
UINT  uMsg,
WPARAM  wParam,
LPARAM  lParam 
)
inlinestatic

Definition at line 1364 of file atlwin.h.

1365  {
1366  CDialogImplBaseT<TBase> *pThis = reinterpret_cast<CDialogImplBaseT<TBase>*>(hWnd);
1367  _ATL_MSG msg(pThis->m_hWnd, uMsg, wParam, lParam);
1368  LRESULT lResult = 0;
1369  const _ATL_MSG *previousMessage;
1370  BOOL handled;
1371 
1372  hWnd = pThis->m_hWnd;
1373  previousMessage = pThis->m_pCurrentMsg;
1374  pThis->m_pCurrentMsg = &msg;
1375 
1376  handled = pThis->ProcessWindowMessage(hWnd, uMsg, wParam, lParam, lResult, 0);
1377  ATLASSERT(pThis->m_pCurrentMsg == &msg);
1378 
1379  if (handled)
1380  {
1381  if ((pThis->m_dwState & WINSTATE_DESTROYED) == 0)
1382  {
1383  ::SetWindowLongPtr(pThis->m_hWnd, DWLP_MSGRESULT, lResult);
1384  }
1385  }
1386  else
1387  {
1388  if (uMsg == WM_NCDESTROY)
1389  {
1390  pThis->m_dwState |= WINSTATE_DESTROYED;
1391  }
1392  }
1393 
1394  ATLASSERT(pThis->m_pCurrentMsg == &msg);
1395  pThis->m_pCurrentMsg = previousMessage;
1396 
1397  if (previousMessage == NULL && (pThis->m_dwState & WINSTATE_DESTROYED) != 0)
1398  {
1399  pThis->m_dwState &= ~WINSTATE_DESTROYED;
1400  pThis->m_hWnd = NULL;
1401  pThis->OnFinalMessage(hWnd);
1402  }
1403  return lResult;
1404  }
#define ATLASSERT(x)
Definition: CComVariant.cpp:10
HWND hWnd
Definition: settings.c:17
#define SetWindowLongPtr
Definition: treelist.c:70
WPARAM wParam
Definition: combotst.c:138
#define DWLP_MSGRESULT
Definition: winuser.h:864
unsigned int BOOL
Definition: ntddk_ex.h:94
#define WM_NCDESTROY
Definition: winuser.h:1671
#define NULL
Definition: types.h:112
#define msg(x)
Definition: auth_time.c:54
LONG_PTR LRESULT
Definition: windef.h:209
LPARAM lParam
Definition: combotst.c:139

Referenced by ATL::CDialogImplBaseT< CWindow >::GetDialogProc().

◆ GetDialogProc()

template<class TBase = CWindow>
virtual DLGPROC ATL::CDialogImplBaseT< TBase >::GetDialogProc ( )
inlinevirtual

Definition at line 1341 of file atlwin.h.

1342  {
1343  return DialogProc;
1344  }
static INT_PTR CALLBACK DialogProc(HWND hWnd, UINT uMsg, WPARAM wParam, LPARAM lParam)
Definition: atlwin.h:1364

Referenced by ATL::CDialogImplBaseT< CWindow >::StartDialogProc().

◆ OnFinalMessage()

template<class TBase = CWindow>
virtual void ATL::CDialogImplBaseT< TBase >::OnFinalMessage ( HWND  )
inlinevirtual

Definition at line 1406 of file atlwin.h.

1407  {
1408  }

Referenced by ATL::CDialogImplBaseT< CWindow >::DialogProc().

◆ StartDialogProc()

template<class TBase = CWindow>
static INT_PTR CALLBACK ATL::CDialogImplBaseT< TBase >::StartDialogProc ( HWND  hWnd,
UINT  uMsg,
WPARAM  wParam,
LPARAM  lParam 
)
inlinestatic

Definition at line 1346 of file atlwin.h.

1347  {
1348  CDialogImplBaseT<TBase> *pThis;
1349  DLGPROC newDlgProc;
1350  DLGPROC GCCU(pOldProc);
1351 
1352  pThis = reinterpret_cast<CDialogImplBaseT<TBase>*>(_AtlWinModule.ExtractCreateWndData());
1353  ATLASSERT(pThis != NULL);
1354  if (pThis == NULL)
1355  return 0;
1356  pThis->m_thunk.Init((WNDPROC)pThis->GetDialogProc(), pThis);
1357  newDlgProc = reinterpret_cast<DLGPROC>(pThis->m_thunk.GetWNDPROC());
1358  pOldProc = reinterpret_cast<DLGPROC>(::SetWindowLongPtr(hWnd, DWLP_DLGPROC, reinterpret_cast<LONG_PTR>(newDlgProc)));
1359  Unused(pOldProc); // TODO: should generate trace message if overwriting another subclass
1360  pThis->m_hWnd = hWnd;
1361  return newDlgProc(hWnd, uMsg, wParam, lParam);
1362  }
#define DWLP_DLGPROC
Definition: winuser.h:865
#define ATLASSERT(x)
Definition: CComVariant.cpp:10
HWND hWnd
Definition: settings.c:17
#define SetWindowLongPtr
Definition: treelist.c:70
WPARAM wParam
Definition: combotst.c:138
INT_PTR(CALLBACK * DLGPROC)(HWND, UINT, WPARAM, LPARAM)
Definition: winuser.h:2876
LRESULT(CALLBACK * WNDPROC)(HWND, UINT, WPARAM, LPARAM)
Definition: winuser.h:2886
#define GCCU(x)
Definition: atlwin.h:27
#define NULL
Definition: types.h:112
LPARAM lParam
Definition: combotst.c:139
#define Unused(x)
Definition: atlwin.h:28

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