Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Mike Lewis on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Printer Problems (No MFC)

Status
Not open for further replies.

lGOOODl

Programmer
Dec 4, 2001
31
DK
Hi,

I'm sorry to fill this forum whit my question's. But i have I problem that i can't find a solution to. I have made a printer dialog. and now the problem i how do i print text,bitmap or etc to the print. I've used the following code:

void PrintPage(void)
{
PRINTDLG pd;

// Initialize PRINTDLG
ZeroMemory(&pd, sizeof(PRINTDLG));
pd.lStructSize = sizeof(PRINTDLG);
pd.hwndOwner = hwnd;
pd.hDevMode = NULL; // Don't forget to free or store hDevMode.
pd.hDevNames = NULL; // Don't forget to free or store hDevNames.
pd.Flags = PD_USEDEVMODECOPIESANDCOLLATE | PD_RETURNDC;
pd.nCopies = 1;
pd.nFromPage = 0xFFFF;
pd.nToPage = 0xFFFF;
pd.nMinPage = 1;
pd.nMaxPage = 0xFFFF;

if (PrintDlg(&pd)==TRUE) {

// GDI calls to render output.


// Delete DC when done.
DeleteDC(pd.hDC);
}
}

It would help me alot if you could help me out.
Please Help Me
..:::GOOOD:::..
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top