많은 연구와 실험을 통해이를 구현하는 방법을 찾았습니다.
내 이전 문서의 CHtmlView에서 상속 된 CMyHtmlView라는 새로운보기가 사용되었습니다.
class CReportWebView : public CHtmlView
{
protected: // create from serialization only
CReportWebView();
int m_reportID;
DECLARE_DYNCREATE(CReportWebView)
public:
// Overrides
// ClassWizard generated virtual function overrides
//{{AFX_VIRTUAL(CReportWebView)
protected:
virtual void OnInitialUpdate(); // called first time after construct
virtual void OnFilePrintPreview();
virtual void OnFilePrint();
virtual void OnNavigateComplete2(LPCTSTR strURL);
//}}AFX_VIRTUAL
// Implementation
public:
virtual ~CReportWebView();
//{{AFX_MSG(CReportWebView)
// NOTE - the ClassWizard will add and remove member functions here.
//}}AFX_MSG
DECLARE_MESSAGE_MAP()
};
자세한 내용은 other question
는했지만 CHtmlView 봤어 내에서 찾을 수 있습니까? 너 뭐 해봤 니? – codah
예, 인쇄 미리보기 자료가 없습니다 : ( –
보고서를로드 한 후 '인쇄 미리보기'명령 ID를 임베드 된 'CHtmlView'로 보내보십시오. ExecWB (OLECMDID_PRINTPREVIEW, OLECMDEXECOPT_DODEFAULT, NULL, NULL); – user1793036