mirror of
https://github.com/reactos/reactos.git
synced 2025-02-24 01:15:09 +00:00
[PROGMAN]
- Fix MSVC warnings - Use strsafe printf svn path=/trunk/; revision=73050
This commit is contained in:
parent
3d8a01fc0d
commit
f642128e8f
4 changed files with 11 additions and 10 deletions
|
@ -32,7 +32,6 @@
|
|||
*/
|
||||
|
||||
#include "progman.h"
|
||||
#include <strsafe.h>
|
||||
|
||||
#include <commdlg.h>
|
||||
|
||||
|
@ -514,7 +513,7 @@ EnumPickIconResourceProc(HMODULE hModule, LPCWSTR lpszType, LPWSTR lpszName, LON
|
|||
WCHAR szName[100];
|
||||
|
||||
if (IS_INTRESOURCE(lpszName))
|
||||
swprintf(szName, L"%u", lpszName);
|
||||
StringCbPrintfW(szName, sizeof(szName), L"%u", (unsigned)(UINT_PTR)lpszName);
|
||||
else
|
||||
StringCbCopyW(szName, sizeof(szName), lpszName);
|
||||
|
||||
|
|
|
@ -463,7 +463,7 @@ GROUP_AddGroup(GROUPFORMAT format, BOOL bIsCommonGroup, LPCWSTR lpszName, LPCWST
|
|||
&WndPl.rcNormalPosition.top,
|
||||
&WndPl.rcNormalPosition.right,
|
||||
&WndPl.rcNormalPosition.bottom,
|
||||
&WndPl.ptMinPosition,
|
||||
&WndPl.ptMinPosition.x,
|
||||
&WndPl.ptMinPosition.y,
|
||||
&WndPl.showCmd,
|
||||
&skip) == 7)
|
||||
|
|
|
@ -306,7 +306,7 @@ MAIN_SetMainWindowTitle(VOID)
|
|||
caption = Alloc(HEAP_ZERO_MEMORY, size);
|
||||
if (caption)
|
||||
{
|
||||
swprintf(caption, L"%s - %s\\%s", szTitle, lpDomainName, lpUserName);
|
||||
StringCbPrintfW(caption, size, L"%s - %s\\%s", szTitle, lpDomainName, lpUserName);
|
||||
SetWindowTextW(Globals.hMainWnd, caption);
|
||||
Free(caption);
|
||||
}
|
||||
|
@ -582,12 +582,13 @@ MAIN_SaveSettings(VOID)
|
|||
|
||||
WndPl.length = sizeof(WndPl);
|
||||
GetWindowPlacement(Globals.hMainWnd, &WndPl);
|
||||
swprintf(buffer, L"%d %d %d %d %d",
|
||||
WndPl.rcNormalPosition.left,
|
||||
WndPl.rcNormalPosition.top,
|
||||
WndPl.rcNormalPosition.right,
|
||||
WndPl.rcNormalPosition.bottom,
|
||||
WndPl.showCmd);
|
||||
StringCbPrintfW(buffer, sizeof(buffer),
|
||||
L"%d %d %d %d %d",
|
||||
WndPl.rcNormalPosition.left,
|
||||
WndPl.rcNormalPosition.top,
|
||||
WndPl.rcNormalPosition.right,
|
||||
WndPl.rcNormalPosition.bottom,
|
||||
WndPl.showCmd);
|
||||
|
||||
dwSize = wcslen(buffer) * sizeof(WCHAR);
|
||||
RegSetValueExW(Globals.hKeyPMSettings, L"Window", 0, REG_SZ, (LPBYTE)buffer, dwSize);
|
||||
|
|
|
@ -48,6 +48,7 @@
|
|||
#include <richedit.h>
|
||||
|
||||
#include <windowsx.h>
|
||||
#include <strsafe.h>
|
||||
|
||||
#define MAX_STRING_LEN 255
|
||||
#define MAX_PATHNAME_LEN 1024
|
||||
|
|
Loading…
Reference in a new issue