mirror of
https://github.com/reactos/reactos.git
synced 2025-04-21 20:50:29 +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 "progman.h"
|
||||||
#include <strsafe.h>
|
|
||||||
|
|
||||||
#include <commdlg.h>
|
#include <commdlg.h>
|
||||||
|
|
||||||
|
@ -514,7 +513,7 @@ EnumPickIconResourceProc(HMODULE hModule, LPCWSTR lpszType, LPWSTR lpszName, LON
|
||||||
WCHAR szName[100];
|
WCHAR szName[100];
|
||||||
|
|
||||||
if (IS_INTRESOURCE(lpszName))
|
if (IS_INTRESOURCE(lpszName))
|
||||||
swprintf(szName, L"%u", lpszName);
|
StringCbPrintfW(szName, sizeof(szName), L"%u", (unsigned)(UINT_PTR)lpszName);
|
||||||
else
|
else
|
||||||
StringCbCopyW(szName, sizeof(szName), lpszName);
|
StringCbCopyW(szName, sizeof(szName), lpszName);
|
||||||
|
|
||||||
|
|
|
@ -463,7 +463,7 @@ GROUP_AddGroup(GROUPFORMAT format, BOOL bIsCommonGroup, LPCWSTR lpszName, LPCWST
|
||||||
&WndPl.rcNormalPosition.top,
|
&WndPl.rcNormalPosition.top,
|
||||||
&WndPl.rcNormalPosition.right,
|
&WndPl.rcNormalPosition.right,
|
||||||
&WndPl.rcNormalPosition.bottom,
|
&WndPl.rcNormalPosition.bottom,
|
||||||
&WndPl.ptMinPosition,
|
&WndPl.ptMinPosition.x,
|
||||||
&WndPl.ptMinPosition.y,
|
&WndPl.ptMinPosition.y,
|
||||||
&WndPl.showCmd,
|
&WndPl.showCmd,
|
||||||
&skip) == 7)
|
&skip) == 7)
|
||||||
|
|
|
@ -306,7 +306,7 @@ MAIN_SetMainWindowTitle(VOID)
|
||||||
caption = Alloc(HEAP_ZERO_MEMORY, size);
|
caption = Alloc(HEAP_ZERO_MEMORY, size);
|
||||||
if (caption)
|
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);
|
SetWindowTextW(Globals.hMainWnd, caption);
|
||||||
Free(caption);
|
Free(caption);
|
||||||
}
|
}
|
||||||
|
@ -582,12 +582,13 @@ MAIN_SaveSettings(VOID)
|
||||||
|
|
||||||
WndPl.length = sizeof(WndPl);
|
WndPl.length = sizeof(WndPl);
|
||||||
GetWindowPlacement(Globals.hMainWnd, &WndPl);
|
GetWindowPlacement(Globals.hMainWnd, &WndPl);
|
||||||
swprintf(buffer, L"%d %d %d %d %d",
|
StringCbPrintfW(buffer, sizeof(buffer),
|
||||||
WndPl.rcNormalPosition.left,
|
L"%d %d %d %d %d",
|
||||||
WndPl.rcNormalPosition.top,
|
WndPl.rcNormalPosition.left,
|
||||||
WndPl.rcNormalPosition.right,
|
WndPl.rcNormalPosition.top,
|
||||||
WndPl.rcNormalPosition.bottom,
|
WndPl.rcNormalPosition.right,
|
||||||
WndPl.showCmd);
|
WndPl.rcNormalPosition.bottom,
|
||||||
|
WndPl.showCmd);
|
||||||
|
|
||||||
dwSize = wcslen(buffer) * sizeof(WCHAR);
|
dwSize = wcslen(buffer) * sizeof(WCHAR);
|
||||||
RegSetValueExW(Globals.hKeyPMSettings, L"Window", 0, REG_SZ, (LPBYTE)buffer, dwSize);
|
RegSetValueExW(Globals.hKeyPMSettings, L"Window", 0, REG_SZ, (LPBYTE)buffer, dwSize);
|
||||||
|
|
|
@ -48,6 +48,7 @@
|
||||||
#include <richedit.h>
|
#include <richedit.h>
|
||||||
|
|
||||||
#include <windowsx.h>
|
#include <windowsx.h>
|
||||||
|
#include <strsafe.h>
|
||||||
|
|
||||||
#define MAX_STRING_LEN 255
|
#define MAX_STRING_LEN 255
|
||||||
#define MAX_PATHNAME_LEN 1024
|
#define MAX_PATHNAME_LEN 1024
|
||||||
|
|
Loading…
Reference in a new issue