#pragma once
#include "afxwin.h"


// CEditArticleDlg dialog

class CEditArticleDlg : public CDialog
{
	DECLARE_DYNAMIC(CEditArticleDlg)

public:
	CEditArticleDlg(CWnd* pParent = NULL);   // standard constructor
	virtual ~CEditArticleDlg();

// Dialog Data
	enum { IDD = IDD_EDITARTICLE_DLG };

protected:
	virtual void DoDataExchange(CDataExchange* pDX);    // DDX/DDV support

	DECLARE_MESSAGE_MAP()
public:
	CString mTitle;
	CString mText;
	CStatic mTitleGroup;
	CEdit mTitleEdit;
	CStatic mTextGroup;
	CEdit mTextEdit;
	CButton mApplyButton;
	CButton mNewArtButton;

	int mSizeInited;
	virtual BOOL OnInitDialog();
	afx_msg void OnSize(UINT nType, int cx, int cy);
	CStatic mSummaryGroup;
	CEdit mSummaryEdit;
	CString mSummary;

	CArticle* mCurArticle;
	void SetCurArticle( CArticle* article )
	{
		mCurArticle = article;
		Update();
	}

	void Update();
	afx_msg void OnBnClickedOk();
	afx_msg BOOL OnEraseBkgnd(CDC* pDC);
	afx_msg void OnBnClickedNewArticle();
	CString mKeywords;
};
