Commit 13866e81 authored by Mikołaj Zalewski's avatar Mikołaj Zalewski Committed by Alexandre Julliard

shell32: RunFileDlg: use symbolic constants for control IDs and use correct…

shell32: RunFileDlg: use symbolic constants for control IDs and use correct hInstance when creating it.
parent 03242376
...@@ -111,8 +111,7 @@ void WINAPI RunFileDlgW( ...@@ -111,8 +111,7 @@ void WINAPI RunFileDlgW(
return; return;
} }
DialogBoxIndirectParamW((HINSTANCE)GetWindowLongPtrW( hwndOwner, DialogBoxIndirectParamW(shell32_hInstance,
GWLP_HINSTANCE ),
template, hwndOwner, RunDlgProc, (LPARAM)&rfdp); template, hwndOwner, RunDlgProc, (LPARAM)&rfdp);
} }
...@@ -130,8 +129,8 @@ static INT_PTR CALLBACK RunDlgProc (HWND hwnd, UINT message, WPARAM wParam, LPAR ...@@ -130,8 +129,8 @@ static INT_PTR CALLBACK RunDlgProc (HWND hwnd, UINT message, WPARAM wParam, LPAR
SetClassLongPtrW (hwnd, GCLP_HICON, (LPARAM)prfdp->hIcon) ; SetClassLongPtrW (hwnd, GCLP_HICON, (LPARAM)prfdp->hIcon) ;
SendMessageW (GetDlgItem (hwnd, 12297), STM_SETICON, SendMessageW (GetDlgItem (hwnd, 12297), STM_SETICON,
(WPARAM)LoadIconW (NULL, (LPCWSTR)IDI_WINLOGO), 0); (WPARAM)LoadIconW (NULL, (LPCWSTR)IDI_WINLOGO), 0);
FillList (GetDlgItem (hwnd, 12298), NULL) ; FillList (GetDlgItem (hwnd, IDC_RUNDLG_EDITPATH), NULL) ;
SetFocus (GetDlgItem (hwnd, 12298)) ; SetFocus (GetDlgItem (hwnd, IDC_RUNDLG_EDITPATH)) ;
return TRUE ; return TRUE ;
case WM_COMMAND : case WM_COMMAND :
...@@ -140,7 +139,7 @@ static INT_PTR CALLBACK RunDlgProc (HWND hwnd, UINT message, WPARAM wParam, LPAR ...@@ -140,7 +139,7 @@ static INT_PTR CALLBACK RunDlgProc (HWND hwnd, UINT message, WPARAM wParam, LPAR
case IDOK : case IDOK :
{ {
int ic ; int ic ;
HWND htxt = GetDlgItem (hwnd, 12298); /* edit control */ HWND htxt = GetDlgItem (hwnd, IDC_RUNDLG_EDITPATH);
if ((ic = GetWindowTextLengthW (htxt))) if ((ic = GetWindowTextLengthW (htxt)))
{ {
WCHAR *psz ; WCHAR *psz ;
...@@ -181,7 +180,7 @@ static INT_PTR CALLBACK RunDlgProc (HWND hwnd, UINT message, WPARAM wParam, LPAR ...@@ -181,7 +180,7 @@ static INT_PTR CALLBACK RunDlgProc (HWND hwnd, UINT message, WPARAM wParam, LPAR
EndDialog (hwnd, 0) ; EndDialog (hwnd, 0) ;
return TRUE ; return TRUE ;
case 12288 : case IDC_RUNDLG_BROWSE :
{ {
HMODULE hComdlg = NULL ; HMODULE hComdlg = NULL ;
LPFNOFN ofnProc = NULL ; LPFNOFN ofnProc = NULL ;
......
...@@ -159,10 +159,10 @@ FONT 8, "MS Shell Dlg" ...@@ -159,10 +159,10 @@ FONT 8, "MS Shell Dlg"
ICON "", 12297, 7, 11, 18, 20, WS_VISIBLE ICON "", 12297, 7, 11, 18, 20, WS_VISIBLE
LTEXT "Type the name of a program, folder, document, or Internet resource, and Wine will open it for you.", 12289, 36, 11, 182, 18 LTEXT "Type the name of a program, folder, document, or Internet resource, and Wine will open it for you.", 12289, 36, 11, 182, 18
LTEXT "&Open:", 12305, 7, 39, 24, 10 LTEXT "&Open:", 12305, 7, 39, 24, 10
CONTROL "", 12298, "COMBOBOX", WS_TABSTOP | WS_GROUP | WS_VSCROLL | WS_VISIBLE | CBS_DISABLENOSCROLL | CBS_AUTOHSCROLL | CBS_DROPDOWN, 36, 37, 183, 100 CONTROL "", IDC_RUNDLG_EDITPATH, "COMBOBOX", WS_TABSTOP | WS_GROUP | WS_VSCROLL | WS_VISIBLE | CBS_DISABLENOSCROLL | CBS_AUTOHSCROLL | CBS_DROPDOWN, 36, 37, 183, 100
DEFPUSHBUTTON "OK", IDOK, 62, 63, 50, 14, WS_TABSTOP DEFPUSHBUTTON "OK", IDOK, 62, 63, 50, 14, WS_TABSTOP
PUSHBUTTON "Cancel", IDCANCEL, 116, 63, 50, 14, WS_TABSTOP PUSHBUTTON "Cancel", IDCANCEL, 116, 63, 50, 14, WS_TABSTOP
PUSHBUTTON "&Browse...", 12288, 170, 63, 50, 14, WS_TABSTOP PUSHBUTTON "&Browse...", IDC_RUNDLG_BROWSE, 170, 63, 50, 14, WS_TABSTOP
} }
STRINGTABLE STRINGTABLE
......
...@@ -172,4 +172,8 @@ FIXME: Need to add them, but for now just let them use the same: searching.avi ...@@ -172,4 +172,8 @@ FIXME: Need to add them, but for now just let them use the same: searching.avi
#define IDC_ABOUT_STATIC_TEXT2 101 #define IDC_ABOUT_STATIC_TEXT2 101
#define IDC_ABOUT_STATIC_TEXT3 102 #define IDC_ABOUT_STATIC_TEXT3 102
/* run dialog */
#define IDC_RUNDLG_BROWSE 12288
#define IDC_RUNDLG_EDITPATH 12298
#endif #endif
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment