WinSendMsg( hwndTypeCombo, LM_SELECTITEM, (MPARAM)0, (MPARAM)TRUE );
WinSendMsg( hwndTypeCombo, LM_SELECTITEM, (MPARAM)pmydata->ulCurExt, (MPARAM)TRUE );
MRESULT EXPENTRY FileDialogProc( HWND hwndDlg, ULONG msg, MPARAM mp1, MPARAM mp2){  MRESULT mr;  PFILEDLG pfiledlg;  HWND hwndTypeCombo;  HWND hwndFileEF;  PSZ pszTemp;  INT i;  SWP swp;  PMYDATA pmydata;  switch ( msg ) {    case WM_INITDLG:       /* Create another dropdown that we manage */       mr = WinDefFileDlgProc(hwndDlg, msg, mp1, mp2);       hwndTypeCombo = WinWindowFromID(hwndDlg, DID_FILTER_CB);       WinQueryWindowPos(hwndTypeCombo, &swp);       WinSetWindowPos(hwndTypeCombo, NULLHANDLE, 0, 0, 0, 0, SWP_HIDE);       hwndTypeCombo = WinCreateWindow( hwndDlg, WC_COMBOBOX, "",                                        WS_VISIBLE | WS_PARENTCLIP | WS_SYNCPAINT | WS_TABSTOP | CBS_DROPDOWNLIST,                                        swp.x, swp.y,                                        swp.cx, swp.cy, hwndDlg, swp.hwndInsertBehind, 290,                                        NULL, NULL );       WinSendMsg( hwndTypeCombo, LM_DELETEALL, (MPARAM)0, (MPARAM)0 );       pfiledlg = (PFILEDLG)WinQueryWindowULong( hwndDlg, QWL_USER );       i = 0;       while (*(pfiledlg->papszITypeList[i]) != NULL) {           WinSendMsg( hwndTypeCombo, LM_INSERTITEM, (MPARAM)LIT_END, (MPARAM)*(pfiledlg->papszITypeList[i]) );           i++;       }       WinSendMsg( hwndTypeCombo, LM_SELECTITEM, (MPARAM)0, (MPARAM)TRUE );       return mr;    case WM_CONTROL:       {         if ((SHORT1FROMMP(mp1) == 290) &&           (SHORT2FROMMP(mp1) == CBN_LBSELECT)) {           hwndTypeCombo = WinWindowFromID(hwndDlg, 290);           pfiledlg = (PFILEDLG)WinQueryWindowULong( hwndDlg, QWL_USER );           pmydata = (PMYDATA)pfiledlg->ulUser;           pmydata->ulCurExt = (ULONG)WinSendMsg( hwndTypeCombo, LM_QUERYSELECTION, (MPARAM)LIT_FIRST, (MPARAM)0 );           if (pfiledlg->fl & FDS_OPEN_DIALOG) {             WinSetWindowText(WinWindowFromID(hwndDlg,DID_FILENAME_ED), *(pmydata->papszIFilterList[pmydata->ulCurExt]));             WinSendMsg(WinWindowFromID(hwndDlg,DID_FILENAME_ED), EM_SETSEL, MPFROM2SHORT(0, 32000), (MPARAM)0 );             WinSendMsg(hwndDlg, WM_CONTROL, MPFROM2SHORT(DID_FILTER_CB, CBN_LBSELECT), (MPARAM)0 );           }           return (MRESULT)TRUE;         }       }       break;  }        return WinDefFileDlgProc(hwndDlg, msg, mp1, mp2);}