다음을 통해 공유


CWinApp::ProcessShellCommand

이 멤버 함수를 호출 하 InitInstance 에서 전달 된 매개 변수를 사용 하는 CCommandLineInfo 개체 식별 rCmdInfo, 표시 된 작업을 수행 합니다.

BOOL ProcessShellCommand(
   CCommandLineInfo& rCmdInfo 
);

매개 변수

반환 값

셸 명령을 성공적으로 처리 되는 경우 0이 아닌.0 인 경우, 반환 거짓 에서 InitInstance.

설명

응용 프로그램 마법사 응용 프로그램 마법사를 사용 하 여 새 MFC 프로젝트를 시작 하면 로컬 인스턴스를 만듭니다 CCommandLineInfo, 다음 호출 ProcessShellCommandParseCommandLineInitInstance 멤버 함수입니다.명령 줄 아래에 설명 된 경로 다음과 같습니다.

  1. 후에 만들어지는 InitInstance, CCommandLineInfo 개체에 전달 됩니다 ParseCommandLine.

  2. ParseCommandLine그런 다음 호출 CCommandLineInfo::ParseParam 반복적으로, 각 매개 변수에 대해 한 번.

  3. ParseParam채우기는 CCommandLineInfo 에 전달 되는 개체를 ProcessShellCommand.

  4. ProcessShellCommand명령줄 인수 및 플래그 처리합니다.

데이터 멤버는 CCommandLineInfo 개체를 식별 CCommandLineInfo::m_nShellCommand, 다음 열거 형식 내에서 정의 되는 CCommandLineInfo 클래스.

enum {

FileNew,

FileOpen,

FilePrint,

FilePrintTo,

FileDDE,

};

이러한 각 값의 간략 한 설명을 참조 하십시오. CCommandLineInfo::m_nShellCommand.

요구 사항

헤더: afxwin.h

참고 항목

참조

CWinApp 클래스

계층 구조 차트

CWinApp::ParseCommandLine

CCommandLineInfo 클래스

CCommandLineInfo::ParseParam

CCommandLineInfo::m_nShellCommand