话说,解决了 另存为对话位置 的帖子,不应该再踢类似问题了,
但是,但是,我发现,打印对话框的弹出的方法不一样,所以,只好再开贴了。BOOL CPrintView::OnPreparePrinting(CPrintInfo* pInfo)
{
if(DoPreparePrinting(pInfo)) //词句就是打印对话框
{
return TRUE;
}
else
{
GetParent()->DestroyWindow();
return FALSE;
}
}弹出的也是模式的,请问,如果修改对话框的位置呢?高手顶进!
但是,但是,我发现,打印对话框的弹出的方法不一样,所以,只好再开贴了。BOOL CPrintView::OnPreparePrinting(CPrintInfo* pInfo)
{
if(DoPreparePrinting(pInfo)) //词句就是打印对话框
{
return TRUE;
}
else
{
GetParent()->DestroyWindow();
return FALSE;
}
}弹出的也是模式的,请问,如果修改对话框的位置呢?高手顶进!
HWND hdlg, // handle to the dialog box window
UINT uiMsg, // message identifier
WPARAM wParam, // message parameter
LPARAM lParam // message parameter
)
{
if (uiMsg==WM_INITDIALOG)
{
//::MessageBox(NULL,"Dd",NULL,0);
::MoveWindow(hdlg,100,0,300,400,FALSE);
}
return 0l;
}BOOL CPrintView::OnPreparePrinting(CPrintInfo* pInfo)
{
pInfo->m_pPD->m_pd.Flags=PD_ENABLEPRINTHOOK;
pInfo->m_pPD->m_pd.lpfnPrintHook=SetupHookProc;
if(DoPreparePrinting(pInfo)) //词句就是打印对话框
{
return TRUE;
} else
{
GetParent()->DestroyWindow();
return FALSE;
}
}
void CPrintView::PrinterPreview()
{
GetParent()->ShowWindow(SW_SHOW);
GetParent()->MoveWindow(100,100,100,100);
CView::OnFilePrintPreview();
}
HWND hdlg, // handle to the dialog box window
UINT uiMsg, // message identifier
WPARAM wParam, // message parameter
LPARAM lParam // message parameter
)
{
if (uiMsg==WM_INITDIALOG)
{
//::MessageBox(NULL,"Dd",NULL,0);
::MoveWindow(hdlg,100,0,300,400,FALSE);
}
return 0l;
} BOOL CPrintView::OnPreparePrinting(CPrintInfo* pInfo)
{
pInfo->m_pPD->m_pd.Flags=PD_ENABLEPRINTHOOK;
pInfo->m_pPD->m_pd.lpfnPrintHook=SetupHookProc;
if(DoPreparePrinting(pInfo)) //词句就是打印对话框
{
return TRUE;
} else
{
GetParent()->DestroyWindow();
return FALSE;
}
}