Alex Madarasz
April 26th, 1999, 08:06 AM
Just wondering - are there any other folks out there running into printing roadblocks due to the inconsistencies in the MFC, Doc-View and ActiveX architectures with respect to printing?
Doc-View can make printing pretty easy, with all the work it can do behind the scenes for you. ActiveX can make building and using controls pretty easy. FormViews can make 'painting' ActiveX controls onto an interface and accessing their properties, methods and events pretty easy.
When you mix them all together and get down to the nitty gritty of printing views (especially FormViews) containing AciveX controls, however, your head can get pretty sore from hitting brick walls ...
- FormViews want to act like dialogs and let their controls draw themselves, so nuts to you if you try to call CFormView::OnDraw() while printing.
- If you want to back out and use other views so you can get printing support, VC++ won't give you any help instantiating your ActiveX controls and hooking up things like events (you'll probably have to generate another Dialog / FormView-based project, do your work there, then cut and paste).
- Some ActiveX controls have built-in printing support of some kind, but the implementation may be porrly documented and have side effects you don't effect - e.g., MS's WebBrowser control (see the MFC CHtmlView - implemented as a FormView - source: VIEWHTML.CPP).
I'm now hitting the wall - I have a multi-view app, and all but 2 views (one is a CHtmlView, 1 is a text-based 'status' FormView) consist of a single ActiveX control embedded in a FormView.
So, my question(s) [restated] ... Are any of you folks printing views with ActiveX controls in them, and if so, what kind of view(s) are you using and how are you printing?
--
Alex P. Madarasz, Jr. <amadarasz@Autometric.com>
Sr. Software Engineer
Visual Simulation Division
Autometric, Inc.
Doc-View can make printing pretty easy, with all the work it can do behind the scenes for you. ActiveX can make building and using controls pretty easy. FormViews can make 'painting' ActiveX controls onto an interface and accessing their properties, methods and events pretty easy.
When you mix them all together and get down to the nitty gritty of printing views (especially FormViews) containing AciveX controls, however, your head can get pretty sore from hitting brick walls ...
- FormViews want to act like dialogs and let their controls draw themselves, so nuts to you if you try to call CFormView::OnDraw() while printing.
- If you want to back out and use other views so you can get printing support, VC++ won't give you any help instantiating your ActiveX controls and hooking up things like events (you'll probably have to generate another Dialog / FormView-based project, do your work there, then cut and paste).
- Some ActiveX controls have built-in printing support of some kind, but the implementation may be porrly documented and have side effects you don't effect - e.g., MS's WebBrowser control (see the MFC CHtmlView - implemented as a FormView - source: VIEWHTML.CPP).
I'm now hitting the wall - I have a multi-view app, and all but 2 views (one is a CHtmlView, 1 is a text-based 'status' FormView) consist of a single ActiveX control embedded in a FormView.
So, my question(s) [restated] ... Are any of you folks printing views with ActiveX controls in them, and if so, what kind of view(s) are you using and how are you printing?
--
Alex P. Madarasz, Jr. <amadarasz@Autometric.com>
Sr. Software Engineer
Visual Simulation Division
Autometric, Inc.