#pragma once ///////////////////////////////////////////////////////////////////// // DialogWindow.h - Demonstrate how to use ATL Window Classes to // // build a Dialog window application. // // // // Jim Fawcett, CSE775 - Distributed Objects, Spring 2007 // ///////////////////////////////////////////////////////////////////// /* * Module Operations * ================= * This project illustrates how to use the ATL Windows classes to * simplify the creation of a Dialog window that hosts controls. * * Build Process * ============= * Required Files: * DialogWindow.h, DialogWindow.cpp, stdafx.h, stdafx.cpp * atlctrls.h, atlapp.h, atlgdi.h, atlres.h, atluser.h, atlwinx.h * DialogWindow.ico, DialogWindow.rc, small.ico * * Build Command: * devenv DialogWindow.vcproj /rebuild debug * * Maintenance History * =================== * ver 1.0 : 28 Feb 07 * - first release */ #include "resource.h" #include "atlctrls.h" #include class CDialog : public CAxDialogImpl { public: BEGIN_MSG_MAP(CDialog) MESSAGE_HANDLER(WM_INITDIALOG, OnInitDialog) COMMAND_ID_HANDLER(IDOK, OnOK); COMMAND_ID_HANDLER(IDCANCEL, OnCancel); END_MSG_MAP() enum { IDD = IDD_DIALOG1 }; CDialog(){} private: HWND hListBox; CListBox listBox; CEdit edit; LRESULT OnInitDialog(UINT, WPARAM, LPARAM, BOOL&); LRESULT OnOK(WORD, UINT, HWND, BOOL&); LRESULT OnCancel(WORD, UINT, HWND, BOOL&); };