[PATCH v3] msinfo32: Display an About dialog when the program is run
Hugh McMaster
hugh.mcmaster at outlook.com
Tue Oct 4 22:26:31 CDT 2016
From: Alex Henrie <alexhenrie24 at gmail.com>
Signed-off-by: Alex Henrie <alexhenrie24 at gmail.com>
Signed-off-by: Hugh McMaster <hugh.mcmaster at outlook.com>
Changes since v2:
* Remove camelcase from the WCHAR buffer variable.
* Split the resulting long line.
---
programs/msinfo32/Makefile.in | 3 +++
programs/msinfo32/main.c | 9 +++++++++
programs/msinfo32/msinfo32.rc | 24 ++++++++++++++++++++++++
programs/msinfo32/resource.h | 19 +++++++++++++++++++
4 files changed, 55 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..f64d266 100644
--- a/programs/msinfo32/main.c
+++ b/programs/msinfo32/main.c
@@ -16,18 +16,27 @@
* 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[])
{
int i;
+ WCHAR system_info[64];
WINE_FIXME("stub:");
for (i = 0; i < argc; i++)
WINE_FIXME(" %s", wine_dbgstr_w(argv[i]));
WINE_FIXME("\n");
+ LoadStringW(GetModuleHandleW(NULL), STRING_SYSTEM_INFO,
+ system_info, sizeof(system_info)/sizeof(WCHAR));
+ ShellAboutW(NULL, system_info, 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.7.4
More information about the wine-patches
mailing list