|
FORUM MESSAGE
|
|
You are reading a General forum message.
Selecting Printer From code
Author: Ray
Date Posted: 2004-04-14 17:59:41
Hello all...
I am trying to print to a specific printer using CBuilder6 and a CLX application runing on a windows machine, where the printer is not the default printer (and is a plain text printer).
I can not have a "Printer Setup" dialogue displayed for the user to choose the printer each time a print job is started... it has to print automatically to a specific printer (selected in code), once the print job has started without user intervention.
I am using the "19518 updated version of qtintf.dll already.
The following code segment works but with a dialogue and user intervention...
(Note: There is no special includes or uses statements at the top of *.cpp file for this).
void __fastcall TForm1::TestPrintBtnClick(TObject *Sender)
{
TPrinter *ptr = Printer();
ptr->ExecuteSetup();
ptr->BeginDoc();
ptr->Canvas->TextOut(1,50,"Hello World\n");
ptr->EndDoc();
}
Can anyone help me please.
Many Thanks...
Ray
Wellington NZ.
REPLY TO THIS MESSAGE?
Top
You can post a reply to this General message using the form below:
|
|