705 |
|
|
706 |
static BOOL CALLBACK quantmatrix_proc(HWND hDlg, UINT uMsg, WPARAM wParam, LPARAM lParam) |
static BOOL 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 |
|
|
1105 |
EnableDlgWindow(hDlg, IDC_CPU_MMXEXT, cpu_force); |
EnableDlgWindow(hDlg, IDC_CPU_MMXEXT, cpu_force); |
1106 |
EnableDlgWindow(hDlg, IDC_CPU_SSE, cpu_force); |
EnableDlgWindow(hDlg, IDC_CPU_SSE, cpu_force); |
1107 |
EnableDlgWindow(hDlg, IDC_CPU_SSE2, cpu_force); |
EnableDlgWindow(hDlg, IDC_CPU_SSE2, cpu_force); |
1108 |
|
EnableDlgWindow(hDlg, IDC_CPU_SSE3, cpu_force); |
1109 |
|
EnableDlgWindow(hDlg, IDC_CPU_SSE4, cpu_force); |
1110 |
EnableDlgWindow(hDlg, IDC_CPU_3DNOW, cpu_force); |
EnableDlgWindow(hDlg, IDC_CPU_3DNOW, cpu_force); |
1111 |
EnableDlgWindow(hDlg, IDC_CPU_3DNOWEXT, cpu_force); |
EnableDlgWindow(hDlg, IDC_CPU_3DNOWEXT, cpu_force); |
1112 |
break; |
break; |
1258 |
CheckDlg(hDlg, IDC_CPU_MMXEXT, (config->cpu & XVID_CPU_MMXEXT)); |
CheckDlg(hDlg, IDC_CPU_MMXEXT, (config->cpu & XVID_CPU_MMXEXT)); |
1259 |
CheckDlg(hDlg, IDC_CPU_SSE, (config->cpu & XVID_CPU_SSE)); |
CheckDlg(hDlg, IDC_CPU_SSE, (config->cpu & XVID_CPU_SSE)); |
1260 |
CheckDlg(hDlg, IDC_CPU_SSE2, (config->cpu & XVID_CPU_SSE2)); |
CheckDlg(hDlg, IDC_CPU_SSE2, (config->cpu & XVID_CPU_SSE2)); |
1261 |
|
CheckDlg(hDlg, IDC_CPU_SSE3, (config->cpu & XVID_CPU_SSE3)); |
1262 |
|
CheckDlg(hDlg, IDC_CPU_SSE4, (config->cpu & XVID_CPU_SSE41)); |
1263 |
CheckDlg(hDlg, IDC_CPU_3DNOW, (config->cpu & XVID_CPU_3DNOW)); |
CheckDlg(hDlg, IDC_CPU_3DNOW, (config->cpu & XVID_CPU_3DNOW)); |
1264 |
CheckDlg(hDlg, IDC_CPU_3DNOWEXT, (config->cpu & XVID_CPU_3DNOWEXT)); |
CheckDlg(hDlg, IDC_CPU_3DNOWEXT, (config->cpu & XVID_CPU_3DNOWEXT)); |
1265 |
|
|
1457 |
config->cpu |= IsDlgChecked(hDlg, IDC_CPU_MMXEXT) ? XVID_CPU_MMXEXT : 0; |
config->cpu |= IsDlgChecked(hDlg, IDC_CPU_MMXEXT) ? XVID_CPU_MMXEXT : 0; |
1458 |
config->cpu |= IsDlgChecked(hDlg, IDC_CPU_SSE) ? XVID_CPU_SSE : 0; |
config->cpu |= IsDlgChecked(hDlg, IDC_CPU_SSE) ? XVID_CPU_SSE : 0; |
1459 |
config->cpu |= IsDlgChecked(hDlg, IDC_CPU_SSE2) ? XVID_CPU_SSE2 : 0; |
config->cpu |= IsDlgChecked(hDlg, IDC_CPU_SSE2) ? XVID_CPU_SSE2 : 0; |
1460 |
|
config->cpu |= IsDlgChecked(hDlg, IDC_CPU_SSE3) ? XVID_CPU_SSE3 : 0; |
1461 |
|
config->cpu |= IsDlgChecked(hDlg, IDC_CPU_SSE4) ? XVID_CPU_SSE41 : 0; |
1462 |
config->cpu |= IsDlgChecked(hDlg, IDC_CPU_3DNOW) ? XVID_CPU_3DNOW : 0; |
config->cpu |= IsDlgChecked(hDlg, IDC_CPU_3DNOW) ? XVID_CPU_3DNOW : 0; |
1463 |
config->cpu |= IsDlgChecked(hDlg, IDC_CPU_3DNOWEXT) ? XVID_CPU_3DNOWEXT : 0; |
config->cpu |= IsDlgChecked(hDlg, IDC_CPU_3DNOWEXT) ? XVID_CPU_3DNOWEXT : 0; |
1464 |
config->cpu |= IsDlgChecked(hDlg, IDC_CPU_FORCE) ? XVID_CPU_FORCE : 0; |
config->cpu |= IsDlgChecked(hDlg, IDC_CPU_FORCE) ? XVID_CPU_FORCE : 0; |
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); |
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; |
1751 |
psh.dwFlags = PSH_PROPSHEETPAGE | PSH_NOAPPLYNOW | PSH_NOCONTEXTHELP; |
psh.dwFlags = PSH_PROPSHEETPAGE | PSH_NOAPPLYNOW | PSH_NOCONTEXTHELP; |
1752 |
psh.hwndParent = hParent; |
psh.hwndParent = hParent; |
1753 |
psh.hInstance = g_hInst; |
psh.hInstance = g_hInst; |
1754 |
psh.pszCaption = (LPSTR) "XviD Configuration"; |
psh.pszCaption = (LPSTR) "Xvid Configuration"; |
1755 |
psh.nPages = size; |
psh.nPages = size; |
1756 |
psh.nStartPage = 0; |
psh.nStartPage = 0; |
1757 |
psh.ppsp = (LPCPROPSHEETPAGE)&psp; |
psh.ppsp = (LPCPROPSHEETPAGE)&psp; |
1920 |
|
|
1921 |
BOOL CALLBACK main_proc(HWND hDlg, UINT uMsg, WPARAM wParam, LPARAM lParam) |
BOOL 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++) |
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)); |
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 |
} |
} |
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; |
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; |