1 // PasswordDialog.cpp 2 3 #include "StdAfx.h" 4 5 // For compilers that support precompilation, includes "wx/wx.h". 6 #include "wx/wxprec.h" 7 8 #ifdef __BORLANDC__ 9 #pragma hdrstop 10 #endif 11 12 // for all others, include the necessary headers (this file is usually all you 13 // need because it includes almost all "standard" wxWidgets headers) 14 #ifndef WX_PRECOMP 15 #include "wx/wx.h" 16 #endif 17 18 #include "Windows/Control/DialogImpl.h" 19 20 #include "ListViewDialogRes.h" 21 22 class CListViewDialogImpl : public NWindows::NControl::CModalDialogImpl 23 { 24 public: CListViewDialogImpl(NWindows::NControl::CModalDialog * dialog,wxWindow * parent,int id)25 CListViewDialogImpl(NWindows::NControl::CModalDialog *dialog,wxWindow * parent,int id) : 26 CModalDialogImpl(dialog,parent, id, wxT("ListView"), wxDefaultPosition, wxDefaultSize, 27 wxDEFAULT_DIALOG_STYLE | wxRESIZE_BORDER | wxMAXIMIZE_BOX | wxMINIMIZE_BOX) 28 29 { 30 31 wxBoxSizer* topsizer = new wxBoxSizer(wxVERTICAL); 32 33 wxListCtrl *list = new wxListCtrl(this, IDC_LISTVIEW_LIST, wxDefaultPosition, wxSize(645,195), wxLC_REPORT | wxLC_NO_HEADER); 34 35 topsizer->Add(list, 1, wxALL|wxEXPAND, 5); 36 37 topsizer->Add(CreateButtonSizer(wxOK|wxCANCEL), 0, wxALL|wxEXPAND, 5); 38 39 this->OnInit(); 40 41 SetSizer(topsizer); // use the sizer for layout 42 topsizer->SetSizeHints(this); // set size hints to honour minimum size 43 } 44 private: 45 // Any class wishing to process wxWindows events must use this macro 46 DECLARE_EVENT_TABLE() 47 }; 48 49 REGISTER_DIALOG(IDD_DIALOG_LISTVIEW,CListViewDialog,0) 50 51 BEGIN_EVENT_TABLE(CListViewDialogImpl, wxDialog) 52 EVT_BUTTON(wxID_ANY, CModalDialogImpl::OnAnyButton) 53 EVT_CHECKBOX(wxID_ANY, CModalDialogImpl::OnAnyButton) 54 END_EVENT_TABLE() 55 56