Commit 8e4aff7a authored by Vincent Povirk's avatar Vincent Povirk Committed by Alexandre Julliard

shell32: Add a message for opening files with no association.

parent 6e5c2f96
...@@ -282,6 +282,8 @@ STRINGTABLE ...@@ -282,6 +282,8 @@ STRINGTABLE
IDS_CPANEL_TITLE "Wine Control Panel" IDS_CPANEL_TITLE "Wine Control Panel"
IDS_CPANEL_NAME "Name" IDS_CPANEL_NAME "Name"
IDS_CPANEL_DESCRIPTION "Description" IDS_CPANEL_DESCRIPTION "Description"
IDS_SHLEXEC_NOASSOC "There is no Windows program configured to open this type of file."
} }
STRINGTABLE STRINGTABLE
......
...@@ -45,6 +45,7 @@ ...@@ -45,6 +45,7 @@
#include "wine/winbase16.h" #include "wine/winbase16.h"
#include "shell32_main.h" #include "shell32_main.h"
#include "pidl.h" #include "pidl.h"
#include "shresdef.h"
#include "wine/debug.h" #include "wine/debug.h"
...@@ -1454,7 +1455,10 @@ static void do_error_dialog( UINT_PTR retval, HWND hwnd ) ...@@ -1454,7 +1455,10 @@ static void do_error_dialog( UINT_PTR retval, HWND hwnd )
WCHAR msg[2048]; WCHAR msg[2048];
int error_code=GetLastError(); int error_code=GetLastError();
FormatMessageW(FORMAT_MESSAGE_FROM_SYSTEM, NULL, error_code, 0, msg, sizeof(msg)/sizeof(WCHAR), NULL); if (retval == SE_ERR_NOASSOC)
LoadStringW(shell32_hInstance, IDS_SHLEXEC_NOASSOC, msg, sizeof(msg)/sizeof(WCHAR));
else
FormatMessageW(FORMAT_MESSAGE_FROM_SYSTEM, NULL, error_code, 0, msg, sizeof(msg)/sizeof(WCHAR), NULL);
MessageBoxW(hwnd, msg, NULL, MB_ICONERROR); MessageBoxW(hwnd, msg, NULL, MB_ICONERROR);
} }
......
...@@ -106,6 +106,8 @@ ...@@ -106,6 +106,8 @@
#define IDS_RUNDLG_BROWSE_CAPTION 162 #define IDS_RUNDLG_BROWSE_CAPTION 162
#define IDS_RUNDLG_BROWSE_FILTER 163 #define IDS_RUNDLG_BROWSE_FILTER 163
#define IDS_SHLEXEC_NOASSOC 164
#define IDS_LICENSE 256 #define IDS_LICENSE 256
#define IDS_LICENSE_CAPTION 257 #define IDS_LICENSE_CAPTION 257
......
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