void frmCANALSession::CreateControls() { ////@begin frmCANALSession content construction frmCANALSession* itemFrame1 = this; wxMenuBar* menuBar = new wxMenuBar; wxMenu* itemMenu35 = new wxMenu; itemMenu35->Append(ID_MENUITEM_CANAL_LOAD_MSG_LIST, _("Load CAN message list from file..."), _T(""), wxITEM_NORMAL); itemMenu35->Append(ID_MENUITEM_CANAL_SAVE_MSG_LIST, _("Save CAN message list to file..."), _T(""), wxITEM_NORMAL); itemMenu35->AppendSeparator(); itemMenu35->Append(ID_MENUITEM_CANAL_LOAD_TRANSMISSION_SET, _("Load transmission set from file..."), _T(""), wxITEM_NORMAL); itemMenu35->Append(ID_MENUITEM_CANAL_SAVE_TRANSMISSION_SET, _("Save transmission set to file..."), _T(""), wxITEM_NORMAL); itemMenu35->AppendSeparator(); itemMenu35->Append(ID_MENUITEM_CANAL_EXIT, _("Exit"), _T(""), wxITEM_NORMAL); menuBar->Append(itemMenu35, _("File")); wxMenu* itemMenu43 = new wxMenu; itemMenu43->Append(ID_MENUITEM_CANAL_CUT, _("Cut"), _T(""), wxITEM_NORMAL); itemMenu43->Append(ID_MENUITEM_CANAL_COPY, _("Copy"), _T(""), wxITEM_NORMAL); itemMenu43->Append(ID_MENUITEM_CANAL_PASTE, _("Paste"), _T(""), wxITEM_NORMAL); itemMenu43->AppendSeparator(); menuBar->Append(itemMenu43, _("Edit")); wxMenu* itemMenu48 = new wxMenu; itemMenu48->Append(ID_MENUITEM_CANAL_LOG, _("Message Log"), _T(""), wxITEM_RADIO); itemMenu48->Check(ID_MENUITEM_CANAL_LOG, true); itemMenu48->Append(ID_MENUITEM_CANAL_COUNT, _("Message Count"), _T(""), wxITEM_RADIO); menuBar->Append(itemMenu48, _("View")); wxMenu* itemMenu51 = new wxMenu; itemMenu51->Append(ID_MENUITEM_CANAL_AUTO_REPLY, _("Auto Reply Settings..."), _T(""), wxITEM_NORMAL); itemMenu51->Append(ID_MENUITEM_CANAL_BURST_COUNT, _("Set Burst Count..."), _T(""), wxITEM_NORMAL); menuBar->Append(itemMenu51, _("Tools")); wxMenu* itemMenu54 = new wxMenu; itemMenu54->Append(ID_MENUITEM_CANAL_HELP, _("VSCP-Works Help"), _T(""), wxITEM_RADIO); itemMenu54->Append(ID_MENUITEM_CANAL_FAQ, _("Frequently Asked Questions"), _T(""), wxITEM_NORMAL); itemMenu54->Append(ID_MENUITEM_CANAL_SHORTCUTS, _("Keyboard shortcuts"), _T(""), wxITEM_NORMAL); itemMenu54->AppendSeparator(); itemMenu54->Append(ID_MENUITEM_CANAL_THANKS, _("Thanks..."), _T(""), wxITEM_NORMAL); itemMenu54->Append(ID_MENUITEM_CANAL_CREDITS, _("Credits..."), _T(""), wxITEM_NORMAL); itemMenu54->AppendSeparator(); itemMenu54->Append(ID_MENUITEM_CANAL_VSCP_SITE, _("Go to VSCP site"), _T(""), wxITEM_NORMAL); itemMenu54->AppendSeparator(); itemMenu54->Append(ID_MENUITEM_CANAL_ABOUT, _("About"), _T(""), wxITEM_NORMAL); menuBar->Append(itemMenu54, _("Help")); itemFrame1->SetMenuBar(menuBar); wxBoxSizer* itemBoxSizer2 = new wxBoxSizer(wxVERTICAL); itemFrame1->SetSizer(itemBoxSizer2); wxBoxSizer* itemBoxSizer3 = new wxBoxSizer(wxVERTICAL); itemBoxSizer2->Add(itemBoxSizer3, 0, wxGROW|wxALL, 2); m_ctrlGridReceive = new wxGrid( itemFrame1, ID_GRID_RECEIVE, wxDefaultPosition, wxSize(800, 300), wxSUNKEN_BORDER|wxHSCROLL|wxVSCROLL ); m_ctrlGridReceive->SetBackgroundColour(wxColour(251, 252, 170)); m_ctrlGridReceive->SetFont(wxFont(8, wxDEFAULT, wxNORMAL, wxBOLD, false, wxT(""))); m_ctrlGridReceive->SetDefaultColSize(100); m_ctrlGridReceive->SetDefaultRowSize(22); m_ctrlGridReceive->SetColLabelSize(22); m_ctrlGridReceive->SetRowLabelSize(30); m_ctrlGridReceive->CreateGrid(1, 8, wxGrid::wxGridSelectRows); itemBoxSizer3->Add(m_ctrlGridReceive, 0, wxGROW|wxALL, 2); wxBoxSizer* itemBoxSizer5 = new wxBoxSizer(wxVERTICAL); itemBoxSizer2->Add(itemBoxSizer5, 0, wxGROW|wxALL, 2); wxBoxSizer* itemBoxSizer6 = new wxBoxSizer(wxHORIZONTAL); itemBoxSizer5->Add(itemBoxSizer6, 0, wxGROW|wxALL, 0); wxBoxSizer* itemBoxSizer7 = new wxBoxSizer(wxVERTICAL); itemBoxSizer6->Add(itemBoxSizer7, 0, wxGROW|wxALL, 5); m_btnEdit = new wxBitmapButton; m_btnEdit->Create( itemFrame1, ID_BITMAPBUTTON_CANAL_EDIT, itemFrame1->GetBitmapResource(wxT("open.xpm")), wxDefaultPosition, wxDefaultSize, wxBU_AUTODRAW ); if (frmCANALSession::ShowToolTips()) m_btnEdit->SetToolTip(_("Edit selected line")); itemBoxSizer7->Add(m_btnEdit, 0, wxALIGN_CENTER_HORIZONTAL|wxALL, 0); m_btnDelete = new wxBitmapButton; m_btnDelete->Create( itemFrame1, ID_BITMAPBUTTONID_MENUITEM_CANAL_DELETE, itemFrame1->GetBitmapResource(wxT("cut.xpm")), wxDefaultPosition, wxDefaultSize, wxBU_AUTODRAW ); if (frmCANALSession::ShowToolTips()) m_btnDelete->SetToolTip(_("Delete selected line")); itemBoxSizer7->Add(m_btnDelete, 0, wxALIGN_CENTER_HORIZONTAL|wxALL, 0); itemBoxSizer7->Add(5, 5, 0, wxALIGN_CENTER_HORIZONTAL|wxALL, 2); m_btnLoadSet = new wxBitmapButton; m_btnLoadSet->Create( itemFrame1, ID_BITMAPBUTTONID_MENUITEM_CANAL_LOAD, itemFrame1->GetBitmapResource(wxT("copy.xpm")), wxDefaultPosition, wxDefaultSize, wxBU_AUTODRAW ); if (frmCANALSession::ShowToolTips()) m_btnLoadSet->SetToolTip(_("Load transmission set from file...")); itemBoxSizer7->Add(m_btnLoadSet, 0, wxALIGN_CENTER_HORIZONTAL|wxALL, 0); m_btnSaveSet = new wxBitmapButton; m_btnSaveSet->Create( itemFrame1, ID_BITMAPBUTTONID_MENUITEM_CANAL_SAVE, itemFrame1->GetBitmapResource(wxT("filesaveas.xpm")), wxDefaultPosition, wxDefaultSize, wxBU_AUTODRAW ); if (frmCANALSession::ShowToolTips()) m_btnSaveSet->SetToolTip(_("Save transmission set to file...")); itemBoxSizer7->Add(m_btnSaveSet, 0, wxALIGN_CENTER_HORIZONTAL|wxALL, 0); wxBoxSizer* itemBoxSizer13 = new wxBoxSizer(wxVERTICAL); itemBoxSizer6->Add(itemBoxSizer13, 0, wxGROW|wxALL, 5); m_ctrlGridTransmission = new wxGrid( itemFrame1, ID_GRID_TRANSMISSION, wxDefaultPosition, wxSize(750, 100), wxHSCROLL|wxVSCROLL ); m_ctrlGridTransmission->SetFont(wxFont(8, wxDEFAULT, wxNORMAL, wxBOLD, false, wxT(""))); m_ctrlGridTransmission->SetDefaultColSize(100); m_ctrlGridTransmission->SetDefaultRowSize(22); m_ctrlGridTransmission->SetColLabelSize(22); m_ctrlGridTransmission->SetRowLabelSize(30); m_ctrlGridTransmission->CreateGrid(100, 5, wxGrid::wxGridSelectRows); itemBoxSizer13->Add(m_ctrlGridTransmission, 400, wxGROW|wxALL, 2); wxBoxSizer* itemBoxSizer15 = new wxBoxSizer(wxVERTICAL); itemBoxSizer6->Add(itemBoxSizer15, 0, wxGROW|wxALL, 5); m_btnSend = new wxBitmapButton; m_btnSend->Create( itemFrame1, ID_BITMAPBUTTONID_MENUITEM_CANAL_SEND, itemFrame1->GetBitmapResource(wxT("copy.xpm")), wxDefaultPosition, wxDefaultSize, wxBU_AUTODRAW ); if (frmCANALSession::ShowToolTips()) m_btnSend->SetToolTip(_("Send message from selected row(s)")); itemBoxSizer15->Add(m_btnSend, 0, wxALIGN_CENTER_HORIZONTAL|wxALL, 0); itemBoxSizer15->Add(5, 5, 0, wxALIGN_CENTER_HORIZONTAL|wxALL, 2); m_btnActivate = new wxBitmapButton; m_btnActivate->Create( itemFrame1, ID_BITMAPBUTTON12, itemFrame1->GetBitmapResource(wxT("Print.xpm")), wxDefaultPosition, wxDefaultSize, wxBU_AUTODRAW ); m_btnActivate->Show(false); itemBoxSizer15->Add(m_btnActivate, 0, wxALIGN_CENTER_HORIZONTAL|wxALL, 0); m_btnClear = new wxBitmapButton; m_btnClear->Create( itemFrame1, ID_BITMAPBUTTON13, itemFrame1->GetBitmapResource(wxT("open.xpm")), wxDefaultPosition, wxDefaultSize, wxBU_AUTODRAW ); m_btnClear->Show(false); itemBoxSizer15->Add(m_btnClear, 0, wxALIGN_CENTER_HORIZONTAL|wxALL, 0); wxToolBar* itemToolBar20 = CreateToolBar( wxTB_FLAT|wxTB_HORIZONTAL, ID_TOOLBAR_CANAL ); wxBitmap itemtool21Bitmap(itemFrame1->GetBitmapResource(wxT("open.xpm"))); wxBitmap itemtool21BitmapDisabled; itemToolBar20->AddTool(ID_TOOL_CANAL_OPEN, _T(""), itemtool21Bitmap, itemtool21BitmapDisabled, wxITEM_NORMAL, _T(""), wxEmptyString); wxBitmap itemtool22Bitmap(itemFrame1->GetBitmapResource(wxT("save.xpm"))); wxBitmap itemtool22BitmapDisabled; itemToolBar20->AddTool(ID_TOOL_CANAL_SAVE, _T(""), itemtool22Bitmap, itemtool22BitmapDisabled, wxITEM_NORMAL, _T(""), wxEmptyString); itemToolBar20->AddSeparator(); wxBitmap itemtool24Bitmap(itemFrame1->GetBitmapResource(wxT("cut.xpm"))); wxBitmap itemtool24BitmapDisabled; itemToolBar20->AddTool(ID_TOOL_CANAL_CUT, _T(""), itemtool24Bitmap, itemtool24BitmapDisabled, wxITEM_NORMAL, _T(""), wxEmptyString); wxBitmap itemtool25Bitmap(itemFrame1->GetBitmapResource(wxT("copy.xpm"))); wxBitmap itemtool25BitmapDisabled; itemToolBar20->AddTool(ID_TOOL_CANAL_COPY, _T(""), itemtool25Bitmap, itemtool25BitmapDisabled, wxITEM_NORMAL, _T(""), wxEmptyString); wxBitmap itemtool26Bitmap(itemFrame1->GetBitmapResource(wxT("paste.xpm"))); wxBitmap itemtool26BitmapDisabled; itemToolBar20->AddTool(ID_TOOL_CANAL_PASTE, _T(""), itemtool26Bitmap, itemtool26BitmapDisabled, wxITEM_NORMAL, _T(""), wxEmptyString); itemToolBar20->AddSeparator(); wxBitmap itemtool28Bitmap(itemFrame1->GetBitmapResource(wxT("Preview.xpm"))); wxBitmap itemtool28BitmapDisabled; itemToolBar20->AddTool(ID_TOOL_CANAL_PREVIEW, _T(""), itemtool28Bitmap, itemtool28BitmapDisabled, wxITEM_NORMAL, _T(""), wxEmptyString); wxBitmap itemtool29Bitmap(itemFrame1->GetBitmapResource(wxT("Print.xpm"))); wxBitmap itemtool29BitmapDisabled; itemToolBar20->AddTool(ID_TOOL_CANAL_PRINT, _T(""), itemtool29Bitmap, itemtool29BitmapDisabled, wxITEM_NORMAL, _T(""), wxEmptyString); itemToolBar20->AddSeparator(); wxArrayString m_comboSelectViewStrings; m_comboSelectViewStrings.Add(_("Message Log")); m_comboSelectViewStrings.Add(_("Message Count")); m_comboSelectView = new wxComboBox; m_comboSelectView->Create( itemToolBar20, ID_COMBOBOX, _("Message Log"), wxDefaultPosition, wxDefaultSize, m_comboSelectViewStrings, wxCB_DROPDOWN ); m_comboSelectView->SetStringSelection(_("Message Log")); if (frmCANALSession::ShowToolTips()) m_comboSelectView->SetToolTip(_("Select the way messages are shown")); m_comboSelectView->SetBackgroundColour(wxColour(255, 255, 185)); itemToolBar20->AddControl(m_comboSelectView); itemToolBar20->AddSeparator(); m_ctrlBtnActivateInterface = new wxBitmapButton; m_ctrlBtnActivateInterface->Create( itemToolBar20, ID_BITMAPBUTTON, itemFrame1->GetBitmapResource(wxT("New1.xpm")), wxDefaultPosition, wxDefaultSize, wxBU_AUTODRAW ); itemToolBar20->AddControl(m_ctrlBtnActivateInterface); itemToolBar20->Realize(); itemFrame1->SetToolBar(itemToolBar20); ////@end frmCANALSession content construction // Receive Grid m_ctrlGridReceive->SetCellBackgroundColour( g_Config.m_CanalRcvFrameBgColour ); m_ctrlGridReceive->SetGridLineColour( g_Config.m_CanalRcvFrameLineColour ); m_ctrlGridReceive->SetCellTextColour( g_Config.m_CanalRcvFrameTextColour ); m_ctrlGridReceive->SetRowLabelSize( 50 ); m_ctrlGridReceive->SetColSize( 0, g_Config.m_CanalRcvFieldWidth[0] ); m_ctrlGridReceive->SetColLabelValue( 0, g_Config.m_CanalRcvFieldText[0] ); m_ctrlGridReceive->SetColSize( 1, g_Config.m_CanalRcvFieldWidth[1] ); m_ctrlGridReceive->SetColLabelValue( 1, g_Config.m_CanalRcvFieldText[1] ); m_ctrlGridReceive->SetColSize( 2, g_Config.m_CanalRcvFieldWidth[2] ); m_ctrlGridReceive->SetColLabelValue( 2, g_Config.m_CanalRcvFieldText[2] ); m_ctrlGridReceive->SetColSize( 3, g_Config.m_CanalRcvFieldWidth[3] ); m_ctrlGridReceive->SetColLabelValue( 3, g_Config.m_CanalRcvFieldText[3] ); m_ctrlGridReceive->SetColSize( 4,g_Config.m_CanalRcvFieldWidth[4] ); m_ctrlGridReceive->SetColLabelValue( 4, g_Config.m_CanalRcvFieldText[4] ); m_ctrlGridReceive->SetColSize( 5, g_Config.m_CanalRcvFieldWidth[5] ); m_ctrlGridReceive->SetColLabelValue( 5, g_Config.m_CanalRcvFieldText[5] ); m_ctrlGridReceive->SetColSize( 6, g_Config.m_CanalRcvFieldWidth[6] ); m_ctrlGridReceive->SetColLabelValue( 6, g_Config.m_CanalRcvFieldText[6] ); m_ctrlGridReceive->SetColSize( 7, g_Config.m_CanalRcvFieldWidth[7] ); m_ctrlGridReceive->SetColLabelValue( 7, g_Config.m_CanalRcvFieldText[7] ); // Transmit Grid m_ctrlGridTransmission->SetCellBackgroundColour( g_Config.m_CanalTrmitFrameBgColour ); m_ctrlGridTransmission->SetGridLineColour( g_Config.m_CanalTrmitFrameLineColour ); m_ctrlGridTransmission->SetCellTextColour( g_Config.m_CanalTrmitFrameTextColour ); m_ctrlGridTransmission->SetRowLabelSize( 50 ); m_ctrlGridTransmission->SetColSize( 0, g_Config.m_CanalTrmitFieldWidth[0] ); m_ctrlGridTransmission->SetColLabelValue( 0, g_Config.m_CanalTrmitFieldText[0] ); m_ctrlGridTransmission->SetColSize( 1, g_Config.m_CanalTrmitFieldWidth[1] ); m_ctrlGridTransmission->SetColLabelValue( 1, g_Config.m_CanalTrmitFieldText[1] ); m_ctrlGridTransmission->SetColSize( 2, g_Config.m_CanalTrmitFieldWidth[2] ); m_ctrlGridTransmission->SetColLabelValue( 2, g_Config.m_CanalTrmitFieldText[2] ); m_ctrlGridTransmission->SetColSize( 3, g_Config.m_CanalTrmitFieldWidth[3] ); m_ctrlGridTransmission->SetColLabelValue( 3, g_Config.m_CanalTrmitFieldText[3] ); m_ctrlGridTransmission->SetColSize( 4, g_Config.m_CanalTrmitFieldWidth[4] ); m_ctrlGridTransmission->SetColLabelValue( 4, g_Config.m_CanalTrmitFieldText[4] ); }
void frmMDFEditor::CreateControls() { frmMDFEditor* itemFrame1 = this; wxMenuBar* menuBar = new wxMenuBar; wxMenu* itemMenu3 = new wxMenu; itemMenu3->Append( ID_MENUITEM_NEW, _( "Create New MDF File" ), wxEmptyString, wxITEM_NORMAL ); itemMenu3->AppendSeparator(); itemMenu3->Append( ID_MENUITEM_OPEN, _( "Open MDF file..." ), wxEmptyString, wxITEM_NORMAL ); itemMenu3->Append( ID_MENUITEM_SAVE, _( "Save MDF File..." ), wxEmptyString, wxITEM_NORMAL ); itemMenu3->AppendSeparator(); itemMenu3->Append( ID_MENUITEM_DOWNLOAD, _( "Download MDF file..." ), wxEmptyString, wxITEM_NORMAL ); itemMenu3->Append( ID_MENUITEM_UPLOAD, _( "Upload MDF file..." ), wxEmptyString, wxITEM_NORMAL ); itemMenu3->AppendSeparator(); itemMenu3->Append( ID_MENUITEM_EXIT, _( "Exit" ), wxEmptyString, wxITEM_NORMAL ); menuBar->Append( itemMenu3, _( "File" ) ); wxMenu* itemMenu13 = new wxMenu; itemMenu13->Append( ID_MENUITEM_ADD, _( "Add MDF Item..." ), wxEmptyString, wxITEM_NORMAL ); itemMenu13->Append( ID_MENUITEM_REMOVE, _( "Remove MDF Item..." ), wxEmptyString, wxITEM_NORMAL ); menuBar->Append( itemMenu13, _( "Edit" ) ); itemFrame1->SetMenuBar( menuBar ); wxPanel* itemPanel16 = new wxPanel; itemPanel16->Create( itemFrame1, ID_PANEL, wxDefaultPosition, wxDefaultSize, wxSUNKEN_BORDER | wxTAB_TRAVERSAL ); wxBoxSizer* itemBoxSizer17 = new wxBoxSizer( wxVERTICAL ); itemPanel16->SetSizer( itemBoxSizer17 ); wxToolBar* itemToolBar18 = new wxToolBar; itemToolBar18->Create( itemPanel16, ID_TOOLBAR3, wxDefaultPosition, wxDefaultSize, wxTB_FLAT | wxTB_HORIZONTAL ); wxBitmap itemtool19Bitmap( itemFrame1->GetBitmapResource( wxT( "deffile.xpm" ) ) ); wxBitmap itemtool19BitmapDisabled; itemToolBar18->AddTool( ID_TOOL_NEW, wxEmptyString, itemtool19Bitmap, itemtool19BitmapDisabled, wxITEM_NORMAL, _( "Create new MDF file" ), wxEmptyString ); wxBitmap itemtool20Bitmap( itemFrame1->GetBitmapResource( wxT( "open.xpm" ) ) ); wxBitmap itemtool20BitmapDisabled; itemToolBar18->AddTool( ID_TOOL_LOAD, wxEmptyString, itemtool20Bitmap, itemtool20BitmapDisabled, wxITEM_NORMAL, _( "Load MDF file" ), wxEmptyString ); wxBitmap itemtool21Bitmap( itemFrame1->GetBitmapResource( wxT( "save.xpm" ) ) ); wxBitmap itemtool21BitmapDisabled; itemToolBar18->AddTool( ID_TOOL_SAVE, wxEmptyString, itemtool21Bitmap, itemtool21BitmapDisabled, wxITEM_NORMAL, _( "Save MDF file" ), wxEmptyString ); wxBitmap itemtool22Bitmap( itemFrame1->GetBitmapResource( wxT( "filesaveas.xpm" ) ) ); wxBitmap itemtool22BitmapDisabled; itemToolBar18->AddTool( ID_TOOL_UPLOAD, wxEmptyString, itemtool22Bitmap, itemtool22BitmapDisabled, wxITEM_NORMAL, _( "Upload MDF file" ), wxEmptyString ); wxBitmap itemtool23Bitmap( itemFrame1->GetBitmapResource( wxT( "redo.xpm" ) ) ); wxBitmap itemtool23BitmapDisabled; itemToolBar18->AddTool( ID_TOOL_DOWNLOAD, wxEmptyString, itemtool23Bitmap, itemtool23BitmapDisabled, wxITEM_NORMAL, _( "Upload MDF file" ), wxEmptyString ); itemToolBar18->AddSeparator(); wxBitmap itemtool25Bitmap( itemFrame1->GetBitmapResource( wxT( "New1.xpm" ) ) ); wxBitmap itemtool25BitmapDisabled; itemToolBar18->AddTool( ID_TOOL_ADD_ITEM, wxEmptyString, itemtool25Bitmap, itemtool25BitmapDisabled, wxITEM_NORMAL, _( "Add MDF item" ), wxEmptyString ); wxBitmap itemtool26Bitmap( itemFrame1->GetBitmapResource( wxT( "delete.xpm" ) ) ); wxBitmap itemtool26BitmapDisabled; itemToolBar18->AddTool( ID_TOOL_REMOVE_ITEM, wxEmptyString, itemtool26Bitmap, itemtool26BitmapDisabled, wxITEM_NORMAL, _( "Remove MDF item" ), wxEmptyString ); itemToolBar18->Realize(); itemBoxSizer17->Add( itemToolBar18, 0, wxGROW | wxALL, 5 ); m_mdfTree = new wxTreeCtrl; m_mdfTree->Create( itemPanel16, ID_TREECTRL, wxDefaultPosition, wxSize( 400, 300 ), wxTR_HAS_BUTTONS | wxTR_FULL_ROW_HIGHLIGHT | wxTR_LINES_AT_ROOT | wxTR_ROW_LINES | wxTR_SINGLE ); itemBoxSizer17->Add( m_mdfTree, 0, wxGROW | wxALL, 2 ); m_htmlInfoWnd = new wxHtmlWindow; m_htmlInfoWnd->Create( itemPanel16, ID_HTMLWINDOW2, wxDefaultPosition, wxSize( 200, 150 ), wxHW_SCROLLBAR_AUTO | wxSUNKEN_BORDER | wxHSCROLL | wxVSCROLL ); m_htmlInfoWnd->SetPage( _( "<html><h4>No data</h4></html>" ) ); itemBoxSizer17->Add( m_htmlInfoWnd, 0, wxGROW | wxALL, 5 ); // Connect events and objects m_mdfTree->Connect( ID_TREECTRL, wxEVT_LEFT_DOWN, wxMouseEventHandler( frmMDFEditor::OnLeftDown ), NULL, this ); m_mdfTree->Connect( ID_TREECTRL, wxEVT_LEFT_DCLICK, wxMouseEventHandler( frmMDFEditor::OnLeftDClick ), NULL, this ); wxImageList* itemImageList = new wxImageList( 16, 16, true, 5 ); { wxIcon Icon0( Home_xpm ); itemImageList->Add( Icon0 ); wxIcon Icon1( Folder_Add_xpm ); itemImageList->Add( Icon1 ); wxIcon Icon2( Info_xpm ); itemImageList->Add( Icon2 ); wxIcon Icon3( copy_xpm ); itemImageList->Add( Icon3 ); wxIcon Icon4( copy_xpm ); itemImageList->Add( Icon4 ); } m_mdfTree->AssignImageList( itemImageList ); addDefaultContent(); }