Click here to Skip to main content
16,005,343 members
Home / Discussions / C / C++ / MFC
   

C / C++ / MFC

 
GeneralFile Browser Control Pin
RuiSantiago30-Jul-02 0:40
RuiSantiago30-Jul-02 0:40 
GeneralRe: File Browser Control Pin
PJ Arends30-Jul-02 0:59
professionalPJ Arends30-Jul-02 0:59 
GeneralRe: File Browser Control Pin
RuiSantiago30-Jul-02 1:03
RuiSantiago30-Jul-02 1:03 
GeneralRe: File Browser Control Pin
Ruca1-Aug-02 6:04
Ruca1-Aug-02 6:04 
GeneralRe: File Browser Control Pin
PJ Arends1-Aug-02 6:28
professionalPJ Arends1-Aug-02 6:28 
GeneralRe: File Browser Control Pin
Sharad Ganesh30-Jul-02 1:50
Sharad Ganesh30-Jul-02 1:50 
QuestionHow to set the print orientation on printer dialog ? Pin
Yo Yo~~30-Jul-02 0:13
sussYo Yo~~30-Jul-02 0:13 
AnswerRe: How to set the print orientation on printer dialog ? Pin
Sharad Ganesh30-Jul-02 2:01
Sharad Ganesh30-Jul-02 2:01 
hi,

=>
To get the orientation u can do:

void GetInitOrientation()
{
PRINTDLG pd;
pd.lStructSize = (DWORD) sizeof(PRINTDLG);
if( GetPrinterDeviceDefaults(&pd)) {
DEVMODE FAR* pDevMode = (DEVMODE FAR*)::GlobalLock(m_hDevMode);

if(pDevMode) {
nStartupOrientation = pDevMode->dmOrientation;
::GlobalUnlock(m_hDevMode);
}
}
}

=>
To set the orientation:

This does not actually invoke the print dialog

void SetOrientation(int mode)
{
PRINTDLG pd;
pd.lStructSize = (DWORD) sizeof(PRINTDLG);
if( GetPrinterDeviceDefaults(&pd)) {
DEVMODE FAR* pDevMode = (DEVMODE FAR*)::GlobalLock(m_hDevMode);

if(pDevMode) {
switch (mode)
{
case 1:
pDevMode->dmOrientation = DMORIENT_LANDSCAPE;
break;

case 0:
default:
pDevMode->dmOrientation = DMORIENT_PORTRAIT;
break;
};
::GlobalUnlock(m_hDevMode);
}
}
}


hope this helps,
Sharad Ganesh
GeneralI am Sergeant Destructor! (best practice Q) Pin
Paul Watson29-Jul-02 23:58
sitebuilderPaul Watson29-Jul-02 23:58 
GeneralRe: I am Sergeant Destructor! (best practice Q) Pin
BlackSmith30-Jul-02 3:40
BlackSmith30-Jul-02 3:40 
GeneralRe: I am Sergeant Destructor! (best practice Q) Pin
Andrew Peace30-Jul-02 7:27
Andrew Peace30-Jul-02 7:27 
GeneralRe: I am Sergeant Destructor! (best practice Q) Pin
Paul Watson30-Jul-02 11:35
sitebuilderPaul Watson30-Jul-02 11:35 
GeneralCEdit style Pin
Renjith Ramachandran29-Jul-02 23:46
Renjith Ramachandran29-Jul-02 23:46 
GeneralRe: CEdit style Pin
PJ Arends30-Jul-02 0:28
professionalPJ Arends30-Jul-02 0:28 
GeneralRe: CEdit style Pin
Renjith Ramachandran30-Jul-02 0:49
Renjith Ramachandran30-Jul-02 0:49 
GeneralQuestion about auto_ptr Pin
pankajdaga29-Jul-02 23:33
pankajdaga29-Jul-02 23:33 
GeneralRe: Question about auto_ptr Pin
Daniel Lohmann30-Jul-02 2:25
Daniel Lohmann30-Jul-02 2:25 
GeneralMulti-SDI with MFC Pin
Kirill Kovalenko29-Jul-02 22:56
Kirill Kovalenko29-Jul-02 22:56 
GeneralRe: Multi-SDI with MFC Pin
Alexandru Savescu29-Jul-02 23:29
Alexandru Savescu29-Jul-02 23:29 
GeneralRe: Multi-SDI with MFC Pin
Kirill Kovalenko29-Jul-02 23:38
Kirill Kovalenko29-Jul-02 23:38 
GeneralRe: Multi-SDI with MFC Pin
[James Pullicino]30-Jul-02 2:43
[James Pullicino]30-Jul-02 2:43 
GeneralRe: Multi-SDI with MFC Pin
Kirill Kovalenko30-Jul-02 3:30
Kirill Kovalenko30-Jul-02 3:30 
GeneralRe: Multi-SDI with MFC Pin
Giles30-Jul-02 7:47
Giles30-Jul-02 7:47 
GeneralHELP!!!! ActiveX in Visual C++ Pin
mistika29-Jul-02 22:51
mistika29-Jul-02 22:51 
GeneralRe: HELP!!!! ActiveX in Visual C++ Pin
KingsGambit30-Jul-02 6:29
KingsGambit30-Jul-02 6:29 

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.