Advertisement
Guest User

dlgabout cpp and h source

a guest
Oct 19th, 2012
112
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C++ 2.12 KB | None | 0 0
  1. ===dlgAbout.h===
  2. #ifndef DLGABOUT_H
  3. #define DLGABOUT_H
  4.  
  5. //(*Headers(dlgAbout)
  6. #include <wx/stattext.h>
  7. #include <wx/button.h>
  8. #include <wx/dialog.h>
  9. //*)
  10.  
  11. class dlgAbout: public wxDialog
  12. {
  13.     public:
  14.  
  15.         dlgAbout(wxWindow* parent,wxWindowID id=wxID_ANY,const wxPoint& pos=wxDefaultPosition,const wxSize& size=wxDefaultSize);
  16.         virtual ~dlgAbout();
  17.  
  18.         //(*Declarations(dlgAbout)
  19.         wxButton* btnClose;
  20.         wxStaticText* StaticText1;
  21.         //*)
  22.  
  23.     protected:
  24.  
  25.         //(*Identifiers(dlgAbout)
  26.         static const long ID_BUTTON1;
  27.         static const long ID_STATICTEXT1;
  28.         //*)
  29.  
  30.     private:
  31.  
  32.         //(*Handlers(dlgAbout)
  33.         void OnCheckBox1Click(wxCommandEvent& event);
  34.         void OnbtnCloseClick(wxCommandEvent& event);
  35.         void OnInit(wxInitDialogEvent& event);
  36.         //*)
  37.  
  38.         DECLARE_EVENT_TABLE()
  39. };
  40.  
  41. #endif
  42.  
  43. ===dlgAbout.cpp===
  44. #include "dlgAbout.h"
  45.  
  46. //(*InternalHeaders(dlgAbout)
  47. #include <wx/intl.h>
  48. #include <wx/string.h>
  49. #include <wx/stattext.h>
  50. //*)
  51.  
  52. //(*IdInit(dlgAbout)
  53. const long dlgAbout::ID_BUTTON1 = wxNewId();
  54. const long dlgAbout::ID_STATICTEXT1 = wxNewId();
  55. //*)
  56.  
  57. BEGIN_EVENT_TABLE(dlgAbout,wxDialog)
  58.     //(*EventTable(dlgAbout)
  59.     //*)
  60. END_EVENT_TABLE()
  61.  
  62. dlgAbout::dlgAbout(wxWindow* parent,wxWindowID id,const wxPoint& pos,const wxSize& size)
  63. {
  64.     //(*Initialize(dlgAbout)
  65.     Create(parent, wxID_ANY, _("About"), wxDefaultPosition, wxDefaultSize, wxDEFAULT_DIALOG_STYLE, _T("wxID_ANY"));
  66.     SetClientSize(wxSize(173,127));
  67.     btnClose = new wxButton(this, ID_BUTTON1, _("Close"), wxPoint(88,96), wxDefaultSize, 0, wxDefaultValidator, _T("ID_BUTTON1"));
  68.     StaticText1 = new wxStaticText(this, ID_STATICTEXT1, _("Label"), wxPoint(8,8), wxDefaultSize, 0, _T("ID_STATICTEXT1"));
  69.  
  70.     Connect(ID_BUTTON1,wxEVT_COMMAND_BUTTON_CLICKED,(wxObjectEventFunction)&dlgAbout::OnbtnCloseClick);
  71.     Connect(wxID_ANY,wxEVT_INIT_DIALOG,(wxObjectEventFunction)&dlgAbout::OnInit);
  72.     //*)
  73. }
  74.  
  75. dlgAbout::~dlgAbout()
  76. {
  77.     //(*Destroy(dlgAbout)
  78.     //*)
  79. }
  80.  
  81.  
  82. void dlgAbout::OnCheckBox1Click(wxCommandEvent& event)
  83. {
  84. }
  85.  
  86. void dlgAbout::OnbtnCloseClick(wxCommandEvent& event)
  87. {
  88.     this->Destroy();
  89. }
  90.  
  91. void dlgAbout::OnInit(wxInitDialogEvent& event)
  92. {
  93. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement