srand(time(NULL)); n = rand()%11; s << n; StaticText3 -> SetLabel(s); TextCtrl1 -> SetValue(s); Button1 -> SetLabel(s); s = TextCtrl1 -> GetValue(); int j=wxAtoi(s); wxMessageBox(wxT("!!!"));