다음을 통해 공유


CMessageMap Class

이 클래스는 다른 개체에 액세스 하는 개체의 메시지 맵 있습니다.

중요

런타임에서 Windows를 실행 하는 응용 프로그램에서이 클래스와 해당 멤버를 사용할 수 없습니다.

class ATL_NO_VTABLE CMessageMap

Members

Public 메서드

이름

설명

CMessageMap::ProcessWindowMessage

메시지 맵에 액세스 하는 CMessageMap-클래스를 파생 합니다.

설명

CMessageMap다른 개체에 의해 액세스할 수 매핑합니다 개체의 메시지를 허용 하는 추상 기본 클래스입니다. 해당 메시지 맵을 노출 하는 개체에 대 한 순서에서 해당 클래스를 파생 해야 CMessageMap.

ATL을 사용 하 여 CMessageMap windows에 포함 된 지원 및 동적 메시지 맵 체인. 예를 들어, 모든 클래스를 포함 하는 CContainedWindow 개체에서 파생 해야 CMessageMap. 다음 코드에서 수행 되는 SUBEDIT 샘플. - CComControl, CAtlEdit 에서 자동으로 파생 클래스 CMessageMap.

class ATL_NO_VTABLE CAtlEdit :
   OtherInheritedClasses
   public CComControl<CAtlEdit>
   // CComControl derives from CWindowImpl, which derives from CMessageMap
{
public:
   // Declare a contained window data member
   CContainedWindow m_ctlEdit;

   // Initialize the contained window:
   // 1. Pass "Edit" to specify that the contained 
   //    window should be based on the standard 
   //    Windows Edit box
   // 2. Pass 'this' pointer to specify that CAtlEdit 
   //    contains the message map to be used for the 
   //    contained window's message processing
   // 3. Pass the identifier of the message map. '1'
   //    identifies the alternate message map declared
   //    with ALT_MSG_MAP(1)
   CAtlEdit()
      : m_ctlEdit(_T("Edit"), this, 1)
   {
      m_bWindowOnly = TRUE;
   }

// Declare the default message map, identified by '0'
BEGIN_MSG_MAP(CAtlEdit)
   MESSAGE_HANDLER(WM_CREATE, OnCreate)
   MESSAGE_HANDLER(WM_SETFOCUS, OnSetFocus)
   CHAIN_MSG_MAP(CComControl<CAtlEdit>)
// Declare an alternate message map, identified by '1'
ALT_MSG_MAP(1)
   MESSAGE_HANDLER(WM_CHAR, OnChar)
END_MSG_MAP()

때문에 포함 된 창에서 m_EditCtrl를 포함 하는 클래스에 메시지 맵을 사용 CAtlEdit 파생 CMessageMap.

메시지 맵에 대 한 자세한 내용은 참조 하십시오. 메시지 맵 의 문서 "ATL 창 클래스"

요구 사항

헤더: atlwin.h

참고 항목

참조

CDynamicChain Class

BEGIN_MSG_MAP

ALT_MSG_MAP

기타 리소스

ATL Class Overview