Bonjour,
(je programme en mfc avec visual c++)
Je voudrai savoir comment évité la boite de dialogue d'impression lorsque je clic sur l'icone d'impression dans la barre des tache, et imprimé directement sur l'imprimante par defaut du pc, les différent objet tracé dans mon programme.
Mon code est celui créé automatiquement par les mfc dans le view:
et j'ai essayé cela aussi (sans resultat)mais a vrai dire je me suis un peu perdu sur la msdn et j'ai rien compris au processus d'impression :
Code : Sélectionner tout - Visualiser dans une fenêtre à part
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15 BOOL CImp1View::OnPreparePrinting(CPrintInfo* pInfo) { // default preparation return DoPreparePrinting(pInfo); }*/ void CImp1View::OnBeginPrinting(CDC* /*pDC*/, CPrintInfo* /*pInfo*/) { // TODO: add extra initialization before printing } void CImp1View::OnEndPrinting(CDC* /*pDC*/, CPrintInfo* /*pInfo*/) { // TODO: add cleanup after printing }
merci d'avance...nikus
Code : Sélectionner tout - Visualiser dans une fenêtre à part
1
2
3
4
5
6
7 CPrintDialog /*void CImp1View::OnPrint( CDC *pDC, CPrintInfo *pInfo ) { // Print headers and/or footers, if desired. // Find portion of document corresponding to pInfo->m_nCurPage. OnDraw( pDC ); }
[utilise plutot la balise [ code ] / nico-pyright(c)]
Partager