The MASM Forum Archive 2004 to 2012

General Forums => The Campus => Topic started by: DC on February 19, 2006, 02:49:36 AM

Title: trying to print
Post by: DC on February 19, 2006, 02:49:36 AM
is there a good tut for getting rich text to a printer DC or something along those lines?
thanx,
DC
Title: Re: trying to print
Post by: PBrennick on February 19, 2006, 02:34:12 PM
I don't know about a good tutorial but I have a good example of it working correctly.  Go to Ewayne Wagner's website, http://asmedit.massmind.org/ and look for WordEdit.  It is a mini wordprocessor.  It prints multiple fonts, colors, etc.  It has left, center and right justification.  When you make changes to a portion of text make sure you select "Apply to a Selection" instead of "Apply to All."

EDIT:  To keep your formatting, when you save the file make sure you use .rtf for the tail or all the formatting will be stripped.

hth,
Paul
Title: Re: trying to print
Post by: DC on February 20, 2006, 02:51:29 AM
thanx Paul,
I was able to gleen some usefull code from that.
printing sure is another animal, eh?
take care,
DC
Title: Re: trying to print
Post by: farrier on February 20, 2006, 08:00:15 AM
DC,

The attached file uses the function PrintRTF:
RTF filename,
Landscape/Portrait,
Print/View,
number of copies

The code was possible due to the help of Chibb777's RTF printing and displaying code.

In this code, Print/View doesn't work.

From the main window, a child window is created to display the file, PageBreaks are simulated in a lame way, and then the file is printed.  The file is printed to the default printer, the code could be changed to print to a printer of choice.

Code uses FASM syntax.

hth,

farrier


[attachment deleted by admin]
Title: Re: trying to print
Post by: PBrennick on February 20, 2006, 12:56:45 PM
Where can we find Chibb777's RTF printing and displaying code.

Paul
Title: Re: trying to print
Post by: farrier on February 20, 2006, 01:30:40 PM
PBrennick,

If I had spelled his name correctly :red, Chib777, it would have shown up on the search for this board.  He has provided his XXControls package.  Very nice :U

hth,

farrier
Title: Re: trying to print
Post by: PBrennick on February 20, 2006, 02:57:09 PM
Farrier,
Thank you, I found it, xxControls.

Paul