// [!output VIEW_HEADER] : [!output VIEW_CLASS] クラスのインターフェイス // #pragma once [!if CONTAINER || CONTAINER_SERVER] class [!output CONTAINER_ITEM_CLASS]; [!endif] [!if OLEDB_RECORD_VIEW || ODBC_RECORD_VIEW] class [!output ROWSET_CLASS]; [!endif] class [!output VIEW_CLASS] : public [!output VIEW_BASE_CLASS] { protected: // シリアル化からのみ作成します。 [!output VIEW_CLASS](); DECLARE_DYNCREATE([!output VIEW_CLASS]) [!if OLEDB_RECORD_VIEW || FORM_VIEW || ODBC_RECORD_VIEW] public: enum{ IDD = IDD_[!output UPPER_CASE_SAFE_PROJECT_IDENTIFIER_NAME]_FORM }; [!if OLEDB_RECORD_VIEW || ODBC_RECORD_VIEW] [!output ROWSET_CLASS]* m_pSet; [!endif] [!endif] // 属性 public: [!output DOC_CLASS]* GetDocument() const; [!if CONTAINER || CONTAINER_SERVER] [!if !RICH_EDIT_VIEW] // m_pSelection は、現在の [!output CONTAINER_ITEM_CLASS] に対する選択を保持しています。 // 多くのアプリケーションでこのようなメンバ変数は、複数の選択や // [!output CONTAINER_ITEM_CLASS] オブジェクトではないオブジェクトの選択を十分に表現できません。 // この機構は選択機能を応用しようとするプログラマの理解を助けるた // めに組み込まれています。 // TODO: この選択方法をアプリケーションに適した方法に置き換えてください。 [!output CONTAINER_ITEM_CLASS]* m_pSelection; [!endif] [!endif] // 操作 public: // オーバーライド public: [!if OLEDB_RECORD_VIEW] virtual CRowset<>* OnGetRowset(); [!endif] [!if ODBC_RECORD_VIEW] virtual CRecordset* OnGetRecordset(); [!endif] [!if !TREE_VIEW && !LIST_VIEW && !HTML_VIEW && !HTML_EDITVIEW && !RICH_EDIT_VIEW && !EDIT_VIEW && !FORM_VIEW && !OLEDB_RECORD_VIEW && !ODBC_RECORD_VIEW] virtual void OnDraw(CDC* pDC); // このビューを描画するためにオーバーライドされます。 [!endif] [!if PRINTING] [!if TREE_VIEW || LIST_VIEW] virtual void OnDraw(CDC* pDC); // このビューを描画するためにオーバーライドされます。 [!endif] [!endif] virtual BOOL PreCreateWindow(CREATESTRUCT& cs); protected: [!if FORM_VIEW || OLEDB_RECORD_VIEW || ODBC_RECORD_VIEW] virtual void DoDataExchange(CDataExchange* pDX); // DDX/DDV サポート [!endif] [!if SCROLL_VIEW || CONTAINER || CONTAINER_SERVER || OLEDB_RECORD_VIEW || TREE_VIEW || LIST_VIEW || FORM_VIEW || HTML_VIEW || ODBC_RECORD_VIEW] virtual void OnInitialUpdate(); // 構築後に初めて呼び出されます。 [!endif] [!if PRINTING] [!if !HTML_VIEW && !HTML_EDITVIEW] virtual BOOL OnPreparePrinting(CPrintInfo* pInfo); [!endif] [!if !RICH_EDIT_VIEW && !HTML_VIEW && !HTML_EDITVIEW] virtual void OnBeginPrinting(CDC* pDC, CPrintInfo* pInfo); virtual void OnEndPrinting(CDC* pDC, CPrintInfo* pInfo); [!endif] [!if FORM_VIEW || ACTIVE_DOC_CONTAINER] virtual void OnPrint(CDC* pDC, CPrintInfo* pInfo); [!endif] [!endif] [!if CONTAINER || CONTAINER_SERVER] [!if !RICH_EDIT_VIEW] virtual BOOL IsSelected(const CObject* pDocItem) const;// コンテナ サポート [!endif] [!endif] // 実装 public: virtual ~[!output VIEW_CLASS](); #ifdef _DEBUG virtual void AssertValid() const; virtual void Dump(CDumpContext& dc) const; #endif protected: // 生成された、メッセージ割り当て関数 protected: [!if CONTAINER || CONTAINER_SERVER] afx_msg void OnDestroy(); [!if !RICH_EDIT_VIEW] afx_msg void OnSetFocus(CWnd* pOldWnd); afx_msg void OnSize(UINT nType, int cx, int cy); afx_msg void OnInsertObject(); afx_msg void OnCancelEditCntr(); afx_msg void OnFilePrint(); [!endif] [!endif] [!if MINI_SERVER || FULL_SERVER || CONTAINER_SERVER] afx_msg void OnCancelEditSrvr(); [!endif] [!if PROJECT_STYLE_EXPLORER] [!if LIST_VIEW] afx_msg void OnStyleChanged(int nStyleType, LPSTYLESTRUCT lpStyleStruct); [!endif] [!endif] [!if ACTIVE_DOC_CONTAINER] afx_msg void OnFilePrintPreview(); [!if !RICH_EDIT_VIEW] afx_msg void OnFilePrintPreviewUIUpdate(CCmdUI* pCmdUI); [!endif] [!endif] [!if HTML_EDITVIEW] DECLARE_DHTMLEDITING_CMDMAP([!output VIEW_CLASS]) [!endif] DECLARE_MESSAGE_MAP() }; #ifndef _DEBUG // [!output VIEW_IMPL] のデバッグ バージョン inline [!output DOC_CLASS]* [!output VIEW_CLASS]::GetDocument() const { return reinterpret_cast<[!output DOC_CLASS]*>(m_pDocument); } #endif