Commit 722ee099 authored by Frank Richter's avatar Frank Richter Committed by Alexandre Julliard

winecfg: Make load_string public.

parent acdae153
......@@ -78,21 +78,6 @@ AboutDlgProc (HWND hDlg, UINT uMsg, WPARAM wParam, LPARAM lParam)
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
......
......@@ -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
*
......
......@@ -58,6 +58,9 @@ BOOL reg_key_exists(HKEY root, const char *path, const char *name);
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.
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment