It may not be supported, I'm not sure. All I found when I looked it up were pure C++ and C# samples.
It may not be supported, I'm not sure. All I found when I looked it up were pure C++ and C# samples.
Oh and by printing I'm talking text documents.
Do you mean sending the edit control text to a printer for printing? If so, then wouldn't that fall under winapi GDI category? I know that writing a printer function in C can be a bit challenging sometimes.
There are a few basic tutorials on line that illustrate the basics for winapi printing. Also check out the Multipad example program supplied with earlier Win32 SDK discs. I think Petzold also has an example in one of his text editor programs.
You can use print action of ShellExecute ShellExecute function (Windows)
All problems in computer science can be solved by another level of indirection,
except for the problem of too many layers of indirection.
David J. Wheeler
Otherwise search here for more info.
In WIN32 API is used to be;
Get the printer/s with GetProfileString() or EnumPrinters() ect. Using the right PRINTER_INFO_# (1-5) depending on the OS ect.
Use PageSetupDlg() with a PAGESETUPDLG struc to allow the user to change the settings of the printer in the common dlgs (ensure that you have included/init common dlgs)
Get a HDC for the printer the user selected. (In the *DEVMODE struct.)
Send the StartDoc()
Send StartPage()
Print the data to the HDC of the printer. (TextOut())
Send the EndPage()
Send EndDoc()
Release the printer HDC.
"Man alone suffers so excruciatingly in the world that he was compelled to invent laughter."
Friedrich Nietzsche
"I spent a lot of my money on booze, birds and fast cars......the rest I squandered."
George Best
"If you are going through hell....keep going."
Winston Churchill