Share via


CWinApp::OnFilePrintSetup

Implémente la commande d' ID_FILE_PRINT_SETUP .

afx_msg void OnFilePrintSetup( );

Notes

Vous devez ajouter une instruction d' ON_COMMAND( ID_FILE_PRINT_SETUP, OnFilePrintSetup ) à votre table des messages de classe d' CWinApp pour activer cette fonction membre.S'il est activé, cette fonction gère l'exécution de la commande print de fichier.

Pour plus d'informations sur le comportement par défaut et l'aide sur la manière de remplacer cette fonction membre, consultez note technique 22.

Exemple

// 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()

Configuration requise

Header: afxwin.h

Voir aussi

Référence

Classe de CWinApp

Graphique de la hiérarchie

CWinApp::OnFileNew