次の方法で共有


CWinApp::OnFilePrintSetup

ID_FILE_PRINT_SETUP のコマンドを実行します。

afx_msg void OnFilePrintSetup( );

解説

自分の CWinApp クラスのメッセージ マップにこのメンバー関数を有効にするに ON_COMMAND( ID_FILE_PRINT_SETUP, OnFilePrintSetup ) のステートメントを追加する必要があります。 有効な場合、この関数は、ファイルの印刷コマンドの実行を処理します。

既定の動作の詳細とこのメンバー関数をオーバーライドする方法のガイダンスに テクニカル ノート 22を参照してください。

使用例

// The following message map, produced by the Application Wizard, binds  
// the File New, Open, and Print Setup menu commands to default 
// framework implementations of these commands.
BEGIN_MESSAGE_MAP(CStdApp, CWinApp)
   // Standard file based document commands
   ON_COMMAND(ID_FILE_NEW, &CWinApp::OnFileNew)
   ON_COMMAND(ID_FILE_OPEN, &CWinApp::OnFileOpen)
   // Standard print setup command
   ON_COMMAND(ID_FILE_PRINT_SETUP, &CWinApp::OnFilePrintSetup)
END_MESSAGE_MAP()
// The following message map illustrates how to rebind the 
// File New, Open and Print Setup menu commands to handlers that 
// you implement in your CWinApp-derived class.   
// Note, you can name the handler CCustomApp::OnFileNew instead of 
// CCustomApp::OnMyFileNew, and likewise for the other handlers, if desired.
BEGIN_MESSAGE_MAP(CCustomApp, CWinApp)
   ON_COMMAND(ID_FILE_NEW, &CCustomApp::OnMyFileNew)
   ON_COMMAND(ID_FILE_OPEN, &CCustomApp::OnMyFileOpen)
   ON_COMMAND(ID_FILE_PRINT_SETUP, &CCustomApp::OnMyFilePrintSetup)
END_MESSAGE_MAP()

必要条件

ヘッダー: afxwin.h

参照

関連項目

CWinApp クラス

階層図

CWinApp::OnFileNew