View the EditDlg sample for insight on how to use SECEditCtrl in a dialog. The code in CEditDlgDlg::OnInitDialog() shows how to attach the SECEditCtrl to an edit control on a dialog template. It also demonstrates printing from a dialog.
Follow these steps to implement:
Add SECEditCtrlPrinter.cpp and .h into your project.
Add #include "afxprint.rc" to your resource includes.
Add #include "SECEditCtrlPrinter.h" to the .cpp file that will do the printing.
Add code to print your SECEditCtrl's contents:
void CEditDlgDlg::OnPrint() { // Print the SECEdit that is in this SECEditCtrl SECEditCtrlPrinter printer(&m_SECEditCtrl); // This brings up the printer dlg box first printer.Print(); // This would print directly to the current default printer // settings // printer.Print(TRUE); } |
Copyright © Rogue Wave Software, Inc. All Rights Reserved.
The Rogue Wave name and logo, and Stingray, are registered trademarks of Rogue Wave Software. All other trademarks are the property of their respective owners.
Provide feedback to Rogue Wave about its documentation.