[PATCH v2] msinfo32: Display an About dialog when the program is run.
Alex Henrie
alexhenrie24 at gmail.com
Tue Oct 4 10:22:00 CDT 2016
Cc: Hugh McMaster <hugh.mcmaster at outlook.com>
Cc: Austin English <austinenglish at gmail.com>
Fixes https://bugs.winehq.org/show_bug.cgi?id=41430
An About dialog displays the most important piece of information (the
Wine version), and we were going to have to add one to this program
eventually anyway.
Signed-off-by: Alex Henrie <alexhenrie24 at gmail.com>
---
programs/msinfo32/Makefile.in | 3 +++
programs/msinfo32/main.c | 8 ++++++++
programs/msinfo32/msinfo32.rc | 24 ++++++++++++++++++++++++
programs/msinfo32/resource.h | 19 +++++++++++++++++++
4 files changed, 54 insertions(+)
create mode 100644 programs/msinfo32/msinfo32.rc
create mode 100644 programs/msinfo32/resource.h
diff --git a/programs/msinfo32/Makefile.in b/programs/msinfo32/Makefile.in
index e958c27..d752c91 100644
--- a/programs/msinfo32/Makefile.in
+++ b/programs/msinfo32/Makefile.in
@@ -1,5 +1,8 @@
MODULE = msinfo32.exe
APPMODE = -mwindows -municode
+IMPORTS = shell32 user32
C_SRCS = \
main.c
+
+RC_SRCS = msinfo32.rc
diff --git a/programs/msinfo32/main.c b/programs/msinfo32/main.c
index 77bb927..1f213bd 100644
--- a/programs/msinfo32/main.c
+++ b/programs/msinfo32/main.c
@@ -16,12 +16,17 @@
* Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA
*/
+#include <shlwapi.h>
+#include <shellapi.h>
+
#include "wine/debug.h"
+#include "resource.h"
WINE_DEFAULT_DEBUG_CHANNEL(msinfo);
int wmain(int argc, WCHAR *argv[])
{
+ WCHAR systemInfo[64];
int i;
WINE_FIXME("stub:");
@@ -29,5 +34,8 @@ int wmain(int argc, WCHAR *argv[])
WINE_FIXME(" %s", wine_dbgstr_w(argv[i]));
WINE_FIXME("\n");
+ LoadStringW(GetModuleHandleW(NULL), STRING_SYSTEM_INFO, systemInfo, sizeof(systemInfo)/sizeof(WCHAR));
+ ShellAboutW(NULL, systemInfo, NULL, NULL);
+
return 0;
}
diff --git a/programs/msinfo32/msinfo32.rc b/programs/msinfo32/msinfo32.rc
new file mode 100644
index 0000000..ce4ab62
--- /dev/null
+++ b/programs/msinfo32/msinfo32.rc
@@ -0,0 +1,24 @@
+/*
+ * Copyright 2016 Alex Henrie
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public
+ * License as published by the Free Software Foundation; either
+ * version 2.1 of the License, or (at your option) any later version.
+ *
+ * This library is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this library; if not, write to the Free Software
+ * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA
+ */
+
+#include "resource.h"
+
+STRINGTABLE
+{
+ STRING_SYSTEM_INFO, "System Information"
+}
diff --git a/programs/msinfo32/resource.h b/programs/msinfo32/resource.h
new file mode 100644
index 0000000..47c3652
--- /dev/null
+++ b/programs/msinfo32/resource.h
@@ -0,0 +1,19 @@
+/*
+ * Copyright 2016 Alex Henrie
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public
+ * License as published by the Free Software Foundation; either
+ * version 2.1 of the License, or (at your option) any later version.
+ *
+ * This library is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this library; if not, write to the Free Software
+ * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA
+ */
+
+#define STRING_SYSTEM_INFO 100
--
2.10.0
More information about the wine-patches
mailing list