- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
How can I access the name of the printer selected in the Printer Dialog box for use elsewhere in my program? I've tried to modify the Fortran_Winprint.f90 example and can't figure it out. I believe it has something to do with the DEVNAMEs structure but can't figure out how to access it.
Jim Breeding
Jim Breeding
Link Copied
1 Reply
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
The short version of what you want to do is basicly four lines. GlobalLock the hDevNames, add the wDeviceOffset to that address, read the string, and do a GlobalUnlock. But because the devil's in the details, and it was easier to write it than explain it, here is an example that should help. You can call it from inside winprint, passing in the PRINTDLG_Struct%hDevNames, an output string, and an optional status argument.
hth,
John
hth,
John
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