473,395 Members | 1,495 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,395 software developers and data experts.

How to print in C/C++

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
13 3081
* 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
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
* 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
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
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
I undersatnd that this is not C/c++. But then where i can find a
solution

May 30 '07 #7
"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
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
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
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
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
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
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 thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

12
by: Michael Foord | last post by:
Here's a little oddity with 'print' being a reserved word... >>> class thing: pass >>> something = thing() >>> something.print = 3 SyntaxError: invalid syntax >>> print something.__dict__...
14
by: Marcin Ciura | last post by:
Here is a pre-PEP about print that I wrote recently. Please let me know what is the community's opinion on it. Cheers, Marcin PEP: XXX Title: Print Without Intervening Space Version:...
0
by: bearophileHUGS | last post by:
There is/was a long discussion about the replacement for print in Python 3.0 (I don't know if this discussion is finished): http://mail.python.org/pipermail/python-dev/2005-September/055968.html ...
1
by: hamil | last post by:
I am trying to print a graphic file (tif) and also use the PrintPreview control, the PageSetup control, and the Print dialog control. The code attached is a concatination of two examples taken out...
1
by: Steff | last post by:
I am wandering if my code is making sense... I use a lot the print function. Is it weird in this case where I have to display an array ? I thought it would be better to have the entire array in php...
3
by: James J. Besemer | last post by:
I would like to champion a proposed enhancement to Python. I describe the basic idea below, in order to gage community interest. Right now, it's only an idea, and I'm sure there's room for...
69
by: Edward K Ream | last post by:
The pros and cons of making 'print' a function in Python 3.x are well discussed at: http://mail.python.org/pipermail/python-dev/2005-September/056154.html Alas, it appears that the effect of...
2
by: Brad Pears | last post by:
I have some sample code that uses the print dialog, print preview and a print direct options. If I select print preview and then click the printer icon from that, the document prints. If I...
7
by: samslists | last post by:
Am I the only one that thinks this would be useful? :) I'd really like to be able to use python 3.0's print statement in 2.x. Is this at least being considered as an option for 2.6? It seems...
12
by: Studiotyphoon | last post by:
Hi, I have report which I need to print 3 times, but would like to have the following headings Customer Copy - Print 1 Accounts Copy - Print 2 File Copy -Print 3 I created a macro to...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
0
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.