CCmdTarget 클래스

Microsoft Foundation 클래스 라이브러리 메시지 맵 아키텍처의 기본 클래스입니다.

구문

class CCmdTarget : public CObject

멤버

공용 생성자

속성 설명
CCmdTarget::CCmdTarget CCmdTarget 개체를 생성합니다.

공용 메서드

이름 설명
CCmdTarget::BeginWaitCursor 커서를 모래 시계 커서로 표시합니다.
CCmdTarget::DoOleVerb OLE 동사에서 지정한 작업을 수행합니다.
CCmdTarget::EnableAutomation 개체에 대한 OLE 자동화를 CCmdTarget 허용합니다.
CCmdTarget::EnableConnections 연결점을 통해 이벤트가 발생하도록 설정합니다.
CCmdTarget::EnableTypeLib 개체의 형식 라이브러리를 사용하도록 설정합니다.
CCmdTarget::EndWaitCursor 이전 커서로 돌아갑니다.
CCmdTarget::EnumOleVerbs 개체의 OLE 동사를 열거합니다.
CCmdTarget::FromIDispatch 포인터와 연결된 개체에 CCmdTarget 대한 포인터를 반환합니다 IDispatch .
CCmdTarget::GetDispatchIID 기본 디스패치 인터페이스 ID를 가져옵니다.
CCmdTarget::GetIDispatch 개체와 연결된 개체에 IDispatch 대한 포인터를 CCmdTarget 반환합니다.
CCmdTarget::GetTypeInfoCount 개체가 제공하는 형식 정보 인터페이스의 수를 검색합니다.
CCmdTarget::GetTypeInfoOfGuid 지정된 된 GUID에 해당 하는 형식 설명을 검색 합니다.
CCmdTarget::GetTypeLib 형식 라이브러리에 대한 포인터를 가져옵니다.
CCmdTarget::GetTypeLibCache 형식 라이브러리 캐시를 가져옵니다.
CCmdTarget::IsInvokeAllowed 자동화 메서드 호출을 사용하도록 설정합니다.
CCmdTarget::IsResultExpected 자동화 함수가 값을 반환해야 하는 경우 0이 아닌 값을 반환합니다.
CCmdTarget::OnCmdMsg 명령 메시지를 라우팅하고 디스패치합니다.
CCmdTarget::OnFinalRelease 마지막 OLE 참조가 릴리스된 후 정리합니다.
CCmdTarget::RestoreWaitCursor 모래 시계 커서를 복원합니다.

설명

메시지 맵은 명령 또는 메시지를 처리하기 위해 작성하는 멤버 함수로 라우팅합니다. (명령은 메뉴 항목, 명령 단추 또는 액셀러레이터 키의 메시지입니다.)

다음에서 CCmdTarget 파생된 주요 프레임워크 클래스는 포함CView, CWinApp, CDocumentCWndCFrameWnd. 새 클래스가 메시지를 처리하려는 경우 이러한 CCmdTarget파생 클래스 중 하나에서 클래스를 파생합니다. 클래스 CCmdTarget 를 직접 파생하는 경우는 거의 없습니다.

명령 대상 및 OnCmdMsg 라우팅에 대한 개요는 명령 대상, 명령 라우팅매핑 메시지를 참조하세요.

CCmdTarget 에는 모래 시계 커서 표시를 처리하는 멤버 함수가 포함되어 있습니다. 명령이 실행되는 데 눈에 띄는 시간 간격이 소요되는 경우 모래 시계 커서를 표시합니다.

메시지 맵과 유사한 디스패치 맵은 OLE 자동화 IDispatch 기능을 노출하는 데 사용됩니다. 이 인터페이스를 노출하면 다른 애플리케이션(예: Visual Basic)이 애플리케이션을 호출할 수 있습니다.

상속 계층 구조

CObject

CCmdTarget

요구 사항

헤더afxwin.h:

CCmdTarget::BeginWaitCursor

명령을 실행할 때 눈에 띄는 시간 간격이 소요되는 경우 커서를 모래 시계로 표시하려면 이 함수를 호출합니다.

void BeginWaitCursor();

설명

프레임워크는 개체가 파일을 로드하거나 저장하는 경우 CDocument 와 같이 사용자에게 사용 중임을 표시하기 위해 이 함수를 호출합니다.

처리와 같은 OnSetCursor 다른 작업이 BeginWaitCursor 커서를 변경할 수 있으므로 단일 메시지 처리기 외부에서 항상 효과가 있는 것은 아닙니다.

이전 커서를 복원하기 위한 호출 EndWaitCursor 입니다.

예시

// The following example illustrates the most common case
// of displaying the hourglass cursor during some lengthy
// processing of a command handler implemented in some
// CCmdTarget-derived class, such as a document or view.
void CMyView::OnBeginSleepEnd()
{
   BeginWaitCursor(); // display the hourglass cursor
   // do some lengthy processing
   Sleep(3000);
   EndWaitCursor(); // remove the hourglass cursor
}

// The next example illustrates RestoreWaitCursor.
void CMyView::OnBeginDlgRestore()
{
   BeginWaitCursor(); // display the hourglass cursor
   // do some lengthy processing
   // The dialog box will normally change the cursor to
   // the standard arrow cursor, and leave the cursor in
   // as the standard arrow cursor when the dialog box is
   // closed.
   CFileDialog dlg(TRUE);
   dlg.DoModal();

   // It is necessary to call RestoreWaitCursor here in order
   // to change the cursor back to the hourglass cursor.
   RestoreWaitCursor();
   // do some more lengthy processing
   Sleep(3000);
   EndWaitCursor(); // remove the hourglass cursor
}

// In the above example, the dialog was clearly invoked between
// the pair of calls to BeginWaitCursor and EndWaitCursor.
// Sometimes it may not be clear whether the dialog is invoked
// in between a pair of calls to BeginWaitCursor and EndWaitCursor.
// It is permissible to call RestoreWaitCursor, even if
// BeginWaitCursor was not previously called.  This case is
// illustrated below, where CMyView::AnotherFunction does not
// need to know whether it was called in the context of an
// hourglass cursor.
void CMyView::OnDlgRestore()
{
   // some processing ...
   CFileDialog dlg(TRUE);
   dlg.DoModal();
   RestoreWaitCursor();

   // some more processing ...
}

// If the dialog is invoked from a member function of
// some non-CCmdTarget, then you can call CWinApp::DoWaitCursor
// with a 0 parameter value to restore the hourglass cursor.
void CMyObject::OnDlgDoWait()
{
   CFileDialog dlg(TRUE);
   dlg.DoModal();
   AfxGetApp()->DoWaitCursor(0); // same as CCmdTarget::RestoreWaitCursor
}

CCmdTarget::CCmdTarget

CCmdTarget 개체를 생성합니다.

CCmdTarget();

CCmdTarget::DoOleVerb

OLE 동사에서 지정한 작업을 수행합니다.

BOOL DoOleVerb(
    LONG iVerb,
    LPMSG lpMsg,
    HWND hWndParent,
    LPCRECT lpRect);

매개 변수

iVerb
동사의 숫자 식별자입니다.

lpMsg
MSG 동사를 호출한 이벤트(예: 두 번 클릭)를 설명하는 구조체에 대한 포인터입니다.

hWndParent
개체가 포함된 문서 창의 핸들입니다.

lpRect
개체의 RECT 경계 사각형을 정의하는 좌표(픽셀)를 포함하는 구조체에 hWndParent대한 포인터입니다.

Return Value

TRUE 성공하면 이고, 그렇지 않으면 FALSE.입니다.

설명

이 멤버 함수는 기본적으로 .의 IOleObject::DoVerb구현입니다. 가능한 작업은 .에 의해 CCmdTarget::EnumOleVerbs열거됩니다.

CCmdTarget::EnableAutomation

개체에 대해 OLE 자동화를 사용하도록 설정하려면 이 함수를 호출합니다.

void EnableAutomation();

설명

이 함수는 일반적으로 개체의 생성자에서 호출되며 디스패치 맵이 클래스에 대해 선언된 경우에만 호출되어야 합니다. 자동화에 대한 자세한 내용은 Automation 클라이언트 및 자동화 서버 문서를 참조하세요.

CCmdTarget::EnableConnections

연결점을 통해 이벤트가 발생하도록 설정합니다.

void EnableConnections();

설명

연결점을 사용하도록 설정하려면 파생 클래스의 생성자에서 이 멤버 함수를 호출합니다.

CCmdTarget::EnableTypeLib

개체의 형식 라이브러리를 사용하도록 설정합니다.

void EnableTypeLib();

설명

형식 정보를 제공하는 경우 파생 개체의 CCmdTarget생성자에서 이 멤버 함수를 호출합니다.

CCmdTarget::EndWaitCursor

모래 시계 커서에서 이전 커서로 반환하도록 멤버 함수를 호출한 후 이 함수를 호출 BeginWaitCursor 합니다.

void EndWaitCursor();

설명

또한 프레임워크는 모래 시계 커서를 호출한 후 이 멤버 함수를 호출합니다.

예시

// The following example illustrates the most common case
// of displaying the hourglass cursor during some lengthy
// processing of a command handler implemented in some
// CCmdTarget-derived class, such as a document or view.
void CMyView::OnBeginSleepEnd()
{
   BeginWaitCursor(); // display the hourglass cursor
   // do some lengthy processing
   Sleep(3000);
   EndWaitCursor(); // remove the hourglass cursor
}

// The next example illustrates RestoreWaitCursor.
void CMyView::OnBeginDlgRestore()
{
   BeginWaitCursor(); // display the hourglass cursor
   // do some lengthy processing
   // The dialog box will normally change the cursor to
   // the standard arrow cursor, and leave the cursor in
   // as the standard arrow cursor when the dialog box is
   // closed.
   CFileDialog dlg(TRUE);
   dlg.DoModal();

   // It is necessary to call RestoreWaitCursor here in order
   // to change the cursor back to the hourglass cursor.
   RestoreWaitCursor();
   // do some more lengthy processing
   Sleep(3000);
   EndWaitCursor(); // remove the hourglass cursor
}

// In the above example, the dialog was clearly invoked between
// the pair of calls to BeginWaitCursor and EndWaitCursor.
// Sometimes it may not be clear whether the dialog is invoked
// in between a pair of calls to BeginWaitCursor and EndWaitCursor.
// It is permissible to call RestoreWaitCursor, even if
// BeginWaitCursor was not previously called.  This case is
// illustrated below, where CMyView::AnotherFunction does not
// need to know whether it was called in the context of an
// hourglass cursor.
void CMyView::OnDlgRestore()
{
   // some processing ...
   CFileDialog dlg(TRUE);
   dlg.DoModal();
   RestoreWaitCursor();

   // some more processing ...
}

// If the dialog is invoked from a member function of
// some non-CCmdTarget, then you can call CWinApp::DoWaitCursor
// with a 0 parameter value to restore the hourglass cursor.
void CMyObject::OnDlgDoWait()
{
   CFileDialog dlg(TRUE);
   dlg.DoModal();
   AfxGetApp()->DoWaitCursor(0); // same as CCmdTarget::RestoreWaitCursor
}

CCmdTarget::EnumOleVerbs

개체의 OLE 동사를 열거합니다.

BOOL EnumOleVerbs(LPENUMOLEVERB* ppenumOleVerb);

매개 변수

ppenumOleVerb
인터페이스에 대한 포인터에 대한 포인터입니다 IEnumOLEVERB .

Return Value

TRUE 개체가 하나 이상의 OLE 동사를 지원하는 경우(이 경우 *ppenumOleVerb 열거자 인터페이스를 IEnumOLEVERB 가리키는 경우) 그렇지 않습니다 FALSE.

설명

이 멤버 함수는 기본적으로 .의 IOleObject::EnumVerbs구현입니다.

CCmdTarget::FromIDispatch

이 함수를 호출하여 클래스의 자동화 멤버 함수에서 받은 포인터를 개체의 IDispatch 인터페이스를 구현하는 개체에 CCmdTarget 매핑 IDispatch 합니다.

static CCmdTarget* PASCAL FromIDispatch(LPDISPATCH lpDispatch);

매개 변수

lpDispatch
IDispatch 개체에 대한 포인터입니다.

Return Value

와 연결된 개체에 대한 CCmdTarget 포인터입니다 lpDispatch. 이 함수는 개체가 IDispatch Microsoft Foundation Class IDispatch 개체로 인식되지 않는 경우 반환 NULL 합니다.

설명

이 함수의 결과는 멤버 함수에 대한 호출의 역방향입니다 GetIDispatch.

CCmdTarget::GetDispatchIID

기본 디스패치 인터페이스 ID를 가져옵니다.

virtual BOOL GetDispatchIID(IID* pIID);

매개 변수

pIID
인터페이스 ID(GUID)에 대한 포인터입니다.

Return Value

TRUE 성공하면 이고, 그렇지 않으면 FALSE.입니다. 성공 *pIID 하면 기본 디스패치 인터페이스 ID로 설정됩니다.

설명

파생 클래스는 이 멤버 함수를 재정의해야 합니다(재정 GetDispatchIID 의되지 않은 경우 반환 FALSE). COleControl을(를) 참조하세요.

CCmdTarget::GetIDispatch

이 멤버 함수를 호출하여 포인터를 반환 IDispatch 하거나 참조로 포인터를 사용하는 자동화 메서드에서 포인터를 IDispatch 검색 IDispatch 합니다.

LPDISPATCH GetIDispatch(BOOL bAddRef);

매개 변수

bAddRef
개체에 대한 참조 수를 증분할지 여부를 지정합니다.

Return Value

IDispatch 개체와 연결된 포인터입니다.

설명

생성자에서 호출 EnableAutomation 하여 자동화를 사용하도록 설정하는 개체의 IDispatch 경우 이 함수는 인터페이스를 통해 통신하는 클라이언트에서 사용하는 Foundation 클래스 구현에 대한 포인터를 IDispatch 반환합니다. 이 함수를 호출하면 포인터에 대한 참조가 자동으로 추가되므로 호출 IUnknown::AddRef할 필요가 없습니다.

CCmdTarget::GetTypeInfoCount

개체가 제공하는 형식 정보 인터페이스의 수를 검색합니다.

virtual UINT GetTypeInfoCount();

Return Value

형식 정보 인터페이스의 수입니다.

설명

이 멤버 함수는 기본적으로 .를 구현합니다.IDispatch::GetTypeInfoCount

파생 클래스는 제공된 형식 정보 인터페이스의 수(0 또는 1)를 반환하도록 이 함수를 재정의해야 합니다. 재정의되지 않으면 0을 GetTypeInfoCount 반환합니다. 재정의하려면 매크로를 IMPLEMENT_OLETYPELIB 사용하며, 매크로도 구현하고 GetTypeLibGetTypeLibCache.

CCmdTarget::GetTypeInfoOfGuid

지정된 된 GUID에 해당 하는 형식 설명을 검색 합니다.

HRESULT GetTypeInfoOfGuid(
    LCID lcid,
    const GUID& guid,
    LPTYPEINFO* ppTypeInfo);

매개 변수

lcid
로캘 식별자( LCID)입니다.

guid
형식 설명의 GUID입니다.

ppTypeInfo
인터페이스에 대한 포인터에 대한 포인터입니다 ITypeInfo .

Return Value

HRESULT 호출의 성공 또는 실패를 나타내는 것입니다. 성공 *ppTypeInfo 하면 형식 정보 인터페이스를 가리킵니다.

CCmdTarget::GetTypeLib

형식 라이브러리에 대한 포인터를 가져옵니다.

virtual HRESULT GetTypeLib(
    LCID lcid,
    LPTYPELIB* ppTypeLib);

매개 변수

lcid
LCID(로캘 식별자)입니다.

ppTypeLib
인터페이스에 대한 포인터에 대한 포인터입니다 ITypeLib .

Return Value

HRESULT 호출의 성공 또는 실패를 나타내는 것입니다. 성공 *ppTypeLib 하면 형식 라이브러리 인터페이스를 가리킵니다.

설명

파생 클래스는 이 멤버 함수를 재정의해야 합니다(재정 GetTypeLib 의되지 않은 경우 반환 TYPE_E_CANTLOADLIBRARY). IMPLEMENT_OLETYPELIB 또한 구현하는 매크로를 GetTypeLibCache사용합니다.GetTypeInfoCount

CCmdTarget::GetTypeLibCache

형식 라이브러리 캐시를 가져옵니다.

virtual CTypeLibCache* GetTypeLibCache();

Return Value

CTypeLibCache 개체에 대한 포인터입니다.

설명

파생 클래스는 이 멤버 함수를 재정의해야 합니다(재정 GetTypeLibCache 의되지 않은 경우 반환 NULL). IMPLEMENT_OLETYPELIB 또한 구현하는 매크로를 GetTypeLib사용합니다.GetTypeInfoCount

CCmdTarget::IsInvokeAllowed

이 함수는 지정된 자동화 메서드(식별됨)를 호출할 수 있는지 확인하기 위해 MFC의 IDispatch::Invoke 구현에 의해 dispid호출됩니다.

virtual BOOL IsInvokeAllowed(DISPID dispid);

매개 변수

dispid
디스패치 ID입니다.

Return Value

TRUE 메서드를 호출할 수 있으면 이고, 그렇지 않으면 FALSE.입니다.

설명

반환TRUE되면 메서드를 호출합니다. 그렇지 않으면 Invoke 실패하고 반환합니다E_UNEXPECTED.IsInvokeAllowedInvoke

파생 클래스는 적절한 값을 반환하도록 이 함수를 재정의할 수 있습니다(재정 IsInvokeAllowed 의되지 않은 경우 반환 TRUE). 특히 COleControl::IsInvokeAllowed참조하세요.

CCmdTarget::IsResultExpected

클라이언트가 자동화 함수에 대한 호출에서 반환 값을 기대하는지 여부를 확인하는 데 사용합니다 IsResultExpected .

BOOL IsResultExpected();

Return Value

자동화 함수가 값을 반환해야 하는 경우 0이 아닌 경우 그렇지 않으면 0입니다.

설명

OLE 인터페이스는 클라이언트가 함수 호출의 결과를 사용하거나 무시하는지 여부에 대한 정보를 MFC에 제공하고, MFC는 이 정보를 사용하여 호출 IsResultExpected결과를 확인합니다. 반환 값의 프로덕션이 시간 또는 리소스를 많이 사용하는 경우 반환 값을 계산하기 전에 이 함수를 호출하여 효율성을 높일 수 있습니다.

이 함수는 클라이언트가 호출한 자동화 함수에서 호출하는 경우 다른 자동화 함수에서 유효한 반환 값을 얻을 수 있도록 한 번만 0을 반환합니다.

IsResultExpected 자동화 함수 호출이 진행되지 않을 때 호출되는 경우 0이 아닌 값을 반환합니다.

CCmdTarget::OnCmdMsg

명령 메시지를 라우팅 및 디스패치하고 명령 사용자 인터페이스 개체의 업데이트를 처리하기 위해 프레임워크에서 호출됩니다.

virtual BOOL OnCmdMsg(
    UINT nID,
    int nCode,
    void* pExtra,
    AFX_CMDHANDLERINFO* pHandlerInfo);

매개 변수

nID
명령 ID를 포함합니다.

nCode
명령 알림 코드를 식별합니다. 에 대한 값에 대한 자세한 내용은 비고를 참조하세요nCode.

pExtra
의 값 nCode에 따라 사용됩니다. 에 대한 자세한 내용은 pExtra비고를 참조하세요.

pHandlerInfo
그렇지 않은 NULLOnCmdMsg 경우 명령을 디스패치하는 대신 구조체의 pHandlerInfo 멤버와 pmf 멤버를 채웁니다pTarget. 일반적으로 이 매개 변수는 .이어야 NULL합니다.

Return Value

메시지가 처리되는 경우 0이 아닌 경우 그렇지 않으면 0입니다.

설명

프레임워크 명령 아키텍처의 기본 구현 루틴입니다.

런타임에 OnCmdMsg 명령을 다른 개체에 디스패치하거나 실제 메시지 맵 조회를 수행하는 루트 클래스 CCmdTarget::OnCmdMsg를 호출하여 명령 자체를 처리합니다. 기본 명령 라우팅에 대한 전체 설명은 메시지 처리 및 매핑 항목을 참조 하세요.

드물게 프레임워크의 표준 명령 라우팅을 확장하기 위해 이 멤버 함수를 재정의할 수 있습니다. 명령 라우팅 아키텍처의 고급 세부 정보는 Technical Note 21 을 참조하세요.

재정OnCmdMsg의하는 경우 , 명령 알림 코드 및 pExtra값에 따라 달라지는 적절한 값을 nCodenCode제공해야 합니다. 다음 표에서는 해당 값을 나열합니다.

nCode pExtra
CN_COMMAND CCmdUI*
CN_EVENT AFX_EVENT*
CN_UPDATE_COMMAND_UI CCmdUI*
CN_OLECOMMAND COleCmdUI*
CN_OLE_UNREGISTER NULL

예시

// This example illustrates extending the framework's standard command
// route from the view to objects managed by the view.  This example
// is from an object-oriented drawing application, similar to the
// DRAWCLI sample application, which draws and edits "shapes".
BOOL CMyView::OnCmdMsg(UINT nID,
                       int nCode,
                       void *pExtra,
                       AFX_CMDHANDLERINFO *pHandlerInfo)
{
   // Extend the framework's command route from the view to
   // the application-specific CMyShape that is currently selected
   // in the view. m_pActiveShape is NULL if no shape object
   // is currently selected in the view.
   if ((m_pActiveShape != NULL) &&
       m_pActiveShape->OnCmdMsg(nID, nCode, pExtra, pHandlerInfo))
      return TRUE;

   // If the object(s) in the extended command route don't handle
   // the command, then let the base class OnCmdMsg handle it.
   return CView::OnCmdMsg(nID, nCode, pExtra, pHandlerInfo);
}

 

// The command handler for ID_SHAPE_COLOR (menu command to change
// the color of the currently selected shape) was added to the message
// map of CMyShape (note, not CMyView) using the Properties window.
// The menu item will be automatically enabled or disabled, depending
// on whether a CMyShape is currently selected in the view, that is,
// depending on whether CMyView::m_pActiveView is NULL.  It is not
// necessary to implement an ON_UPDATE_COMMAND_UI handler to enable
// or disable the menu item.
BEGIN_MESSAGE_MAP(CMyShape, CCmdTarget)
ON_COMMAND(ID_SHAPE_COLOR, &CMyShape::OnShapeColor)
END_MESSAGE_MAP()

CCmdTarget::OnFinalRelease

개체에 대한 마지막 OLE 참조가 해제될 때 프레임워크에서 호출됩니다.

virtual void OnFinalRelease();

설명

이 상황에 대한 특수 처리를 제공하도록 이 함수를 재정의합니다. 기본 구현은 개체를 삭제합니다.

CCmdTarget::RestoreWaitCursor

시스템 커서가 변경된 후 적절한 모래 시계 커서를 복원하려면 이 함수를 호출합니다(예: 긴 작업 도중에 메시지 상자를 열고 닫은 후).

void RestoreWaitCursor();

예시

// The following example illustrates the most common case
// of displaying the hourglass cursor during some lengthy
// processing of a command handler implemented in some
// CCmdTarget-derived class, such as a document or view.
void CMyView::OnBeginSleepEnd()
{
   BeginWaitCursor(); // display the hourglass cursor
   // do some lengthy processing
   Sleep(3000);
   EndWaitCursor(); // remove the hourglass cursor
}

// The next example illustrates RestoreWaitCursor.
void CMyView::OnBeginDlgRestore()
{
   BeginWaitCursor(); // display the hourglass cursor
   // do some lengthy processing
   // The dialog box will normally change the cursor to
   // the standard arrow cursor, and leave the cursor in
   // as the standard arrow cursor when the dialog box is
   // closed.
   CFileDialog dlg(TRUE);
   dlg.DoModal();

   // It is necessary to call RestoreWaitCursor here in order
   // to change the cursor back to the hourglass cursor.
   RestoreWaitCursor();
   // do some more lengthy processing
   Sleep(3000);
   EndWaitCursor(); // remove the hourglass cursor
}

// In the above example, the dialog was clearly invoked between
// the pair of calls to BeginWaitCursor and EndWaitCursor.
// Sometimes it may not be clear whether the dialog is invoked
// in between a pair of calls to BeginWaitCursor and EndWaitCursor.
// It is permissible to call RestoreWaitCursor, even if
// BeginWaitCursor was not previously called.  This case is
// illustrated below, where CMyView::AnotherFunction does not
// need to know whether it was called in the context of an
// hourglass cursor.
void CMyView::OnDlgRestore()
{
   // some processing ...
   CFileDialog dlg(TRUE);
   dlg.DoModal();
   RestoreWaitCursor();

   // some more processing ...
}

// If the dialog is invoked from a member function of
// some non-CCmdTarget, then you can call CWinApp::DoWaitCursor
// with a 0 parameter value to restore the hourglass cursor.
void CMyObject::OnDlgDoWait()
{
   CFileDialog dlg(TRUE);
   dlg.DoModal();
   AfxGetApp()->DoWaitCursor(0); // same as CCmdTarget::RestoreWaitCursor
}

참고 항목

MFC 샘플 ACDUAL
CObject 클래스
계층 구조 차트
CCmdUI 클래스
CDocument 클래스
CDocTemplate 클래스
CWinApp 클래스
CWnd 클래스
CView 클래스
CFrameWnd 클래스
COleDispatchDriver 클래스