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

This commit is contained in:
Vincent Povirk 2009-02-25 19:14:30 -06:00 committed by Alexandre Julliard
parent 6e5c2f961d
commit 8e4aff7a4d
3 changed files with 9 additions and 1 deletions

View File

@ -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

View File

@ -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 )
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);
} }

View File

@ -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