void SetPrntOrientation()
{
/*dmOrientation
For printer devices only,
selects the orientation of the paper.
This member can be either
DMORIENT_PORTRAIT (1) or
DMORIENT_LANDSCAPE (2).
纵向: portrait
横向: landscape orientation
*/ 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_PORTRAIT;//DMORIENT_LANDSCAPE;
::GlobalUnlock(m_hDevMode);
}}
{
/*dmOrientation
For printer devices only,
selects the orientation of the paper.
This member can be either
DMORIENT_PORTRAIT (1) or
DMORIENT_LANDSCAPE (2).
纵向: portrait
横向: landscape orientation
*/ 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_PORTRAIT;//DMORIENT_LANDSCAPE;
::GlobalUnlock(m_hDevMode);
}}
解决方案 »
免费领取超大流量手机卡,每月29元包185G流量+100分钟通话, 中国电信官方发货