- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Hello
I'm presently updating some older DOS Fortran programs which use assembly code to initiate a printout of the text output via interrupt 5. As I understand, this no longer works under Win2000. Is there a method using CVF 6.6 to perform a printscreen in a Fortran console application? The printscreen must be initiated and controlled by the program.
Thanks for any contributions
Jochen
Link Copied
2 Replies
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Hi Jochen,
It's not so easy under Win32 as it used to be under good ol' DOS days. For the start, most printers do not support "plain text" mode at all, only "graphic" mode.
I suggest you download XFTLite.zip from http://www.geocities.com/jdujic/fortran/xft/xft_download.htm. It is a dialog-based application whichdemonstrates the basics of printing under Win32 -- take a look at OnPrint subroutine, which prepares a printer's DC for printing. If you add PD_RETURNDEFAULT flag to PD%Flags, the print dialog will not be invoked, but default properties of the default printer will be returned.
Subroutine DrawImage actually produces the graphic output, so you should substitute your own. As to how to actually read the console window's contents, take a look at ReadConsoleOutput, ReadConsoleOutputCharacterand/or ReadConsoleOutputAttribute APIs (haven't used them myself). Once you get the information, you can render it on printer's DC using XFTGDI XTextOut function (make sure to download the documentation as well) or TextOut/DrawTextEx APIs.
Hope this can get you started,
Jugoslav
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Thanks Jugoslav,
for the information- I will have a look at the source you mentioned and start going into details...
Jochen

Reply
Topic Options
- Subscribe to RSS Feed
- Mark Topic as New
- Mark Topic as Read
- Float this Topic for Current User
- Bookmark
- Subscribe
- Printer Friendly Page