By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
455,513 Members | 1,629 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 455,513 IT Pros & Developers. It's quick & easy.

How to print in C/C++

P: n/a
I want to print a specific portion of output screen using a printer.
How can i do this using C/C++ commands???????

Thanks in advance

May 30 '07 #1
Share this Question
Share on Google+
13 Replies


P: n/a
* Sanchit:
I want to print a specific portion of output screen using a printer.
How can i do this using C/C++ commands???????
DON'T CROSS-POST TO C AND C++ GROUPS.

Also, please consult the relevant FAQ before posting. See e.g. <url:
http://www.parashift.com/c++-faq-lite/input-output.html#faq-15.20>,
which treats a very similar question.

Also see <url:
http://www.parashift.com/c++-faq-lite/how-to-post.html#faq-5.9>.

--
A: Because it messes up the order in which people normally read text.
Q: Why is it such a bad thing?
A: Top-posting.
Q: What is the most annoying thing on usenet and in e-mail?
May 30 '07 #2

P: n/a
On May 30, 3:17 pm, "Alf P. Steinbach" <a...@start.nowrote:
* Sanchit:
I want to print a specific portion of output screen using a printer.
How can i do this using C/C++ commands???????

DON'T CROSS-POST TO C AND C++ GROUPS.

Also, please consult the relevant FAQ before posting. See e.g. <url:http://www.parashift.com/c++-faq-lite/input-output.html#faq-15.20>,
which treats a very similar question.

Also see <url:http://www.parashift.com/c++-faq-lite/how-to-post.html#faq-5.9>.

--
A: Because it messes up the order in which people normally read text.
Q: Why is it such a bad thing?
A: Top-posting.
Q: What is the most annoying thing on usenet and in e-mail?

I dont want to clear screen... please read question clearly........

May 30 '07 #3

P: n/a
* Sanchit:
On May 30, 3:17 pm, "Alf P. Steinbach" <a...@start.nowrote:
>* Sanchit:
>>I want to print a specific portion of output screen using a printer.
How can i do this using C/C++ commands???????
DON'T CROSS-POST TO C AND C++ GROUPS.

Also, please consult the relevant FAQ before posting. See e.g. <url:http://www.parashift.com/c++-faq-lite/input-output.html#faq-15.20>,
which treats a very similar question.

Also see <url:http://www.parashift.com/c++-faq-lite/how-to-post.html#faq-5.9>.

I dont want to clear screen... please read question clearly........
Read answer clearly. Apply brain. Don't quote signatures.

--
A: Because it messes up the order in which people normally read text.
Q: Why is it such a bad thing?
A: Top-posting.
Q: What is the most annoying thing on usenet and in e-mail?
May 30 '07 #4

P: n/a
On May 30, 3:25 pm, Sanchit <sanchitgupt...@gmail.comwrote:
On May 30, 3:17 pm, "Alf P. Steinbach" <a...@start.nowrote:
* Sanchit:
I want to print a specific portion of output screen using a printer.
How can i do this using C/C++ commands???????
DON'T CROSS-POST TO C AND C++ GROUPS.
Also, please consult the relevant FAQ before posting. See e.g. <url:http://www.parashift.com/c++-faq-lite/input-output.html#faq-15.20>,
which treats a very similar question.
Also see <url:http://www.parashift.com/c++-faq-lite/how-to-post.html#faq-5.9>.
--
A: Because it messes up the order in which people normally read text.
Q: Why is it such a bad thing?
A: Top-posting.
Q: What is the most annoying thing on usenet and in e-mail?

I dont want to clear screen... please read question clearly........
If you read it a little more clearly you 'll find it is not a C or C++
feature.
In other words C or C++ do not even know that there is a screen. So
this is irrelevant from C's point of view.

Check you OS docs for help.

PS: Learn to follow the advice.

Thanks
May 30 '07 #5

P: n/a
Sanchit wrote:
I want to print a specific portion of output screen using a printer.
How can i do this using C/C++ commands???????

Thanks in advance
Under windows you can use the text mode APIs to read from the
screen the characters displayed.

Under linux, I think I remember that the curses library
provided a similar capability.
May 30 '07 #6

P: n/a
I undersatnd that this is not C/c++. But then where i can find a
solution

May 30 '07 #7

P: n/a
"Sanchit" writes:
>I undersatnd that this is not C/c++. But then where i can find a
solution
Do you think there is a single human being on this planet, other than
yourself, that can make any sense out of the post you made?
May 30 '07 #8

P: n/a
On 5月30日, 下午9时23分, Sanchit <sanchitgupt...@gmail.comwrote:
I undersatnd that this is not C/c++. But then where i can find a
solution
Maybe you can get answer at comp. os. ms-windows. programmer. win32.

May 30 '07 #9

P: n/a
jacob navia wrote:
Sanchit wrote:
>I want to print a specific portion of output screen using a
printer. How can i do this using C/C++ commands???????

Under windows you can use the text mode APIs to read from the
screen the characters displayed.

Under linux, I think I remember that the curses library
provided a similar capability.
I see no reference to windows or linux, nor to 'text mode APIs' nor
to 'curses library' in any C standard I have. Please give
references to these in the standards.

F'ups set.

--
<http://www.cs.auckland.ac.nz/~pgut001/pubs/vista_cost.txt>
<http://www.securityfocus.com/columnists/423>
<http://www.aaxnet.com/editor/edit043.html>
<http://kadaitcha.cx/vista/dogsbreakfast/index.html>
cbfalconer at maineline dot net

--
Posted via a free Usenet account from http://www.teranews.com

May 30 '07 #10

P: n/a
jacob navia wrote:
>
Sanchit wrote:
I want to print a specific portion of output screen using a printer.
How can i do this using C/C++ commands???????

Under windows you can use the text mode APIs to read from the
screen the characters displayed.
Assuming that you are talking about a console window in the
first place.
Under linux, I think I remember that the curses library
provided a similar capability.
But only if all output was done by the current process via the
curses library.

ie: no printf()s, nor anything output via system().

--
+-------------------------+--------------------+-----------------------+
| Kenneth J. Brody | www.hvcomputer.com | #include |
| kenbrody/at\spamcop.net | www.fptech.com | <std_disclaimer.h|
+-------------------------+--------------------+-----------------------+
Don't e-mail me at: <mailto:Th*************@gmail.com>
May 30 '07 #11

P: n/a
On 30 May 2007 03:07:54 -0700, in comp.lang.c , Sanchit
<sa************@gmail.comwrote:
>I want to print a specific portion of output screen using a printer.
How can i do this using C/C++ commands???????
Standard C (the topic of CLC) offers no facility to do this. You will
need to ask specialists in your operating system and/or compiler
platform, in a different group.
--
Mark McIntyre

"Debugging is twice as hard as writing the code in the first place.
Therefore, if you write the code as cleverly as possible, you are,
by definition, not smart enough to debug it."
--Brian Kernighan
May 30 '07 #12

P: n/a
On 30 May 2007 06:23:23 -0700, in comp.lang.c , Sanchit
<sa************@gmail.comwrote:
>I undersatnd that this is not C/c++. But then where i can find a
solution
By asking in the RIGHT PLACE. You need to ask the experts in your
platform, not the experts in C.

--
Mark McIntyre

"Debugging is twice as hard as writing the code in the first place.
Therefore, if you write the code as cleverly as possible, you are,
by definition, not smart enough to debug it."
--Brian Kernighan
May 30 '07 #13

P: n/a
Das
On May 30, 3:07 pm, Sanchit <sanchitgupt...@gmail.comwrote:
I want to print a specific portion of output screen using a printer.
How can i do this using C/C++ commands???????

Thanks in advance
This is fully dependant on your setup. Nothing to do with C/C++.
If you use DOS and TURBO-C/C++ you can do it by using DOS.H.
If you are on Linux then it is difficult to do such a thing readily.
Under linux you have to port your code to CURSES/NCURSES, and you have
controll over the output.

Else if you are a very low level programmer then you can go to the
display buffer in your videocard
and manipulate. ;)

May 31 '07 #14

This discussion thread is closed

Replies have been disabled for this discussion.