?
Solved

Simple Printing

Posted on 1998-07-15
2
Medium Priority
?
147 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

What does it mean to be "Always On"?

Is your cloud always on? With an Always On cloud you won't have to worry about downtime for maintenance or software application code updates, ensuring that your bottom line isn't affected.

Question has a verified solution.

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

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…
If you use Adobe Reader X it is possible you can't open OLE PDF documents in the standard. The reason is the 'save box mode' in adobe reader X. Many people think the protected Mode of adobe reader x is only to stop the write access. But this fe…
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.
In this brief tutorial Pawel from AdRem Software explains how you can quickly find out which services are running on your network, or what are the IP addresses of servers responsible for each service. Software used is freeware NetCrunch Tools (https…
Suggested Courses
Course of the Month8 days, 5 hours left to enroll

765 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