ReactOS  0.4.15-dev-5109-g2469ce2
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 1390 of file atlwin.h.

Constructor & Destructor Documentation

◆ ~CDialogImplBaseT()

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

Definition at line 1397 of file atlwin.h.

1398  {
1399  }

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

1425  {
1426  CDialogImplBaseT<TBase>* pThis = reinterpret_cast<CDialogImplBaseT<TBase>*>(hWnd);
1427  _ATL_MSG msg(pThis->m_hWnd, uMsg, wParam, lParam);
1428  LRESULT lResult = 0;
1429  const _ATL_MSG *previousMessage;
1430  BOOL handled;
1431 
1432  hWnd = pThis->m_hWnd;
1433  previousMessage = pThis->m_pCurrentMsg;
1434  pThis->m_pCurrentMsg = &msg;
1435 
1436  handled = pThis->ProcessWindowMessage(hWnd, uMsg, wParam, lParam, lResult, 0);
1437  ATLASSERT(pThis->m_pCurrentMsg == &msg);
1438 
1439  if (handled)
1440  {
1441  if ((pThis->m_dwState & WINSTATE_DESTROYED) == 0)
1442  {
1443  ::SetWindowLongPtr(pThis->m_hWnd, DWLP_MSGRESULT, lResult);
1444  }
1445  }
1446  else
1447  {
1448  if (uMsg == WM_NCDESTROY)
1449  {
1450  pThis->m_dwState |= WINSTATE_DESTROYED;
1451  }
1452  }
1453 
1454  ATLASSERT(pThis->m_pCurrentMsg == &msg);
1455  pThis->m_pCurrentMsg = previousMessage;
1456 
1457  if (previousMessage == NULL && (pThis->m_dwState & WINSTATE_DESTROYED) != 0)
1458  {
1459  pThis->m_dwState &= ~WINSTATE_DESTROYED;
1460  pThis->m_hWnd = NULL;
1461  pThis->OnFinalMessage(hWnd);
1462  }
1463  return lResult;
1464  }
#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:1674
#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 1400 of file atlwin.h.

1401  {
1402  return DialogProc;
1403  }
static INT_PTR CALLBACK DialogProc(HWND hWnd, UINT uMsg, WPARAM wParam, LPARAM lParam)
Definition: atlwin.h:1424

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

◆ OnFinalMessage()

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

Definition at line 1466 of file atlwin.h.

1467  {
1468  }

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

1406  {
1407  CDialogImplBaseT<TBase>* pThis;
1408  DLGPROC newDlgProc;
1409  DLGPROC GCCU(pOldProc);
1410 
1411  pThis = reinterpret_cast<CDialogImplBaseT<TBase>*>(_AtlWinModule.ExtractCreateWndData());
1412  ATLASSERT(pThis != NULL);
1413  if (pThis == NULL)
1414  return 0;
1415 
1416  pThis->m_thunk.Init((WNDPROC)pThis->GetDialogProc(), pThis);
1417  newDlgProc = reinterpret_cast<DLGPROC>(pThis->m_thunk.GetWNDPROC());
1418  pOldProc = reinterpret_cast<DLGPROC>(::SetWindowLongPtr(hWnd, DWLP_DLGPROC, reinterpret_cast<LONG_PTR>(newDlgProc)));
1419  Unused(pOldProc); // TODO: should generate trace message if overwriting another subclass
1420  pThis->m_hWnd = hWnd;
1421  return newDlgProc(hWnd, uMsg, wParam, lParam);
1422  }
#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:2886
LRESULT(CALLBACK * WNDPROC)(HWND, UINT, WPARAM, LPARAM)
Definition: winuser.h:2896
#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: