Click here to Skip to main content
15,905,967 members
Home / Discussions / C / C++ / MFC
   

C / C++ / MFC

 
GeneralThanks!!! Pin
User 66589-Apr-02 8:03
User 66589-Apr-02 8:03 
GeneralMultiDocument And MultView (and per document) :: MFC Pin
valikac9-Apr-02 5:05
valikac9-Apr-02 5:05 
GeneralRe: MultiDocument And MultView (and per document) :: MFC Pin
l a u r e n9-Apr-02 5:28
l a u r e n9-Apr-02 5:28 
GeneralRe: MultiDocument And MultView (and per document) :: MFC Pin
Roger Allen9-Apr-02 5:31
Roger Allen9-Apr-02 5:31 
GeneralRe: Like this? Pin
valikac9-Apr-02 16:01
valikac9-Apr-02 16:01 
GeneralRe: SDI or MDI Pin
valikac9-Apr-02 18:35
valikac9-Apr-02 18:35 
GeneralDocument View - Printing Pin
AJ1239-Apr-02 4:58
AJ1239-Apr-02 4:58 
GeneralRe: Document View - Printing Pin
Roger Allen9-Apr-02 5:28
Roger Allen9-Apr-02 5:28 
You can setup the page as landscape like this:

void CMyApp::SetLandscapeMode()
{
   PRINTDLG pd;
   pd.lStructSize=(DWORD)sizeof(PRINTDLG);
   BOOL bRet=GetPrinterDeviceDefaults(&pd);
   if(bRet)
   {
      // protect memory handle with ::GlobalLock and ::GlobalUnlock
      DEVMODE FAR *pDevMode=(DEVMODE FAR *)::GlobalLock(m_hDevMode);
      // set orientation to landscape
      pDevMode->dmOrientation=DMORIENT_LANDSCAPE;
      ::GlobalUnlock(m_hDevMode);
   }
}


I found this with a search through the MSDN for DMORIENT_LANDSCAPE.

As for your image size, you may need to modify your OnDraw of your view to handle cases when you are printing, or messa around with the OnPreparePrinting function to correctly setup your DC.


Roger Allen
Sonork 100.10016

If I'm not breathing, I'm either dead or holding my breath.
A fool jabbers, while a wise man listens. But is he so wise to listen to the fool?
GeneralPure Virtual Functions Pin
PaulJ9-Apr-02 4:38
PaulJ9-Apr-02 4:38 
GeneralRe: Pure Virtual Functions Pin
Roger Allen9-Apr-02 4:42
Roger Allen9-Apr-02 4:42 
QuestionHow to make my window transparent while dragged (code inside) Pin
John O'Byrne9-Apr-02 4:30
John O'Byrne9-Apr-02 4:30 
AnswerRe: How to make my window transparent while dragged (code inside) Pin
Roger Allen9-Apr-02 4:46
Roger Allen9-Apr-02 4:46 
GeneralRe: How to make my window transparent while dragged (code inside) Pin
John O'Byrne9-Apr-02 4:55
John O'Byrne9-Apr-02 4:55 
GeneralRe: How to make my window transparent while dragged (code inside) Pin
Roger Allen9-Apr-02 5:20
Roger Allen9-Apr-02 5:20 
GeneralRe: How to make my window transparent while dragged (code inside) Pin
John O'Byrne9-Apr-02 5:37
John O'Byrne9-Apr-02 5:37 
General*LPUNKOWN Pin
Braulio Dez9-Apr-02 4:05
Braulio Dez9-Apr-02 4:05 
GeneralRe: *LPUNKOWN Pin
Tim Smith9-Apr-02 4:25
Tim Smith9-Apr-02 4:25 
GeneralRe: *LPUNKOWN Pin
Braulio Dez9-Apr-02 4:45
Braulio Dez9-Apr-02 4:45 
GeneralRe: *LPUNKOWN Pin
Niklas L9-Apr-02 4:35
Niklas L9-Apr-02 4:35 
GeneralRe: *LPUNKOWN Pin
Braulio Dez9-Apr-02 4:50
Braulio Dez9-Apr-02 4:50 
GeneralC++ question Pin
Rajveer9-Apr-02 3:46
Rajveer9-Apr-02 3:46 
GeneralRe: C++ question Pin
Paul M Watt9-Apr-02 3:56
mentorPaul M Watt9-Apr-02 3:56 
GeneralRe: C++ question Pin
Rajveer9-Apr-02 4:37
Rajveer9-Apr-02 4:37 
GeneralRe: C++ question Pin
Paul M Watt9-Apr-02 5:25
mentorPaul M Watt9-Apr-02 5:25 
GeneralRe: C++ question Pin
woods139-Apr-02 4:28
woods139-Apr-02 4:28 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.