Click here to Skip to main content
15,922,696 members
Home / Discussions / C / C++ / MFC
   

C / C++ / MFC

 
GeneralRe: Adding a bitmap in the background of a richedit Pin
John O'Byrne9-Apr-02 21:20
John O'Byrne9-Apr-02 21:20 
GeneralPCAnywhere Pin
9-Apr-02 7:47
suss9-Apr-02 7:47 
GeneralRe: PCAnywhere Pin
Jeremy Falcon9-Apr-02 8:16
professionalJeremy Falcon9-Apr-02 8:16 
GeneralafxDump: preventing 'dropped' output Pin
moredip9-Apr-02 6:54
moredip9-Apr-02 6:54 
GeneralRe: afxDump: preventing 'dropped' output Pin
James R. Twine9-Apr-02 8:00
James R. Twine9-Apr-02 8:00 
GeneralRe: afxDump: preventing 'dropped' output Pin
moredip9-Apr-02 8:40
moredip9-Apr-02 8:40 
QuestionSetting the min size a floating dock bar can be sized to? Pin
Roger Allen9-Apr-02 6:45
Roger Allen9-Apr-02 6:45 
GeneralRegisterHotKey() Pin
Sumudu Perera9-Apr-02 6:23
Sumudu Perera9-Apr-02 6:23 
Generalfrom VC++6 to C++.net Pin
Sumudu Perera9-Apr-02 6:11
Sumudu Perera9-Apr-02 6:11 
GeneralRe: from VC++6 to C++.net Pin
Rick Crone9-Apr-02 6:41
Rick Crone9-Apr-02 6:41 
GeneralRe: from VC++6 to C++.net Pin
Sumudu Perera9-Apr-02 6:44
Sumudu Perera9-Apr-02 6:44 
GeneralCSplitterWnd and CToolBar Pin
dazinith9-Apr-02 6:02
dazinith9-Apr-02 6:02 
GeneralMicrosoft Paint's toolbar. Pin
kursatkaraca9-Apr-02 5:56
kursatkaraca9-Apr-02 5:56 
GeneralAlmost gettin' mad: sockaddr_in Pin
User 66589-Apr-02 5:19
User 66589-Apr-02 5:19 
GeneralRe: Almost gettin' mad: sockaddr_in Pin
Joaquín M López Muñoz9-Apr-02 7:55
Joaquín M López Muñoz9-Apr-02 7:55 
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 

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.