|
-
May 10th, 1999, 11:23 AM
#1
VC++ 6.00: How set the landscape printing mode?
I know that it seems to be a trivial question.
But I did not find how to set the printing mode to landscape before displaying
the CPrintDialog, with VC++ 6.00.
I tried to change the DEVMODE structure with GetDevMode method but I always got
an error: The memory could not be written.
Help highly appreciates.
JH MORIN.
-
May 10th, 1999, 11:39 AM
#2
Re: VC++ 6.00: How set the landscape printing mode?
Hi,
There is a Knowledge Base article at Microsoft's site on how to do this. Don't have the article off hand, should be able to search for it. If you can't find it, I could post the code... let me know.
HTH,
Harvey Hawes
Software Engineer
BioScience Analysis Software Ltd.
Masters Candidate
Cardiovascular/Respiratory Sciences
Faculty of Medicine
University of Calgary
Calgary, Alberta, Canada
-
May 10th, 1999, 12:54 PM
#3
Re: VC++ 6.00: How set the landscape printing mode?
This is how I do it
LPDEVMODE lp = (LPDEVMODE) ::GlobalLock(dlg.m_pd.hDevMode);
ASSERT(lp);
lp->dmOrientation = DMORIENT_LANDSCAPE;
::GlobalUnlock(dlg.m_pd.hDevMode);
ResetDC(dlg.m_pd.hDC,lp);
-
May 11th, 1999, 07:58 AM
#4
Re: VC++ 6.00: How set the landscape printing mode?
Thanks to all.
The code below does excatly what I wanted.
LPDEVMODE lp = (LPDEVMODE) ::GlobalLock(dlg.m_pd.hDevMode);
ASSERT(lp);
lp->dmOrientation = DMORIENT_LANDSCAPE;
::GlobalUnlock(dlg.m_pd.hDevMode);
ResetDC(dlg.m_pd.hDC,lp);
Jean-Hubert Morin
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|