[svn] / trunk / xvidcore / vfw / src / config.c Repository:
ViewVC logotype

Diff of /trunk/xvidcore/vfw/src/config.c

Parent Directory Parent Directory | Revision Log Revision Log | View Patch Patch

revision 1802, Wed Nov 26 10:11:31 2008 UTC revision 1827, Sun Nov 30 16:38:31 2008 UTC
# Line 546  Line 546 
546  #define UINT_BUF_SZ     20  #define UINT_BUF_SZ     20
547  static int config_get_cbuint(HWND hDlg, UINT item, int def)  static int config_get_cbuint(HWND hDlg, UINT item, int def)
548  {  {
549          int sel = SendMessage(GetDlgItem(hDlg, item), CB_GETCURSEL, 0, 0);          LRESULT sel = SendMessage(GetDlgItem(hDlg, item), CB_GETCURSEL, 0, 0);
550          char buf[UINT_BUF_SZ];          char buf[UINT_BUF_SZ];
551    
552          if (sel<0) {          if (sel<0) {
# Line 703  Line 703 
703    
704  /* quantization matrix dialog proc */  /* quantization matrix dialog proc */
705    
706  static BOOL CALLBACK quantmatrix_proc(HWND hDlg, UINT uMsg, WPARAM wParam, LPARAM lParam)  static INT_PTR CALLBACK quantmatrix_proc(HWND hDlg, UINT uMsg, WPARAM wParam, LPARAM lParam)
707  {  {
708          CONFIG* config = (CONFIG*)GetWindowLong(hDlg, GWL_USERDATA);          CONFIG* config = (CONFIG*)GetWindowLongPtr(hDlg, GWLP_USERDATA);
709    
710          switch (uMsg)          switch (uMsg)
711          {          {
712          case WM_INITDIALOG :          case WM_INITDIALOG :
713                  SetWindowLong(hDlg, GWL_USERDATA, lParam);                  SetWindowLongPtr(hDlg, GWLP_USERDATA, lParam);
714                  config = (CONFIG*)lParam;                  config = (CONFIG*)lParam;
715                  quant_upload(hDlg, config);                  quant_upload(hDlg, config);
716    
# Line 1466  Line 1466 
1466      break;      break;
1467    
1468    case IDD_ENC :    case IDD_ENC :
1469                  config->num_threads = config_get_uint(hDlg, IDC_NUMTHREADS, config->num_threads);                  config->num_threads = min(4, config_get_uint(hDlg, IDC_NUMTHREADS, config->num_threads));
1470                  config->fourcc_used = SendDlgItemMessage(hDlg, IDC_FOURCC, CB_GETCURSEL, 0, 0);                  config->fourcc_used = SendDlgItemMessage(hDlg, IDC_FOURCC, CB_GETCURSEL, 0, 0);
1471                  config->vop_debug = IsDlgChecked(hDlg, IDC_VOPDEBUG);                  config->vop_debug = IsDlgChecked(hDlg, IDC_VOPDEBUG);
1472                  config->display_status = IsDlgChecked(hDlg, IDC_DISPLAY_STATUS);                  config->display_status = IsDlgChecked(hDlg, IDC_DISPLAY_STATUS);
# Line 1487  Line 1487 
1487    
1488  /* advanced dialog proc */  /* advanced dialog proc */
1489    
1490  static BOOL CALLBACK adv_proc(HWND hDlg, UINT uMsg, WPARAM wParam, LPARAM lParam)  static INT_PTR CALLBACK adv_proc(HWND hDlg, UINT uMsg, WPARAM wParam, LPARAM lParam)
1491  {  {
1492          PROPSHEETINFO *psi;          PROPSHEETINFO *psi;
1493    
1494          psi = (PROPSHEETINFO*)GetWindowLong(hDlg, GWL_USERDATA);          psi = (PROPSHEETINFO*)GetWindowLongPtr(hDlg, GWLP_USERDATA);
1495    
1496          switch (uMsg)          switch (uMsg)
1497          {          {
1498          case WM_INITDIALOG :          case WM_INITDIALOG :
1499                  psi = (PROPSHEETINFO*) ((LPPROPSHEETPAGE)lParam)->lParam;                  psi = (PROPSHEETINFO*) ((LPPROPSHEETPAGE)lParam)->lParam;
1500                  SetWindowLong(hDlg, GWL_USERDATA, (LPARAM)psi);                  SetWindowLongPtr(hDlg, GWLP_USERDATA, (LPARAM)psi);
1501    
1502                  if (g_hTooltip)                  if (g_hTooltip)
1503                          EnumChildWindows(hDlg, enum_tooltips, 0);                          EnumChildWindows(hDlg, enum_tooltips, 0);
# Line 1685  Line 1685 
1685                          DPRINTF("PSN_SET");                          DPRINTF("PSN_SET");
1686                          adv_upload(hDlg, psi->idd, psi->config);                          adv_upload(hDlg, psi->idd, psi->config);
1687                          adv_mode(hDlg, psi->idd, psi->config);                          adv_mode(hDlg, psi->idd, psi->config);
1688                          SetWindowLong(hDlg, DWL_MSGRESULT, FALSE);                          SetWindowLongPtr(hDlg, DWLP_MSGRESULT, FALSE);
1689                          break;                          break;
1690    
1691                  case PSN_KILLACTIVE :                  case PSN_KILLACTIVE :
1692                          DPRINTF("PSN_KILL");                          DPRINTF("PSN_KILL");
1693                          adv_download(hDlg, psi->idd, psi->config);                          adv_download(hDlg, psi->idd, psi->config);
1694                          SetWindowLong(hDlg, DWL_MSGRESULT, FALSE);                          SetWindowLongPtr(hDlg, DWLP_MSGRESULT, FALSE);
1695                          break;                          break;
1696    
1697                  case PSN_APPLY :                  case PSN_APPLY :
1698                          DPRINTF("PSN_APPLY");                          DPRINTF("PSN_APPLY");
1699                          psi->config->save = TRUE;                          psi->config->save = TRUE;
1700                          SetWindowLong(hDlg, DWL_MSGRESULT, FALSE);                          SetWindowLongPtr(hDlg, DWLP_MSGRESULT, FALSE);
1701                          break;                          break;
1702                  }                  }
1703                  break;                  break;
# Line 1918  Line 1918 
1918  static const int other_dlgs[] = { IDD_ENC, IDD_DEC, IDD_COMMON };  static const int other_dlgs[] = { IDD_ENC, IDD_DEC, IDD_COMMON };
1919    
1920    
1921  BOOL CALLBACK main_proc(HWND hDlg, UINT uMsg, WPARAM wParam, LPARAM lParam)  INT_PTR CALLBACK main_proc(HWND hDlg, UINT uMsg, WPARAM wParam, LPARAM lParam)
1922  {  {
1923          CONFIG* config = (CONFIG*)GetWindowLong(hDlg, GWL_USERDATA);          CONFIG* config = (CONFIG*)GetWindowLongPtr(hDlg, GWLP_USERDATA);
1924          unsigned int i;          unsigned int i;
1925    
1926          switch (uMsg)          switch (uMsg)
1927          {          {
1928          case WM_INITDIALOG :          case WM_INITDIALOG :
1929                  SetWindowLong(hDlg, GWL_USERDATA, lParam);                  SetWindowLongPtr(hDlg, GWLP_USERDATA, lParam);
1930                  config = (CONFIG*)lParam;                  config = (CONFIG*)lParam;
1931    
1932                  for (i=0; i<sizeof(profiles)/sizeof(profile_t); i++)                  for (i=0; i<sizeof(profiles)/sizeof(profile_t); i++)
# Line 1958  Line 1958 
1958                          EnumChildWindows(hDlg, enum_tooltips, 0);                          EnumChildWindows(hDlg, enum_tooltips, 0);
1959                  }                  }
1960    
1961                  SetClassLong(GetDlgItem(hDlg, IDC_BITRATE_S), GCL_HCURSOR, (LONG)LoadCursor(NULL, IDC_HAND));                  SetClassLongPtr(GetDlgItem(hDlg, IDC_BITRATE_S), GCLP_HCURSOR, (LONG)LoadCursor(NULL, IDC_HAND));
1962    
1963                  {                  {
1964                          DWORD ext_style = ListView_GetExtendedListViewStyle(GetDlgItem(hDlg,IDC_ZONES));                          DWORD ext_style = ListView_GetExtendedListViewStyle(GetDlgItem(hDlg,IDC_ZONES));
# Line 2231  Line 2231 
2231  /* LICENSE DIALOG ====================================================================== */  /* LICENSE DIALOG ====================================================================== */
2232  /* ===================================================================================== */  /* ===================================================================================== */
2233    
2234  static BOOL CALLBACK license_proc(HWND hDlg, UINT uMsg, WPARAM wParam, LPARAM lParam)  static INT_PTR CALLBACK license_proc(HWND hDlg, UINT uMsg, WPARAM wParam, LPARAM lParam)
2235  {  {
2236          switch (uMsg)          switch (uMsg)
2237          {          {
# Line 2249  Line 2249 
2249                                          }                                          }
2250                                  }                                  }
2251                          }                          }
2252                          SetWindowLong(hDlg, GWL_USERDATA, (LONG)hGlobal);                          SetWindowLongPtr(hDlg, GWLP_USERDATA, (LONG)hGlobal);
2253                  }                  }
2254                  break;                  break;
2255    
2256          case WM_DESTROY :          case WM_DESTROY :
2257                  {                  {
2258                          HGLOBAL hGlobal = (HGLOBAL)GetWindowLong(hDlg, GWL_USERDATA);                          HGLOBAL hGlobal = (HGLOBAL)GetWindowLongPtr(hDlg, GWLP_USERDATA);
2259                          if (hGlobal) {                          if (hGlobal) {
2260                                  FreeResource(hGlobal);                                  FreeResource(hGlobal);
2261                          }                          }
# Line 2287  Line 2287 
2287  /* ABOUT DIALOG ======================================================================== */  /* ABOUT DIALOG ======================================================================== */
2288  /* ===================================================================================== */  /* ===================================================================================== */
2289    
2290  BOOL CALLBACK about_proc(HWND hDlg, UINT uMsg, WPARAM wParam, LPARAM lParam)  INT_PTR CALLBACK about_proc(HWND hDlg, UINT uMsg, WPARAM wParam, LPARAM lParam)
2291  {  {
2292          switch (uMsg)          switch (uMsg)
2293          {          {
# Line 2300  Line 2300 
2300                          HINSTANCE m_hdll;                          HINSTANCE m_hdll;
2301    
2302                          SetDlgItemText(hDlg, IDC_BUILD, XVID_BUILD);                          SetDlgItemText(hDlg, IDC_BUILD, XVID_BUILD);
2303                          SetDlgItemText(hDlg, IDC_SPECIAL_BUILD, XVID_SPECIAL_BUILD);  #ifdef _WIN64
2304                            wsprintf(core, "(%s, 64-bit Edition)", XVID_SPECIAL_BUILD);
2305    #else
2306                            wsprintf(core, "(%s)", XVID_SPECIAL_BUILD);
2307    #endif
2308                            SetDlgItemText(hDlg, IDC_SPECIAL_BUILD, core);
2309    
2310                          memset(&info, 0, sizeof(info));                          memset(&info, 0, sizeof(info));
2311                          info.version = XVID_VERSION;                          info.version = XVID_VERSION;
# Line 2335  Line 2340 
2340                                  }                                  }
2341                          }                          }
2342    
2343                          SetClassLong(GetDlgItem(hDlg, IDC_WEBSITE), GCL_HCURSOR, (LONG)LoadCursor(NULL, IDC_HAND));                          SetClassLongPtr(GetDlgItem(hDlg, IDC_WEBSITE), GCLP_HCURSOR, (LONG)LoadCursor(NULL, IDC_HAND));
2344                          SetDlgItemText(hDlg, IDC_WEBSITE, XVID_WEBSITE);                          SetDlgItemText(hDlg, IDC_WEBSITE, XVID_WEBSITE);
2345                  }                  }
2346                  break;                  break;

Legend:
Removed from v.1802  
changed lines
  Added in v.1827

No admin address has been configured
ViewVC Help
Powered by ViewVC 1.0.4