|
-
June 17th, 2002, 09:21 AM
#1
Printer DC from address
Hi
I have an application that does some printing. I used to use CPrinterDlg to get a printer's device context.
Code:
CPrintDialog printDlg(FALSE);
if (printDlg.DoModal() == IDCANCEL)
return;
CDC *pDC = CDC::FromHandle(printDlg.GetPrinterDC());
// ...
// print, etc, etc...
The new version of my app, however, stores the printer's address (UNC) in an ini file, so i need to know how do i obtain a printer DC from it's UNC.
Can anyone help me on this ?
Thanks in advance
Pedro
-
June 19th, 2002, 08:41 AM
#2
-
June 19th, 2002, 09:32 AM
#3
Originally posted by igbrus
Use CreateDC
This is what MSDN says about CreateDC():
Code:
HDC CreateDC(
LPCTSTR lpszDriver,
LPCTSTR lpszDevice,
LPCTSTR lpszOutput,
CONST DEVMODE *lpInitData);
How can i find out what's the driver's file name ?
Thanks for the help
Pedro
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|