Frank Richter : winecfg: Make load_string public.
Alexandre Julliard
julliard at wine.codeweavers.com
Wed Aug 16 06:16:10 CDT 2006
Module: wine
Branch: master
Commit: 722ee099c151a3881a5816b158973196e9f3a39b
URL: http://source.winehq.org/git/?p=wine.git;a=commit;h=722ee099c151a3881a5816b158973196e9f3a39b
Author: Frank Richter <frank.richter at gmail.com>
Date: Wed Aug 16 06:22:54 2006 +0200
winecfg: Make load_string public.
---
programs/winecfg/main.c | 15 ---------------
programs/winecfg/winecfg.c | 15 +++++++++++++++
programs/winecfg/winecfg.h | 3 +++
3 files changed, 18 insertions(+), 15 deletions(-)
diff --git a/programs/winecfg/main.c b/programs/winecfg/main.c
index d2b3100..6fc77f7 100644
--- a/programs/winecfg/main.c
+++ b/programs/winecfg/main.c
@@ -78,21 +78,6 @@ AboutDlgProc (HWND hDlg, UINT uMsg, WPAR
return FALSE;
}
-static WCHAR* load_string (UINT id)
-{
- WCHAR buf[100];
- int len;
- WCHAR* newStr;
-
- LoadStringW (GetModuleHandle (NULL), id, buf, sizeof(buf)/sizeof(buf[0]));
-
- len = lstrlenW (buf);
- newStr = HeapAlloc (GetProcessHeap(), 0, (len + 1) * sizeof (WCHAR));
- memcpy (newStr, buf, len * sizeof (WCHAR));
- newStr[len] = 0;
- return newStr;
-}
-
#define NUM_PROPERTY_PAGES 7
static INT_PTR
diff --git a/programs/winecfg/winecfg.c b/programs/winecfg/winecfg.c
index 2d70fca..dfa5aeb 100644
--- a/programs/winecfg/winecfg.c
+++ b/programs/winecfg/winecfg.c
@@ -72,6 +72,21 @@ void set_window_title(HWND dialog)
}
+WCHAR* load_string (UINT id)
+{
+ WCHAR buf[100];
+ int len;
+ WCHAR* newStr;
+
+ LoadStringW (GetModuleHandle (NULL), id, buf, sizeof(buf)/sizeof(buf[0]));
+
+ len = lstrlenW (buf);
+ newStr = HeapAlloc (GetProcessHeap(), 0, (len + 1) * sizeof (WCHAR));
+ memcpy (newStr, buf, len * sizeof (WCHAR));
+ newStr[len] = 0;
+ return newStr;
+}
+
/**
* get_config_key: Retrieves a configuration value from the registry
*
diff --git a/programs/winecfg/winecfg.h b/programs/winecfg/winecfg.h
index 53fe9ee..5332abe 100644
--- a/programs/winecfg/winecfg.h
+++ b/programs/winecfg/winecfg.h
@@ -58,6 +58,9 @@ BOOL reg_key_exists(HKEY root, const cha
void apply(void);
char **enumerate_values(HKEY root, char *path);
+/* Load a string from the resources. Allocated with HeapAlloc (GetProcessHeap()) */
+WCHAR* load_string (UINT id);
+
/* returns a string of the form "AppDefaults\\appname.exe\\section", or just "section" if
the user is editing the global settings.
More information about the wine-cvs
mailing list