Skip to content

Instantly share code, notes, and snippets.

@rtroe
Last active March 7, 2016 02:10
Show Gist options
  • Save rtroe/12cdccb856646407c33b to your computer and use it in GitHub Desktop.
Save rtroe/12cdccb856646407c33b to your computer and use it in GitHub Desktop.
void MainFrame::OnCreatewxOCECntrl(wxCommandEvent& WXUNUSED(event))
{
wxBitmap page_bmp = wxArtProvider::GetBitmap(wxART_NORMAL_FILE, wxART_OTHER, wxSize(16,16));
ITEMCOUNT++;
m_ntbk->AddPage(CreatewxOCECntrl(m_ntbk),wxString::Format(wxT("newfile%i.wxoce"), ITEMCOUNT), false, page_bmp);
m_mgr.Update();
}
wxPanel* MainFrame::CreatewxOCECntrl(wxWindow* parent)
{
if (!parent)
parent = this;
wxOCEWindow* ctrl = new wxOCEWindow( parent,
wxPoint(0, 0),
wxSize(-1, -1),
0);
return ctrl;
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment