void DialogObjProp::OP_COMPCB() { CComboBox* complb = (CComboBox*)GetDlgItem(IDC_CBCOMPONENT); CListBox* objList = (CListBox*)parentWnd->GetObjList()->GetDlgItem(IDC_OBJLIST); int curSel = complb->GetCurSel() ; Gameobject* obj = parentWnd->theApp->GetProject()->GetScene()->GetSceneObject(objList->GetCurSel()); Component* compSel = obj->GetComponent(curSel); if (strcmp(compSel->GetIdentifier(),CTYPE_MESHRENDERER)) { ClearTempIDS(); RECT tr; tr.top = 275; tr.left = 40; tr.bottom = tr.top + 20; tr.right = tr.left + 120; CStatic* text = new CStatic(); text->Create("Linked Mesh: ",WS_VISIBLE,tr,this,TEMPID_0); text->ShowWindow(SW_SHOW); tr.top = 300; tr.bottom = tr.top + 30; CComboBoxEx* cb = new CComboBoxEx(); cb->Create(WS_VISIBLE,tr,this,TEMPID_1); cb->ShowWindow(SW_SHOW); for (int i = 0, ListItem = 1; i < obj->GetNumberOfComponent(); i++) { if (strcmp(obj->GetComponent(i)->GetIdentifier(), CTYPE_MESH) ) { char name[512]; obj->GetComponent(i)->GetName(name, 512);/* cb->AddString(name); cb->SetItemData(ListItem, i);*/ ListItem++; } } } }