Codejock Forums Homepage
Forum Home Forum Home > Codejock Products > ActiveX COM > Syntax Edit
  New Posts New Posts RSS Feed - Printing syntax edit text
  FAQ FAQ  Forum Search   Events   Register Register  Login Login

Printing syntax edit text

 Post Reply Post Reply
Author
Message
Neil View Drop Down
Groupie
Groupie


Joined: 16 December 2007
Status: Offline
Points: 40
Post Options Post Options   Thanks (0) Thanks(0)   Quote Neil Quote  Post ReplyReply Direct Link To This Post Topic: Printing syntax edit text
    Posted: 17 March 2008 at 1:45pm
The Syntax edit sample has the section of code that prints the contents of the control commented out. Looking at the code, it looks like the text in the control is pasted into a hidden richtext control, and then the richtext control is used to send the text to the printer.

I would like to test if this is the way to print (why was it commented out in the sample anyway?). In order to use the richtext control in the way I described above, I need to be able to select all the text in the SyntaxEdit control and paste them into the richtext conmtrol, however, the SyntaxEdit control does not exposes methods/propertes that allows programatically selecting all of its text into the clipboard (along with formatting info).

Does anyone know how to print the contents of the SyntaxEdit control (along with the syntax highlighting colors)?
Back to Top
AndreiM View Drop Down
Moderator Group
Moderator Group
Avatar

Joined: 18 August 2007
Status: Offline
Points: 132
Post Options Post Options   Thanks (0) Thanks(0)   Quote AndreiM Quote  Post ReplyReply Direct Link To This Post Posted: 18 March 2008 at 4:07am
The syntax edit does not use RichEdit (no other controls).
 
To print text just call
    wndSyntaxEdit.PrintText2 True
 
See PrintOptions to customize printing.
 
The commented out code shows how to print to the devive context by its handle (HDC).
 
The PrintText2 method show you dialog to select printer or print to the default printer.
The commented out code also shows how you can select pinter yourself.
Back to Top
Neil View Drop Down
Groupie
Groupie


Joined: 16 December 2007
Status: Offline
Points: 40
Post Options Post Options   Thanks (0) Thanks(0)   Quote Neil Quote  Post ReplyReply Direct Link To This Post Posted: 18 March 2008 at 7:41am
Hi Andrei,

I cannot find the PrintText2 method on the SyntaxEdit control (I am using v11.2.0). I have also searched the online documentation , but cannot find that method in the help file either - could you please provide further info?

thanks
Back to Top
Neil View Drop Down
Groupie
Groupie


Joined: 16 December 2007
Status: Offline
Points: 40
Post Options Post Options   Thanks (0) Thanks(0)   Quote Neil Quote  Post ReplyReply Direct Link To This Post Posted: 18 March 2008 at 7:47am
Hi Andrei,

Is there a PrintText method also, that allows me to print without displaying the printer dialog box ?
Back to Top
AndreiM View Drop Down
Moderator Group
Moderator Group
Avatar

Joined: 18 August 2007
Status: Offline
Points: 132
Post Options Post Options   Thanks (0) Thanks(0)   Quote AndreiM Quote  Post ReplyReply Direct Link To This Post Posted: 18 March 2008 at 8:37am
Hi,
Please use the latest version (11.2.2).
 
The Printing added since 11.2.1.
 
See the folowing method and properties.
    
  PrintText(OLE_HANDLE lHDC)
  PrintText2(VARIANT_BOOL bShowPrintDialog)
  PrintPreview(VARIANT_BOOL ShowPrintDialog)
 
  PrintOptions
  PrintPreviewOptions
Back to Top
Neil View Drop Down
Groupie
Groupie


Joined: 16 December 2007
Status: Offline
Points: 40
Post Options Post Options   Thanks (0) Thanks(0)   Quote Neil Quote  Post ReplyReply Direct Link To This Post Posted: 18 March 2008 at 1:43pm
Hi Andrei,

How do I get a copy of 11.2.2?. Is it a free upgrade?. I only bought version 11.2.0 a few months ago. Please respond ASAP.

Thanks
Back to Top
SuperMario View Drop Down
Admin Group
Admin Group
Avatar

Joined: 14 February 2004
Status: Offline
Points: 18057
Post Options Post Options   Thanks (0) Thanks(0)   Quote SuperMario Quote  Post ReplyReply Direct Link To This Post Posted: 18 March 2008 at 3:39pm
Originally posted by Neil Neil wrote:

Hi Andrei,

How do I get a copy of 11.2.2?. Is it a free upgrade?. I only bought version 11.2.0 a few months ago. Please respond ASAP.

Thanks


It depends on whether you purchased a 1 year maintenance subscription, if you bought a couple months ago then your 30 days would have expired.

I suggest you contact sales.
Back to Top
 Post Reply Post Reply
  Share Topic   

Forum Jump Forum Permissions View Drop Down

Forum Software by Web Wiz Forums® version 12.04
Copyright ©2001-2021 Web Wiz Ltd.

This page was generated in 0.188 seconds.