Programming - cpueblo.com

ATL 기본 다이얼로그


글쓴이 : 유광희 날짜 : 2011-01-21 (금) 16:10 조회 : 20790
#include "Resource.h"
#include 		// for atlwin.h
#include 			// for CDialogImpl
#include 			// for atlddx.h
#include 			// for BEGIN_DDX_MAP, END_DDX_MAP
#include 		
#include 
#include 	

class CMainDlg : public CDialogImpl,
	public CWinDataExchange
{
public:
	CMainDlg();
	virtual ~CMainDlg();

	enum { IDD = IDD_DLG_MAIN };

	// DataExchange
	BEGIN_DDX_MAP(CMainDlg)
		// 추가 참조 예시
		// DDX_CONTROL_HANDLE(IDC_MAINDLG_STATIC1,		m_Static1)
		// DDX_CONTROL(IDC_BUTTON1,						m_Button1)
    END_DDX_MAP()

	// Message
    BEGIN_MSG_MAP(CMainDlg)
        MESSAGE_HANDLER(WM_INITDIALOG, OnInitDialog)
		MESSAGE_HANDLER(WM_DESTROY, OnDestroy)

		// 추가 참조 예시
		// COMMAND_HANDLER_EX(IDCANCEL, BN_CLICKED, OnIdcancelBnClicked)
		// NOTIFY_HANDLER(IDC_LIST, LVN_COLUMNCLICK, OnLvnColumnclickList)
    END_MSG_MAP()

protected:
	LRESULT OnInitDialog(UINT uMsg, WPARAM wParam, LPARAM lParam, BOOL& bHandled);
	LRESULT OnDestroy(UINT uMsg, WPARAM wParam, LPARAM lParam, BOOL& bHandled);


protected:
	// 참조 예시
	// CStatic	m_Static1;
	// LRESULT OnIdcancelBnClicked(WORD wNotifyCode, WORD wID, HWND hWndCtl)
	// LRESULT OnLvnColumnclickList(int );
};

#include "stdafx.h"
#include "MainDlg.h"

CMainDlg :: CMainDlg()
{
}

CMainDlg :: ~CMainDlg()
{
}


LRESULT CMainDlg :: OnInitDialog(UINT uMsg, WPARAM wParam, LPARAM lParam, BOOL& bHandled)
{
	DoDataExchange(DDX_LOAD);
	return 0;
}
LRESULT CMainDlg :: OnDestroy(UINT uMsg, WPARAM wParam, LPARAM lParam, BOOL& bHandled)
{
	return 0;
}