>Ed / Walter / George:
>
>I've been lurking on this thread trying to solve a problem that has been plaguing me for quite a while. I think i've got all of the pieces to the puzzle now I just need a hammer to make them fit!
>
>What I'm trying to do it get the output from a set device to print into landscape mode.
>
>I've been following the discussion between you 3 about:
>
>>The DEVMODE structure that Ed mentioned is stored in the registry under >HKEY_LOCAL_MACHINE\System\CurrentControlSet\control\Print\Printers\< Printer >Name >. That last entry, of course, represents the printer name. Under that >there's an entry named DefaultDevmode. What you could do is change the value >and call SYS(3056) to force VFP to re-read the registry settings.
>
>My guess is if I could read that registry key into one of those class heaps (or a string?), and somehow change the right byte from a 1 to a 2, I could write the whole mess back to the registry and call sys(3056)?
>
There's no need for a heap allocation; RegGetValueEx() can return a binary registry variable in a string. I'm not certain if the FFC will pull back a binary registry value properly, but if not, it would only take a half-dozen or so lines of code to write the necessary API call.
>Can you tell me where you got the information the the Default Devmode for the printer context in VFP was written to the above registry key mentioned. I've never seen that before and it sounds like a good reference.
>
I didn't; someone else (Walter Meester perhaps) wrote about it. You can go back in the thread a few days and see who noted it.
>Can you give me any guidance/mentoring/help!!
>
You'll want to get your hands on the MSDN documentation, and I still find the
NT Win32 API SuperBible to be an invaluable resource; at the moment, Macmillan lists it as out of stock; you may well find it on the shelf of a local CompUSA or Barnes & Noble, or Amazon might have it.
>Thanks again, and stop by - the round is on me!
>
>
>Scott Vanden Elzen
>
scott@westonmedical.com