[PATCH] msinfo32: Display an About dialog when the program is run.

Hugh McMaster hugh.mcmaster at outlook.com
Tue Oct 4 04:06:56 CDT 2016


On Monday, 3 October 2016 5:14 PM, Alex Henrie wrote:
    
> msinfo32 does not take any command line arguments, so I changed
> WINE_FIXME to WINE_TRACE.

No. msinfo32 accepts many command line arguments. See, for example, https://support.microsoft.com/en-au/kb/300887.

> +#include <shlwapi.h>
> +
> +#include "resource.h"
> +#include "shellapi.h"
>  #include "wine/debug.h"
 
resource.h should come after wine/debug.h. You might also like to put shellapi.h before shlwapi.h.

> int wmain(int argc, WCHAR *argv[])
> {
> +    static const WCHAR wineSystemInfoW[] =
> +        {'W','i','n','e',' ','S','y','s','t','e','m',' ','I','n','f','o','r','m','a','t','i','o','n',0};
> +    WCHAR systemInfo[64];
>     int i;
> 
> -    WINE_FIXME("stub:");
>     for (i = 0; i < argc; i++)
> -        WINE_FIXME(" %s", wine_dbgstr_w(argv[i]));
> -    WINE_FIXME("\n");
> +        WINE_TRACE(" %s", wine_dbgstr_w(argv[i]));
> +    WINE_TRACE("\n");
> +
> +    LoadStringW(GetModuleHandleW(NULL), STRING_SYSTEM_INFO, systemInfo, sizeof(systemInfo)/sizeof(WCHAR));
> +    ShellAboutW(NULL, systemInfo, wineSystemInfoW, NULL);
 
The dialog box text should also be translatable. Add it to the string table as well.

> +#include "resource.h"
> +
> +STRINGTABLE
> +{
> +    STRING_SYSTEM_INFO, "System Information"
> +}

> +#define STRING_SYSTEM_INFO 0x170

Why #define this as 0x170? We normally start string tables from, e.g., 100, 101, 1000 or 1001.

    


More information about the wine-devel mailing list