int wxComboBox::GetSelection (void) const { int sel = XmComboBoxGetSelectedPos((Widget) m_mainWidget); if (sel == 0) return -1; else return sel - 1; }
static char* getComboValue(Ihandle *n) { char *value; int pos = 1; #if (XmVERSION < 2 ) pos = XmComboBoxGetSelectedPos((Widget)handle(n)); if (pos==0) pos=1; #else XtVaGetValues((Widget)handle(n), XmNselectedPosition, &pos, NULL); #endif value = getBuffer(); sprintf(value, "%d", pos); return value; }