473,320 Members | 2,024 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,320 software developers and data experts.

How to print a file through printer in C++ code?

i need to print a file(let it be a text or a binary) through c++ in my application am using vs2008 and windows7
Feb 7 '11 #1
1 1953
Banfa
9,065 Expert Mod 8TB
There is no platform independent way to print and therefore C++ does not support printing.

You will need to look for the platform specific way to print, in Windows this is done by creating a printer DC and drawing to it (or used to be last time I used Windows pre .NET).

Try doing a web search on "Printer DC"
Feb 7 '11 #2

Sign in to post your reply or Sign up for a free account.

Similar topics

7
by: avnit | last post by:
I can't seem to figure out how to print with my printer using python. I'm using Mac OSX 10.4. I was thinking maybe something with applescript. Does anyone know?
0
by: John Baker | last post by:
Hi: I would like to write some code that would print a specific report using Acrobat PDF writer, and name the resultant output a specific name. The snag I am having is setting up the print...
6
by: zippy | last post by:
In my code I create and save a file. I would like to be able to zip that file. I've looked online and it seems that there are no zip classes built in to .Net for C#. How can i zip a file then?...
6
by: Gnic | last post by:
Hi, Instead of running "sn-k" to generate a key pair, I need to generate the key file in code, is there anyone know how to generate key files in .NET code? Any help is appreciated. Gnic
5
by: Lee | last post by:
Is there anyway to backup a SQL server database to a .sql script file through code? My provider charges me 5.00 to perform backups. I'd like to do it on my own through code. I don't have access...
1
by: amitverma | last post by:
how can i run executable file through code in vb ?
1
by: Pieter | last post by:
Hi, This is maybe a strange question, nut I'm kind of amazed that I can't find how to do it: I need to print all the code of a some VB.NET-project (Visual Studio .NET 2005). But I can't find in...
1
xtianixm
by: xtianixm | last post by:
i know using shellexecute will do. but how about i create a file "print.file". when i used shellexecute it doesnt print directly..can anyone help me on this..how can i print a file with an...
10
by: bhughes2187 | last post by:
Hey all, The access app I am creating, pulls a .dbf file into a table in access. The name of the printer to be printed to is contained in that file/table. How would I cycle through the list of...
6
by: vbbeginner | last post by:
how to make 2 exe files in one exe file by code?? i have two exe files 1.exe 2.exe i need to make them in one exe file by third exe file?
0
by: DolphinDB | last post by:
Tired of spending countless mintues downsampling your data? Look no further! In this article, you’ll learn how to efficiently downsample 6.48 billion high-frequency records to 61 million...
0
isladogs
by: isladogs | last post by:
The next Access Europe meeting will be on Wednesday 6 Mar 2024 starting at 18:00 UK time (6PM UTC) and finishing at about 19:15 (7.15PM). In this month's session, we are pleased to welcome back...
1
isladogs
by: isladogs | last post by:
The next Access Europe meeting will be on Wednesday 6 Mar 2024 starting at 18:00 UK time (6PM UTC) and finishing at about 19:15 (7.15PM). In this month's session, we are pleased to welcome back...
0
by: ArrayDB | last post by:
The error message I've encountered is; ERROR:root:Error generating model response: exception: access violation writing 0x0000000000005140, which seems to be indicative of an access violation...
1
by: PapaRatzi | last post by:
Hello, I am teaching myself MS Access forms design and Visual Basic. I've created a table to capture a list of Top 30 singles and forms to capture new entries. The final step is a form (unbound)...
0
by: CloudSolutions | last post by:
Introduction: For many beginners and individual users, requiring a credit card and email registration may pose a barrier when starting to use cloud servers. However, some cloud server providers now...
1
by: Shællîpôpï 09 | last post by:
If u are using a keypad phone, how do u turn on JavaScript, to access features like WhatsApp, Facebook, Instagram....
0
by: af34tf | last post by:
Hi Guys, I have a domain whose name is BytesLimited.com, and I want to sell it. Does anyone know about platforms that allow me to list my domain in auction for free. Thank you
0
by: Faith0G | last post by:
I am starting a new it consulting business and it's been a while since I setup a new website. Is wordpress still the best web based software for hosting a 5 page website? The webpages will be...

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.