int main (int argc, char *argv[]) { CWindow a ("Sample window", 10, 10, 600, 480); a.Add (CButton (1, 0.1, 0.8, 0.3, 0.1, "Ok")) .Add (CButton (2, 0.6, 0.8, 0.3, 0.1, "Cancel")); a.Add (CLabel (10, 0.1, 0.1, 0.2, 0.1, "Username:"******"chucknorris")); a.Add (CComboBox (20, 0.1, 0.3, 0.8, 0.1) .Add ("Karate") .Add ("Judo") .Add ("Box") .Add ("Progtest")); cout << a; CWindow b = a; CControl *ctl = b.Search (20); cout << *ctl; CComboBox *cb = dynamic_cast<CComboBox *> (b.Search (20)); cb->SetSelected (3); CInput *il = dynamic_cast<CInput *> (b.Search (11)); il->SetValue ("*****@*****.**"); b.Add (CComboBox (21, 0.1, 0.5, 0.8, 0.1) .Add ("PA2") .Add ("OSY") .Add ("Both")); cout << b; b.SetPosition (20, 30, 640, 520); cout << b; return 0; }