>Hi:
>
>I have managed to get the API call to the page setup dialog working and can retieve the users selections. However, after making selections and closing the form, the selections (page orientation and margins) are not applied not to the document (RTF Control) when printed. Any ideas?
>
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.