Click here to Skip to main content
15,885,366 members
Home / Discussions / C / C++ / MFC
   

C / C++ / MFC

 
GeneralRe: Reading BIOS Pin
Toni7821-Apr-03 11:30
Toni7821-Apr-03 11:30 
GeneralRe: Reading BIOS Pin
John M. Drescher22-Apr-03 4:27
John M. Drescher22-Apr-03 4:27 
GeneralProblem with MAPI Pin
Atlence19-Apr-03 8:16
Atlence19-Apr-03 8:16 
GeneralSend Message Pin
Zygmunt19-Apr-03 7:44
Zygmunt19-Apr-03 7:44 
GeneralRe: Send Message Pin
Rickard Andersson2019-Apr-03 8:01
Rickard Andersson2019-Apr-03 8:01 
GeneralRe: Send Message Pin
David Crow21-Apr-03 3:28
David Crow21-Apr-03 3:28 
QuestionCan not print in Landscape Mode Pin
ATC19-Apr-03 6:32
ATC19-Apr-03 6:32 
AnswerRe: Can not print in Landscape Mode Pin
Paolo Messina19-Apr-03 9:20
professionalPaolo Messina19-Apr-03 9:20 
From MSDN:
<big>CWinApp::GetPrinterDeviceDefaults 
BOOL GetPrinterDeviceDefaults( PRINTDLG* pPrintDlg );</big>
<br>
Example<br>

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);
   }
}


Give it a try...

Paolo

------
Why spend 2 minutes doing it by hand when you can spend all night plus most of the following day writing a system to do it for you? - (Chris Maunder)
GeneralRe: Can not print in Landscape Mode Pin
ATC19-Apr-03 11:33
ATC19-Apr-03 11:33 
GeneralRe: Can not print in Landscape Mode Pin
Paolo Messina19-Apr-03 11:55
professionalPaolo Messina19-Apr-03 11:55 
GeneralRe: Can not print in Landscape Mode Pin
ATC19-Apr-03 12:36
ATC19-Apr-03 12:36 
GeneralRe: Can not print in Landscape Mode Pin
Bartosz Bien20-Apr-03 4:41
Bartosz Bien20-Apr-03 4:41 
GeneralRe: Can not print in Landscape Mode Pin
ATC20-Apr-03 5:34
ATC20-Apr-03 5:34 
GeneralRe: With your helps, it works now! Pin
ATC22-Apr-03 9:03
ATC22-Apr-03 9:03 
GeneralSplitterWnd - Moving the bar Pin
Shutter19-Apr-03 5:26
Shutter19-Apr-03 5:26 
GeneralQuestion about const pointer. Pin
George219-Apr-03 4:04
George219-Apr-03 4:04 
GeneralRe: Question about const pointer. Pin
John M. Drescher19-Apr-03 5:01
John M. Drescher19-Apr-03 5:01 
GeneralRe: Question about const pointer. Pin
George219-Apr-03 18:17
George219-Apr-03 18:17 
GeneralRe: Question about const pointer. Pin
Phil Hamer19-Apr-03 16:44
Phil Hamer19-Apr-03 16:44 
GeneralRe: Question about const pointer. Pin
George219-Apr-03 18:19
George219-Apr-03 18:19 
GeneralModeless Dialog to back and taskbar button Pin
Mathias S.19-Apr-03 2:07
Mathias S.19-Apr-03 2:07 
GeneralRe: Modeless Dialog to back and taskbar button Pin
John M. Drescher19-Apr-03 3:46
John M. Drescher19-Apr-03 3:46 
GeneralRe: Modeless Dialog to back and taskbar button Pin
Michael Dunn19-Apr-03 5:19
sitebuilderMichael Dunn19-Apr-03 5:19 
GeneralWorker-Thread in Win32 Application Pin
ZarrinPour19-Apr-03 1:16
ZarrinPour19-Apr-03 1:16 
GeneralRe: Worker-Thread in Win32 Application Pin
Bartosz Bien19-Apr-03 1:32
Bartosz Bien19-Apr-03 1:32 

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.