I am trying to crate an application for Microsoft Windows in C/C++. The goal of the application is to take a text file as input, parse the text file and generate the output in form of an HTML file.
Then it prints the generated HTML file using a printer attached to the computer.
Everything is simple but printing. The problem is that I don't know how to control printer to do the printing job, whether it's an HTML document or any other.
I searched the forum and internet for a solution but here are my problems:
- I don't know much about Windows programming since I come from Linux background.
- I have never used Visual C++ compiler so I had a little trouble understanding how things were going with it. (I have only used GCC/G++).
What I would like to know is whether there is any API available that I can use directly with my MinGW compiler. Or if there is any other method I could learn how to do this using Windows API supplied with Visual C++ compiler (which I suppose comes with Visual Studios in Windows).
Edit: I was also wondering if there was any way to print the file directly to the printer avoiding the popups every time a printing job is done. The application I am working on does a lot of printing jobs, so if it was possible to avoid those popping dialogs which ask user to select a printing device by automatically checking for available printing devices and choosing one as default.
Thank you.