// MainDialog.h : メイン ダイアログ(ダイアログベース アプリの主ウィンドウ) #pragma once #include "resource.h" #include "LabelLayout.h" #include "Canvas.h" class CMainDialog : public CDialog { public: CMainDialog(CWnd* pParent = nullptr); enum { IDD = IDD_MAIN_DIALOG }; protected: CLabelLayout m_layout; // データモデル CCanvas m_canvas; // 編集キャンバス(子ウィンドウ) CString m_path; // 現在の .otz パス(空 = 無題) void DoDataExchange(CDataExchange* pDX) override; BOOL OnInitDialog() override; void OnOK() override; // Enter での誤終了を防ぐ(何もしない) void OnCancel() override; // 終了(保存確認) void UpdateCaption(); void UpdateTemplateCheck(); // 「原紙を印刷」チェックをモデルに合わせる BOOL ConfirmDiscardIfDirty(); BOOL DoSave(BOOL bForceDialog); afx_msg void OnFileNew(); afx_msg void OnFileOpen(); afx_msg void OnFileSave(); afx_msg void OnFileSaveAs(); afx_msg void OnInsertText(); afx_msg void OnInsertImage(); afx_msg void OnInsertRect(); afx_msg void OnInsertLine(); afx_msg void OnEditProperties(); afx_msg void OnEditDeleteItem(); afx_msg void OnPaperSize(); afx_msg void OnViewZoomIn(); afx_msg void OnViewZoomOut(); afx_msg void OnFilePrint(); afx_msg void OnAppAbout(); afx_msg void OnItemCopy(); afx_msg void OnItemPaste(); afx_msg void OnItemDuplicate(); afx_msg void OnItemFront(); afx_msg void OnItemBack(); afx_msg void OnAlignMenu(); afx_msg void OnAlignCmd(UINT nID); afx_msg void OnToggleGrid(); afx_msg void OnTemplateLoad(); afx_msg void OnTemplateClear(); afx_msg void OnTogglePrintTemplate(); DECLARE_MESSAGE_MAP() };