winecfg: Make load_string public.
This commit is contained in:
parent
acdae15360
commit
722ee099c1
|
@ -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.
|
||||
|
||||
|
|
Loading…
Reference in New Issue