Subj : Printer stuff To : All From : Neil Heller Date : Sat Mar 29 2003 09:50 am I needed a print dialog box in an application I was writing. The documentation said: "After calling DoModal(), GetDefaults() or GetPrinterDC() a printer DC will be returned in m_pd.hDC. This DC must be freed by the caller of CPrintDialog." Given the following code: pprtdlg = new CPrintDialog(false); if (pprtdlg->DoModal() == IDOK) pcdc->Attach(pprtdlg->GetPrinterDC()); delete(pprtdlg->m_pd.hDC); <-------- offending line delete pprtdlg; Does anyone have an idea of why the offending line causes a GPF? þ CMPQwk 1.42 999 --- Maximus/2 3.01 * Origin: COMM Port OS/2 juge.com 204.89.247.1 (281) 980-9671 (1:106/2000) .