[WINHTTP] Sync with Wine Staging 3.9. CORE-14656
[reactos.git] / dll / cpl / intl / languages.c
1 #include "intl.h"
2
3 #include <shellapi.h>
4
5 /* Property page dialog callback */
6 INT_PTR CALLBACK
7 LanguagesPageProc(HWND hwndDlg,
8 UINT uMsg,
9 WPARAM wParam,
10 LPARAM lParam)
11 {
12 SHELLEXECUTEINFOW shInputDll;
13 PGLOBALDATA pGlobalData;
14
15 pGlobalData = (PGLOBALDATA)GetWindowLongPtr(hwndDlg, DWLP_USER);
16
17 switch (uMsg)
18 {
19 case WM_INITDIALOG:
20 pGlobalData = (PGLOBALDATA)((LPPROPSHEETPAGE)lParam)->lParam;
21 SetWindowLongPtr(hwndDlg, DWLP_USER, (LONG_PTR)pGlobalData);
22
23 if (!pGlobalData->bIsUserAdmin)
24 {
25 EnableWindow(GetDlgItem(hwndDlg, IDC_INST_FILES_FOR_RTOL_LANG), FALSE);
26 EnableWindow(GetDlgItem(hwndDlg, IDC_INST_FILES_FOR_ASIAN), FALSE);
27 }
28 break;
29
30 case WM_COMMAND:
31 switch (LOWORD(wParam))
32 {
33 /* If "detail" button pressed */
34 case IDC_DETAIL_BUTTON:
35 if (HIWORD(wParam) == BN_CLICKED)
36 {
37 memset(&shInputDll, 0x0, sizeof(SHELLEXECUTEINFOW));
38 shInputDll.cbSize = sizeof(shInputDll);
39 shInputDll.hwnd = hwndDlg;
40 shInputDll.lpVerb = L"open";
41 shInputDll.lpFile = L"RunDll32.exe";
42 shInputDll.lpParameters = L"shell32.dll,Control_RunDLL input.dll";
43 if (ShellExecuteExW(&shInputDll) == 0)
44 {
45 PrintErrorMsgBox(IDS_ERROR_INPUT_DLL);
46 }
47 }
48 break;
49 }
50 break;
51 }
52 return FALSE;
53 }
54
55 /* EOF */