Print Edit control!!!
-
hello, Does anyone know how to print CEdit's text? any ideas? thanks
-
hello, Does anyone know how to print CEdit's text? any ideas? thanks
You will get the best results and not have to worry about if the text is scrolled off the CEdit control if you get the text and use CDC::TextOut or CDC::DrawText. However, I find most people have a negative reaction to that suggestion so if your determined to literally print the CEdit to a device context, CWnd::Print should do the job. Just be forwarned, if you don't modify something (viewport extents, windows extents, etc...) in an appropriate mapping mode, it's gonna come out really, really, tiny on your printer. The best way to save a tree is to output your print tests to an Adobe Acrobat, PrimoPDF , or that new snazzy Vista XML print driver to see the results. That way you can zoom in really, really close to verify my statement. After that you can experiment until way after Thanksgiving trying everything you can think of to get around all the pitfalls associated with trying to print a CEdit control (reliably) in all possible contexts and scenarios until you are ready to pull your hair out. At that point, you can go back to my first suggestion and use TextOut or DrawText and smile once again knowing you did the right thing. :-D
-
hello, Does anyone know how to print CEdit's text? any ideas? thanks
You can get your data with GetWindowText of edit control and use of TextOut or DrawText for print it.