Solved

BCB 4 TPrinter tutorial?

Posted on 2000-04-06
7
720 Views
Last Modified: 2008-03-17
Just looking for a tutorial on printing on BCB 4.  I will be printing a drawing using the standard TCanvas drawing functions, so a tutorial on formatting text won't be as useful.  I'm basically just looking for a simple tutorial which shows how to pop up the printer setup dialog box, the print dialog box and writing to the canvas, and finally sending the info to the printer selected.

Thanks!
-Josh
0
Comment
Question by:jbirk
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 4
  • 2
7 Comments
 
LVL 14

Accepted Solution

by:
AlexVirochovsky earned 50 total points
ID: 2690334
see http://matthewwu.163.net/c/bc/c17.html
for printing (and links).
About BCB 4 see , too,
  "Teach Yourself CPPB in 21 Days"
  http://www.turbopower.com/bcb
I hope, it helps. Alex
0
 
LVL 8

Author Comment

by:jbirk
ID: 2690634
The first site looks good.  I'll read it.  The second one was a broken link...  Did the url change?

Thanks
-Josh

P.S. I'll grade after I read the first page and determine whther or not it will help my specific situation.
0
 
LVL 8

Author Comment

by:jbirk
ID: 2690837
OK, I have a question. After the user selects their printer with print dialog box, how does the command:
TPrinter *APrinter = new Printer();
know which printer device to use?  Also will the canvas size differ with different printers?  Do I need to test for that?  I'll be scaling my drawing so that it fits on 1 page or perhaps 4 pages split in quadrants...

Also, just wondering, but will this work for plotters?

Thanks!
-Josh
0
Industry Leaders: We Want Your Opinion!

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

 
LVL 14

Expert Comment

by:AlexVirochovsky
ID: 2691044
1. Next is example of using:
 if (PrintDialog1->Execute())
   {
    Printer()->BeginDoc();
    Printer()->Canvas->CopyRect(Image->ClientRect, Image->Canvas, Image->ClientRect);
    Printer()->EndDoc();
   }
Canvas of Printer = List of Plotter
if you know(in most case), that
size of Image != size of Plotter,
simple use StrechDraw.
2. Sorry for 2-nd URL. It was valid before 5 month.
  But you can find many tutorials (and BCB of cource ) in http://www.mcp.com
must only register(free).
3. Printer use default printer, if
this is no DialogPrinter. In this case
this control use selected printer.
Alex
0
 
LVL 8

Author Comment

by:jbirk
ID: 2719906
Still here, sorry for the delay:)  I'm just now getting to this part of the program.  I had asked the question in advance with anticipation of difficulties...

I'll let you know how it goes.

-Josh
0
 
LVL 8

Author Comment

by:jbirk
ID: 2721523
This turned out to be far more simple than I had anticipated.  I got it working flawlessly even with a four page quadrant layout.  I haven't been able to test an ink jet or plotter yet, but I'm keeping my fingers crossed:)

The PrintDialog chooses the printer so that whatever following print requests are sent use that chosen printer.  It's pretty cool.  Borland really made it all very easy (except for the documentation...  I didn't know where to start from).

Thanks for pointing me in the right direction.
-Josh
0
 
LVL 1

Expert Comment

by:Louskan
ID: 8426110
None of the links above are working and the question is not directly answered so I think it should be removed unless newer links are post.
0

Featured Post

Technology Partners: We Want Your Opinion!

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Suggested Solutions

Often, when implementing a feature, you won't know how certain events should be handled at the point where they occur and you'd rather defer to the user of your function or class. For example, a XML parser will extract a tag from the source code, wh…
Introduction This article is a continuation of the C/C++ Visual Studio Express debugger series. Part 1 provided a quick start guide in using the debugger. Part 2 focused on additional topics in breakpoints. As your assignments become a little more …
The viewer will learn how to pass data into a function in C++. This is one step further in using functions. Instead of only printing text onto the console, the function will be able to perform calculations with argumentents given by the user.
The viewer will learn how to user default arguments when defining functions. This method of defining functions will be contrasted with the non-default-argument of defining functions.

726 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question