Information générale
Catégorie:
Fonctions Windows API
>>My understanding of the way printing with the RichTextBox control works is >>that you have to create a Printer Device Context with the proper settings >>established, and then call the RichTextBox control's SelPrint method, passing >>the handle to the printer device context (hDC) as the first parameter, with a >>second optional parameter specifying whether the control should send a >>StartPage/EndPage command pair (0) or a StartDoc/EndDoc command pair (-1) to >>the printer to start the RTF print - you want to pass 0 to keep your document >>setup.
Thanx, but I've got the printing part worked out.
What I would like to do is change the printer margins. I'm working on a text ruler for my RTF control that sets indents and hanging indents. It doesn't make much sense unless you can control the printer margins as well. Using the API call PRINTSETUPDLG I'm abe to get the Page Setup dialog and retieve the users settings, but it doesn't appear to change the margin settings. I think this is by design. So, my question is how do you change the printer margins programatically?
Charlie
Précédent
Répondre
Voir le fil de ce thread
Voir le fil de ce thread à partir de ce message seulement
Voir tous les messages de ce thread
Voir tous les messages de ce thread à partir de ce message seulement