--- branches/dev-api-4/xvidcore/vfw/src/config.c 2004/03/04 16:13:33 1375 +++ branches/dev-api-4/xvidcore/vfw/src/config.c 2004/03/06 01:59:32 1376 @@ -500,6 +500,25 @@ return (success) ? tmp : config; } +/* get uint from combobox + GetDlgItemInt doesnt work properly for cb list items */ +#define UINT_BUF_SZ 20 +static int config_get_cbuint(HWND hDlg, UINT item, int def) +{ + int sel = SendMessage(GetDlgItem(hDlg, item), CB_GETCURSEL, 0, 0); + char buf[UINT_BUF_SZ]; + + if (sel<0) { + return config_get_uint(hDlg, item, def); + } + + if (SendMessage(GetDlgItem(hDlg, item), CB_GETLBTEXT, sel, (LPARAM)buf) == CB_ERR) { + return def; + } + + return atoi(buf); +} + /* we use "100 base" floats */ @@ -731,6 +750,8 @@ SendDlgItemMessage(hDlg, IDC_BITRATE_TSIZE, CB_ADDSTRING, 0, (LPARAM)"665600"); SendDlgItemMessage(hDlg, IDC_BITRATE_TSIZE, CB_ADDSTRING, 0, (LPARAM)"716800"); + SendDlgItemMessage(hDlg, IDC_BITRATE_TSIZE, CB_ADDSTRING, 0, (LPARAM)"1331200"); + SendDlgItemMessage(hDlg, IDC_BITRATE_TSIZE, CB_ADDSTRING, 0, (LPARAM)"1433600"); for (i=0; iidd, psi->config); + }else if (HIWORD(wParam) == LBN_SELCHANGE && (LOWORD(wParam) == IDC_PROFILE_PROFILE || LOWORD(wParam) == IDC_LEVEL_PROFILE || @@ -1522,20 +1545,20 @@ switch (((NMHDR *)lParam)->code) { case PSN_SETACTIVE : - OutputDebugString("PSN_SET"); + DPRINTF("PSN_SET"); adv_upload(hDlg, psi->idd, psi->config); adv_mode(hDlg, psi->idd, psi->config); SetWindowLong(hDlg, DWL_MSGRESULT, FALSE); break; case PSN_KILLACTIVE : - OutputDebugString("PSN_KILL"); + DPRINTF("PSN_KILL"); adv_download(hDlg, psi->idd, psi->config); SetWindowLong(hDlg, DWL_MSGRESULT, FALSE); break; case PSN_APPLY : - OutputDebugString("PSN_APPLY"); + DPRINTF("PSN_APPLY"); psi->config->save = TRUE; SetWindowLong(hDlg, DWL_MSGRESULT, FALSE); break; @@ -1844,9 +1867,6 @@ break; } - if (n->code == NM_RCLICK) { - OutputDebugString("Right click"); - } break; }