ReactOS  0.4.13-dev-259-g5ca9c9c
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 1328 of file atlwin.h.

Constructor & Destructor Documentation

◆ ~CDialogImplBaseT()

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

Definition at line 1335 of file atlwin.h.

1336  {
1337  }

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

1362  {
1363  CDialogImplBaseT<TBase> *pThis = reinterpret_cast<CDialogImplBaseT<TBase>*>(hWnd);
1364  _ATL_MSG msg(pThis->m_hWnd, uMsg, wParam, lParam);
1365  LRESULT lResult = 0;
1366  const _ATL_MSG *previousMessage;
1367  BOOL handled;
1368 
1369  hWnd = pThis->m_hWnd;
1370  previousMessage = pThis->m_pCurrentMsg;
1371  pThis->m_pCurrentMsg = &msg;
1372 
1373  handled = pThis->ProcessWindowMessage(hWnd, uMsg, wParam, lParam, lResult, 0);
1374  ATLASSERT(pThis->m_pCurrentMsg == &msg);
1375 
1376  if (handled)
1377  {
1378  if ((pThis->m_dwState & WINSTATE_DESTROYED) == 0)
1379  {
1380  ::SetWindowLongPtr(pThis->m_hWnd, DWLP_MSGRESULT, lResult);
1381  }
1382  }
1383  else
1384  {
1385  if (uMsg == WM_NCDESTROY)
1386  {
1387  pThis->m_dwState |= WINSTATE_DESTROYED;
1388  }
1389  }
1390 
1391  ATLASSERT(pThis->m_pCurrentMsg == &msg);
1392  pThis->m_pCurrentMsg = previousMessage;
1393 
1394  if (previousMessage == NULL && (pThis->m_dwState & WINSTATE_DESTROYED) != 0)
1395  {
1396  pThis->m_dwState &= ~WINSTATE_DESTROYED;
1397  pThis->m_hWnd = NULL;
1398  pThis->OnFinalMessage(hWnd);
1399  }
1400  return lResult;
1401  }
#define ATLASSERT(x)
Definition: CComVariant.cpp:9
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
smooth NULL
Definition: ftsmooth.c:416
#define WM_NCDESTROY
Definition: winuser.h:1666
#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 1338 of file atlwin.h.

1339  {
1340  return DialogProc;
1341  }
static INT_PTR CALLBACK DialogProc(HWND hWnd, UINT uMsg, WPARAM wParam, LPARAM lParam)
Definition: atlwin.h:1361

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

◆ OnFinalMessage()

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

Definition at line 1403 of file atlwin.h.

1404  {
1405  }

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

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

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