Want to win a PS4? Go Premium and enter to win our High-Tech Treats giveaway. Enter to Win

x
?
Solved

Simple Printing

Posted on 1998-07-15
2
Medium Priority
?
149 Views
Last Modified: 2013-11-20
I have a dlg app created in VC5 using the app wizard. It has a CString output to an edit box. I initially didn't want to print out the contents but if there is a quick way to set this up I might. What would be the easiest way to do this?
0
Comment
Question by:Grailman
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
2 Comments
 
LVL 2

Accepted Solution

by:
duneram earned 200 total points
ID: 1319247
There is a real easy way to print the contents of an edit control under windows.  Its a bit of a back door

1)  Copy the contents of the edit control into a character buffer
2)  Create a file, and write the contents of the character buffer to the file
3)  Close the file
4)  Do a WinExec command and execute the string "notepad /p filename.txt"
    make sure you put the same filename in as the one you created.

5) the file will automatically be printed by the notepad executable.   Additionally if you use SW_HIDE you can hide the notepad window from the user as it prints.

Good luck
0
 
LVL 1

Author Comment

by:Grailman
ID: 1319248
Worked like a charm. Thanks!
0

Featured Post

Free Tool: Site Down Detector

Helpful to verify reports of your own downtime, or to double check a downed website you are trying to access.

One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

In this article, I'll describe -- and show pictures of -- some of the significant additions that have been made available to programmers in the MFC Feature Pack for Visual C++ 2008.  These same feature are in the MFC libraries that come with Visual …
Introduction: Dialogs (2) modeless dialog and a worker thread.  Handling data shared between threads.  Recursive functions. Continuing from the tenth article about sudoku.   Last article we worked with a modal dialog to help maintain informat…
This video will show you how to get GIT to work in Eclipse.   It will walk you through how to install the EGit plugin in eclipse and how to checkout an existing repository.
This lesson discusses how to use a Mainform + Subforms in Microsoft Access to find and enter data for payments on orders. The sample data comes from a custom shop that builds and sells movable storage structures that are delivered to your property. …

604 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question