jak z poziomu kodu (a nie kreatora) dodac przyciski do programu (wiecej informacji - kometarze)

 
void KolkoPr2Dlg::CreateGUIControls()
{
	//Do not add custom code between
	//GUI Items Creation Start and GUI Items Creation End.
	//wxDev-C++ designer will remove them.
	//Add the custom code before or after the blocks
	////GUI Items Creation Start

	WxGridSizer1 = new wxGridSizer(0, 2, 0, 0);
	this->SetSizer(WxGridSizer1);
	this->SetAutoLayout(true);

	WxGridSizer2 = new wxGridSizer(0, 30, 2, 2);
	WxGridSizer1->Add(WxGridSizer2, 0, wxALIGN_CENTER | wxALL, 0);

	WxButton1 = new wxButton(this, ID_WXBUTTON1, wxT("WxButton1"), wxPoint(1786, 40), wxSize(75, 25), 0, wxDefaultValidator, wxT("WxButton1"));
	WxGridSizer1->Add(WxButton1,0,wxALIGN_CENTER | wxALL,5);

	SetTitle(wxT("KolkoPr2"));
	SetIcon(wxNullIcon);
	
	GetSizer()->Layout();
	GetSizer()->Fit(this);
	GetSizer()->SetSizeHints(this);
	Center();
	
	////GUI Items Creation End
		
	for (int i = 0; i < k; ++i)
           for (int j = 0; j < k; ++j)
             this->WxGridSizer2->Add(&tab[i][j].but,0,wxALIGN_CENTER | wxALL,0); //to w ogole nie dziala (tab[i][j].but zwraca wxButtona) 
}

z gory dzieki za pomoc