mirror of
https://github.com/reactos/reactos.git
synced 2025-02-22 16:36:33 +00:00
[SETUP:REACTOS] Add some SetWindowRes* helper functions
This commit is contained in:
parent
5b07c33031
commit
fd67017512
2 changed files with 62 additions and 0 deletions
|
@ -246,6 +246,47 @@ DisplayError(
|
|||
return iRes;
|
||||
}
|
||||
|
||||
VOID
|
||||
SetWindowResTextW(
|
||||
_In_ HWND hWnd,
|
||||
_In_opt_ HINSTANCE hInstance,
|
||||
_In_ UINT uID)
|
||||
{
|
||||
WCHAR szText[256];
|
||||
LoadStringW(hInstance, uID, szText, _countof(szText));
|
||||
SetWindowTextW(hWnd, szText);
|
||||
}
|
||||
|
||||
VOID
|
||||
SetWindowResPrintfVW(
|
||||
_In_ HWND hWnd,
|
||||
_In_opt_ HINSTANCE hInstance,
|
||||
_In_ UINT uID,
|
||||
_In_ va_list args)
|
||||
{
|
||||
WCHAR ResBuffer[256];
|
||||
WCHAR szText[256];
|
||||
|
||||
LoadStringW(hInstance, uID, ResBuffer, _countof(ResBuffer));
|
||||
StringCchVPrintfW(szText, _countof(szText), ResBuffer, args);
|
||||
SetWindowTextW(hWnd, szText);
|
||||
}
|
||||
|
||||
VOID
|
||||
__cdecl
|
||||
SetWindowResPrintfW(
|
||||
_In_ HWND hWnd,
|
||||
_In_opt_ HINSTANCE hInstance,
|
||||
_In_ UINT uID,
|
||||
...)
|
||||
{
|
||||
va_list args;
|
||||
|
||||
va_start(args, uID);
|
||||
SetWindowResPrintfVW(hWnd, hInstance, uID, args);
|
||||
va_end(args);
|
||||
}
|
||||
|
||||
static INT_PTR CALLBACK
|
||||
StartDlgProc(
|
||||
IN HWND hwndDlg,
|
||||
|
|
|
@ -255,6 +255,27 @@ DisplayError(
|
|||
_In_ UINT uIDMessage,
|
||||
...);
|
||||
|
||||
VOID
|
||||
SetWindowResTextW(
|
||||
_In_ HWND hWnd,
|
||||
_In_opt_ HINSTANCE hInstance,
|
||||
_In_ UINT uID);
|
||||
|
||||
VOID
|
||||
SetWindowResPrintfVW(
|
||||
_In_ HWND hWnd,
|
||||
_In_opt_ HINSTANCE hInstance,
|
||||
_In_ UINT uID,
|
||||
_In_ va_list args);
|
||||
|
||||
VOID
|
||||
__cdecl
|
||||
SetWindowResPrintfW(
|
||||
_In_ HWND hWnd,
|
||||
_In_opt_ HINSTANCE hInstance,
|
||||
_In_ UINT uID,
|
||||
...);
|
||||
|
||||
#endif /* _REACTOS_PCH_ */
|
||||
|
||||
/* EOF */
|
||||
|
|
Loading…
Reference in a new issue