Author: rharabien
Date: Mon Nov 28 21:54:45 2011
New Revision: 54529
URL:
http://svn.reactos.org/svn/reactos?rev=54529&view=rev
Log:
[SHELL32]
- Display file size in bytes in file properties dialog
- Don't use ULONGLONG if ULONG is enough
- Change LARGE_INTEGER to ULARGE_INTEGER where it makes sense
- Fix calculation of file size in CountFolderAndFiles
- WM_GETTEXT receives size in bytes (not characters count)
- Use Get(Set)DlgItemTextW instead of SendDlgItemMessageW
Patch by Carlo Bramix. Improvements by me.
See issue #6294 for more details.
Modified:
trunk/reactos/dll/win32/shell32/dialogs.cpp
trunk/reactos/dll/win32/shell32/drive.cpp
trunk/reactos/dll/win32/shell32/folder_options.cpp
trunk/reactos/dll/win32/shell32/fprop.cpp
trunk/reactos/dll/win32/shell32/lang/bg-BG.rc
trunk/reactos/dll/win32/shell32/lang/ca-ES.rc
trunk/reactos/dll/win32/shell32/lang/cs-CZ.rc
trunk/reactos/dll/win32/shell32/lang/da-DK.rc
trunk/reactos/dll/win32/shell32/lang/de-DE.rc
trunk/reactos/dll/win32/shell32/lang/el-GR.rc
trunk/reactos/dll/win32/shell32/lang/en-GB.rc
trunk/reactos/dll/win32/shell32/lang/en-US.rc
trunk/reactos/dll/win32/shell32/lang/es-ES.rc
trunk/reactos/dll/win32/shell32/lang/fi-FI.rc
trunk/reactos/dll/win32/shell32/lang/fr-FR.rc
trunk/reactos/dll/win32/shell32/lang/hu-HU.rc
trunk/reactos/dll/win32/shell32/lang/it-IT.rc
trunk/reactos/dll/win32/shell32/lang/ja-JP.rc
trunk/reactos/dll/win32/shell32/lang/ko-KR.rc
trunk/reactos/dll/win32/shell32/lang/nl-NL.rc
trunk/reactos/dll/win32/shell32/lang/no-NO.rc
trunk/reactos/dll/win32/shell32/lang/pl-PL.rc
trunk/reactos/dll/win32/shell32/lang/pt-BR.rc
trunk/reactos/dll/win32/shell32/lang/pt-PT.rc
trunk/reactos/dll/win32/shell32/lang/ro-RO.rc
trunk/reactos/dll/win32/shell32/lang/ru-RU.rc
trunk/reactos/dll/win32/shell32/lang/sk-SK.rc
trunk/reactos/dll/win32/shell32/lang/sl-SI.rc
trunk/reactos/dll/win32/shell32/lang/sv-SE.rc
trunk/reactos/dll/win32/shell32/lang/tr-TR.rc
trunk/reactos/dll/win32/shell32/lang/uk-UA.rc
trunk/reactos/dll/win32/shell32/lang/zh-CN.rc
trunk/reactos/dll/win32/shell32/lang/zh-TW.rc
trunk/reactos/dll/win32/shell32/precomp.h
trunk/reactos/dll/win32/shell32/she_ocmenu.cpp
trunk/reactos/dll/win32/shell32/shell32_main.h
trunk/reactos/dll/win32/shell32/shelllink.cpp
trunk/reactos/dll/win32/shell32/shlfileop.cpp
trunk/reactos/dll/win32/shell32/shresdef.h
Modified: trunk/reactos/dll/win32/shell32/dialogs.cpp
URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/dll/win32/shell32/dialogs.…
==============================================================================
--- trunk/reactos/dll/win32/shell32/dialogs.cpp [iso-8859-1] (original)
+++ trunk/reactos/dll/win32/shell32/dialogs.cpp [iso-8859-1] Mon Nov 28 21:54:45 2011
@@ -119,9 +119,9 @@
pIconContext->hDlgCtrl = GetDlgItem(hwndDlg, IDC_PICKICON_LIST);
EnumResourceNamesW(pIconContext->hLibrary, RT_ICON, EnumPickIconResourceProc,
(LPARAM)pIconContext);
if (PathUnExpandEnvStringsW(pIconContext->szName, szText, MAX_PATH))
- SendDlgItemMessageW(hwndDlg, IDC_EDIT_PATH, WM_SETTEXT, 0, (LPARAM)szText);
+ SetDlgItemTextW(hwndDlg, IDC_EDIT_PATH, szText);
else
- SendDlgItemMessageW(hwndDlg, IDC_EDIT_PATH, WM_SETTEXT, 0,
(LPARAM)pIconContext->szName);
+ SetDlgItemTextW(hwndDlg, IDC_EDIT_PATH, pIconContext->szName);
count = SendMessage(pIconContext->hDlgCtrl, LB_GETCOUNT, 0, 0);
if (count != LB_ERR)
@@ -138,7 +138,7 @@
case IDOK:
index = SendMessageW(pIconContext->hDlgCtrl, LB_GETCURSEL, 0, 0);
pIconContext->Index = index;
- SendDlgItemMessageW(hwndDlg, IDC_EDIT_PATH, WM_GETTEXT, MAX_PATH,
(LPARAM)pIconContext->szName);
+ GetDlgItemTextW(hwndDlg, IDC_EDIT_PATH, pIconContext->szName, MAX_PATH);
DestroyIconList(pIconContext->hDlgCtrl);
EndDialog(hwndDlg, 1);
break;
@@ -179,9 +179,9 @@
wcscpy(pIconContext->szName, szText);
EnumResourceNamesW(pIconContext->hLibrary, RT_ICON,
EnumPickIconResourceProc, (LPARAM)pIconContext);
if (PathUnExpandEnvStringsW(pIconContext->szName, szText, MAX_PATH))
- SendDlgItemMessageW(hwndDlg, IDC_EDIT_PATH, WM_SETTEXT, 0,
(LPARAM)szText);
+ SetDlgItemTextW(hwndDlg, IDC_EDIT_PATH, szText);
else
- SendDlgItemMessageW(hwndDlg, IDC_EDIT_PATH, WM_SETTEXT, 0,
(LPARAM)pIconContext->szName);
+ SetDlgItemTextW(hwndDlg, IDC_EDIT_PATH, pIconContext->szName);
SendMessageW(pIconContext->hDlgCtrl, LB_SETCURSEL, 0, 0);
}
Modified: trunk/reactos/dll/win32/shell32/drive.cpp
URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/dll/win32/shell32/drive.cp…
==============================================================================
--- trunk/reactos/dll/win32/shell32/drive.cpp [iso-8859-1] (original)
+++ trunk/reactos/dll/win32/shell32/drive.cpp [iso-8859-1] Mon Nov 28 21:54:45 2011
@@ -276,7 +276,7 @@
static
-ULONGLONG
+ULONG
GetFreeBytesShare(ULONGLONG TotalNumberOfFreeBytes, ULONGLONG TotalNumberOfBytes)
{
ULONGLONG Temp;
@@ -293,7 +293,7 @@
}
else
{
- return TotalNumberOfFreeBytes / Temp;
+ return (ULONG)(TotalNumberOfFreeBytes / Temp);
}
}
@@ -333,7 +333,7 @@
hBlueBrush = CreateSolidBrush(RGB(0, 0, 255));
hMagBrush = CreateSolidBrush(RGB(255, 0, 255));
- SendDlgItemMessageW(hwndDlg, 14006, WM_GETTEXT, 20, (LPARAM)szBuffer);
+ GetDlgItemTextW(hwndDlg, 14006, szBuffer, 20);
Result = _wtoi(szBuffer);
CopyRect(&rect, &drawItem->rcItem);
@@ -363,17 +363,17 @@
BOOL ret;
UINT DriveType;
ULARGE_INTEGER FreeBytesAvailable;
- LARGE_INTEGER TotalNumberOfFreeBytes;
- LARGE_INTEGER TotalNumberOfBytes;
+ ULARGE_INTEGER TotalNumberOfFreeBytes;
+ ULARGE_INTEGER TotalNumberOfBytes;
ret = GetVolumeInformationW(szDrive, szVolumeName, MAX_PATH+1, NULL,
&MaxComponentLength, &FileSystemFlags, FileSystemName, MAX_PATH+1);
if (ret)
{
/* set volume label */
- SendDlgItemMessageW(hwndDlg, 14000, WM_SETTEXT, (WPARAM)NULL,
(LPARAM)szVolumeName);
+ SetDlgItemTextW(hwndDlg, 14000, szVolumeName);
/* set filesystem type */
- SendDlgItemMessageW(hwndDlg, 14002, WM_SETTEXT, (WPARAM)NULL,
(LPARAM)FileSystemName);
+ SetDlgItemTextW(hwndDlg, 14002, FileSystemName);
}
@@ -381,10 +381,10 @@
if (DriveType == DRIVE_FIXED || DriveType == DRIVE_CDROM)
{
- if(GetDiskFreeSpaceExW(szDrive, &FreeBytesAvailable,
(PULARGE_INTEGER)&TotalNumberOfBytes, (PULARGE_INTEGER)&TotalNumberOfFreeBytes))
+ if(GetDiskFreeSpaceExW(szDrive, &FreeBytesAvailable, &TotalNumberOfBytes,
&TotalNumberOfFreeBytes))
{
WCHAR szResult[128];
- LONGLONG Result;
+ ULONG Result;
HANDLE hVolume;
DWORD BytesReturned = 0;
@@ -394,7 +394,7 @@
{
ret = DeviceIoControl(hVolume, IOCTL_DISK_GET_LENGTH_INFO, NULL, 0,
(LPVOID)&TotalNumberOfBytes, sizeof(ULARGE_INTEGER), &BytesReturned, NULL);
if (ret && StrFormatByteSizeW(TotalNumberOfBytes.QuadPart, szResult,
sizeof(szResult) / sizeof(WCHAR)))
- SendDlgItemMessageW(hwndDlg, 14007, WM_SETTEXT, (WPARAM)NULL,
(LPARAM)szResult);
+ SetDlgItemTextW(hwndDlg, 14007, szResult);
CloseHandle(hVolume);
}
@@ -402,35 +402,35 @@
TRACE("szResult %s hVOlume %p ret %d LengthInformation %ul Bytesreturned
%d\n", debugstr_w(szResult), hVolume, ret, TotalNumberOfBytes.QuadPart,
BytesReturned);
if (StrFormatByteSizeW(TotalNumberOfBytes.QuadPart -
FreeBytesAvailable.QuadPart, szResult, sizeof(szResult) / sizeof(WCHAR)))
- SendDlgItemMessageW(hwndDlg, 14003, WM_SETTEXT, (WPARAM)NULL,
(LPARAM)szResult);
+ SetDlgItemTextW(hwndDlg, 14003, szResult);
if (StrFormatByteSizeW(FreeBytesAvailable.QuadPart, szResult, sizeof(szResult) /
sizeof(WCHAR)))
- SendDlgItemMessageW(hwndDlg, 14005, WM_SETTEXT, (WPARAM)NULL,
(LPARAM)szResult);
+ SetDlgItemTextW(hwndDlg, 14005, szResult);
Result = GetFreeBytesShare(TotalNumberOfFreeBytes.QuadPart,
TotalNumberOfBytes.QuadPart);
/* set free bytes percentage */
- swprintf(szResult, L"%02d%%", Result);
- SendDlgItemMessageW(hwndDlg, 14006, WM_SETTEXT, (WPARAM)0, (LPARAM)szResult);
+ swprintf(szResult, L"%02u%%", Result);
+ SetDlgItemTextW(hwndDlg, 14006, szResult);
/* store used share amount */
Result = 100 - Result;
- swprintf(szResult, L"%02d%%", Result);
- SendDlgItemMessageW(hwndDlg, 14004, WM_SETTEXT, (WPARAM)0, (LPARAM)szResult);
+ swprintf(szResult, L"%02u%%", Result);
+ SetDlgItemTextW(hwndDlg, 14004, szResult);
if (DriveType == DRIVE_FIXED)
{
if (LoadStringW(shell32_hInstance, IDS_DRIVE_FIXED, szBuffer,
sizeof(szBuffer) / sizeof(WCHAR)))
- SendDlgItemMessageW(hwndDlg, 14001, WM_SETTEXT, (WPARAM)0,
(LPARAM)szBuffer);
+ SetDlgItemTextW(hwndDlg, 14001, szBuffer);
}
else /* DriveType == DRIVE_CDROM) */
{
if (LoadStringW(shell32_hInstance, IDS_DRIVE_CDROM, szBuffer,
sizeof(szBuffer) / sizeof(WCHAR)))
- SendDlgItemMessageW(hwndDlg, 14001, WM_SETTEXT, (WPARAM)0,
(LPARAM)szBuffer);
+ SetDlgItemTextW(hwndDlg, 14001, szBuffer);
}
}
}
/* set drive description */
- SendDlgItemMessageW(hwndDlg, 14009, WM_GETTEXT, (WPARAM)50, (LPARAM)szFormat);
+ GetDlgItemTextW(hwndDlg, 14009, szFormat, 50);
swprintf(szBuffer, szFormat, szDrive);
- SendDlgItemMessageW(hwndDlg, 14009, WM_SETTEXT, (WPARAM)NULL, (LPARAM)szBuffer);
+ SetDlgItemTextW(hwndDlg, 14009, szBuffer);
}
@@ -503,7 +503,7 @@
if (lppsn->hdr.code == PSN_APPLY)
{
lpstr = (LPWSTR)GetWindowLongPtr(hwndDlg, DWLP_USER);
- if (lpstr && SendDlgItemMessageW(hwndDlg, 14000, WM_GETTEXT,
sizeof(szPath)/sizeof(WCHAR), (LPARAM)szPath))
+ if (lpstr && GetDlgItemTextW(hwndDlg, 14000, szPath,
sizeof(szPath)/sizeof(WCHAR)))
{
szPath[(sizeof(szPath)/sizeof(WCHAR))-1] = L'\0';
SetVolumeLabelW(lpstr, szPath);
@@ -943,7 +943,7 @@
{
/* set volume label */
szText[(sizeof(szText)/sizeof(WCHAR))-1] = L'\0';
- SendDlgItemMessageW(hwndDlg, 28679, WM_SETTEXT, 0,
(LPARAM)&szText[Length+1]);
+ SetDlgItemTextW(hwndDlg, 28679, &szText[Length+1]);
}
Length += TempLength + 1;
}
Modified: trunk/reactos/dll/win32/shell32/folder_options.cpp
URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/dll/win32/shell32/folder_o…
==============================================================================
--- trunk/reactos/dll/win32/shell32/folder_options.cpp [iso-8859-1] (original)
+++ trunk/reactos/dll/win32/shell32/folder_options.cpp [iso-8859-1] Mon Nov 28 21:54:45
2011
@@ -36,7 +36,7 @@
{
DWORD cFiles;
DWORD cFolder;
- LARGE_INTEGER bSize;
+ ULARGE_INTEGER bSize;
HWND hwndDlg;
WCHAR szFolderPath[MAX_PATH];
}FOLDER_PROPERTIES_CONTEXT, *PFOLDER_PROPERTIES_CONTEXT;
@@ -452,7 +452,7 @@
/* format buffer */
swprintf(Buffer, FormatBuffer, &pItem->FileExtension[1]);
/* update dialog */
- SendDlgItemMessageW(hwndDlg, 14003, WM_SETTEXT, 0,
(LPARAM)Buffer);
+ SetDlgItemTextW(hwndDlg, 14003, Buffer);
if (!LoadStringW(shell32_hInstance, IDS_FILE_DETAILSADV,
FormatBuffer, sizeof(FormatBuffer) / sizeof(WCHAR)))
{
@@ -462,7 +462,7 @@
/* format buffer */
swprintf(Buffer, FormatBuffer, &pItem->FileExtension[1],
&pItem->FileDescription[0], &pItem->FileDescription[0]);
/* update dialog */
- SendDlgItemMessageW(hwndDlg, 14007, WM_SETTEXT, 0,
(LPARAM)Buffer);
+ SetDlgItemTextW(hwndDlg, 14007, Buffer);
}
}
break;
@@ -559,6 +559,7 @@
LPWSTR pOffset;
BOOL ret;
PFOLDER_PROPERTIES_CONTEXT pContext = (PFOLDER_PROPERTIES_CONTEXT) lParam;
+ ULARGE_INTEGER FileSize;
pOffset = PathAddBackslashW(pContext->szFolderPath);
if (!pOffset)
@@ -589,9 +590,11 @@
}
else
{
+ FileSize.u.LowPart = FindData.nFileSizeLow;
+ FileSize.u.HighPart = FindData.nFileSizeHigh;
+
pContext->cFiles++;
- pContext->bSize.u.LowPart += FindData.nFileSizeLow;
- pContext->bSize.u.HighPart += FindData.nFileSizeHigh;
+ pContext->bSize.QuadPart += FileSize.QuadPart;
}
}
else if (GetLastError() == ERROR_NO_MORE_FILES)
@@ -622,7 +625,7 @@
return;
/* set folder name */
- SendDlgItemMessageW(pContext->hwndDlg, 14001, WM_SETTEXT, 0, (LPARAM) (pFolderName
+ 1));
+ SetDlgItemTextW(pContext->hwndDlg, 14001, pFolderName + 1);
/* set folder location */
pFolderName[0] = L'\0';
if (wcslen(pContext->szFolderPath) == 2)
@@ -630,11 +633,11 @@
/* folder is located at root */
WCHAR szDrive[4] = {L'C',L':',L'\\',L'\0'};
szDrive[0] = pContext->szFolderPath[0];
- SendDlgItemMessageW(pContext->hwndDlg, 14007, WM_SETTEXT, 0, (LPARAM)
szDrive);
+ SetDlgItemTextW(pContext->hwndDlg, 14007, szDrive);
}
else
{
- SendDlgItemMessageW(pContext->hwndDlg, 14007, WM_SETTEXT, 0, (LPARAM)
pContext->szFolderPath);
+ SetDlgItemTextW(pContext->hwndDlg, 14007, pContext->szFolderPath);
}
pFolderName[0] = L'\\';
/* get folder properties */
@@ -656,7 +659,7 @@
{
FileTimeToSystemTime(&ft, &dt);
swprintf (szBuffer, wFormat, dt.wDay, dt.wMonth, dt.wYear, dt.wHour,
dt.wMinute);
- SendDlgItemMessageW(pContext->hwndDlg, 14015, WM_SETTEXT, 0, (LPARAM)
szBuffer);
+ SetDlgItemTextW(pContext->hwndDlg, 14015, szBuffer);
}
}
/* now enumerate enumerate contents */
@@ -667,12 +670,12 @@
LoadStringW(shell32_hInstance, IDS_FILE_FOLDER, szFormat,
sizeof(szFormat)/sizeof(WCHAR));
szFormat[(sizeof(szFormat)/sizeof(WCHAR))-1] = L'\0';
swprintf(szBuffer, szFormat, pContext->cFiles, pContext->cFolder);
- SendDlgItemMessageW(pContext->hwndDlg, 14011, WM_SETTEXT, 0, (LPARAM) szBuffer);
-
- if (StrFormatByteSizeW(pContext->bSize.QuadPart, szBuffer,
sizeof(szBuffer)/sizeof(WCHAR)))
+ SetDlgItemTextW(pContext->hwndDlg, 14011, szBuffer);
+
+ if (SH_FormatFileSizeWithBytes(&pContext->bSize, szBuffer,
sizeof(szBuffer)/sizeof(WCHAR)))
{
/* store folder size */
- SendDlgItemMessageW(pContext->hwndDlg, 14009, WM_SETTEXT, 0, (LPARAM)
szBuffer);
+ SetDlgItemTextW(pContext->hwndDlg, 14009, szBuffer);
}
}
Modified: trunk/reactos/dll/win32/shell32/fprop.cpp
URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/dll/win32/shell32/fprop.cp…
==============================================================================
--- trunk/reactos/dll/win32/shell32/fprop.cpp [iso-8859-1] (original)
+++ trunk/reactos/dll/win32/shell32/fprop.cpp [iso-8859-1] Mon Nov 28 21:54:45 2011
@@ -70,22 +70,123 @@
static LONG SH_FileGeneralOpensWith(HWND hwndDlg, WCHAR *fileext)
{
- HWND hDlgCtrl;
LONG result;
WCHAR wAppName[MAX_PATH] = {0};
WCHAR wAssocApp[MAX_PATH] = {0};
- hDlgCtrl = GetDlgItem(hwndDlg, 14007);
result = SH_GetAssociatedApplication(fileext, wAssocApp);
if (result == ERROR_SUCCESS)
{
_wsplitpath(wAssocApp, NULL, NULL, wAppName, NULL);
- SendMessageW(hDlgCtrl, WM_SETTEXT, (WPARAM)NULL, (LPARAM)wAppName);
+ SetDlgItemTextW(hwndDlg, 14007, wAppName);
}
return result;
+}
+
+/*************************************************************************
+ *
+ * SH_FormatFileSizeWithBytes
+ *
+ * Format a size in bytes to string.
+ *
+ * lpQwSize = Pointer to 64bit large integer to format
+ * pszBuf = Buffer to fill with output string
+ * cchBuf = size of pszBuf in characters
+ *
+ */
+
+LPWSTR SH_FormatFileSizeWithBytes(PULARGE_INTEGER lpQwSize, LPWSTR pszBuf, UINT cchBuf)
+{
+ NUMBERFMTW nf;
+ WCHAR szNumber[24];
+ WCHAR szDecimalSep[8];
+ WCHAR szThousandSep[8];
+ WCHAR szGrouping[12];
+ int Len, cchFormatted, i;
+ size_t cchRemaining;
+ LPWSTR Ptr;
+
+ // Try to build first Format byte string
+ if (StrFormatByteSizeW(lpQwSize->QuadPart, pszBuf, cchBuf) == NULL)
+ return NULL;
+
+ // If there is less bytes than 1KB, we have nothing to do
+ if (lpQwSize->QuadPart < 1024)
+ return pszBuf;
+
+ // Print the number in uniform mode
+ swprintf(szNumber, L"%I64u", lpQwSize->QuadPart);
+
+ // Get system strings for decimal and thousand separators.
+ GetLocaleInfoW(LOCALE_USER_DEFAULT, LOCALE_SDECIMAL, szDecimalSep,
sizeof(szDecimalSep)/sizeof(*szDecimalSep));
+ GetLocaleInfoW(LOCALE_USER_DEFAULT, LOCALE_STHOUSAND, szThousandSep,
sizeof(szThousandSep)/sizeof(*szThousandSep));
+
+ // Initialize format for printing the number in bytes
+ ZeroMemory(&nf, sizeof(nf));
+ nf.NumDigits = 0;
+ nf.LeadingZero = 0;
+ nf.Grouping = 0;
+ nf.lpDecimalSep = szDecimalSep;
+ nf.lpThousandSep = szThousandSep;
+ nf.NegativeOrder = 0;
+
+ // Get system string for groups separator
+ Len = GetLocaleInfoW(LOCALE_USER_DEFAULT,
+ LOCALE_SGROUPING,
+ szGrouping,
+ sizeof(szGrouping)/sizeof(*szGrouping));
+
+ // Convert grouping specs from string to integer
+ for (i = 0; i < Len; i++)
+ {
+ WCHAR wch = szGrouping[i];
+
+ if (wch >= L'0' && wch <= L'9')
+ nf.Grouping = nf.Grouping * 10 + (wch - L'0');
+ else if (wch != L';')
+ break;
+ }
+
+ if ((nf.Grouping % 10) == 0)
+ nf.Grouping /= 10;
+ else
+ nf.Grouping *= 10;
+
+ // Concate " (" at the end of buffer
+ Len = wcslen(pszBuf);
+ Ptr = pszBuf + Len;
+ cchRemaining = cchBuf - Len;
+ StringCchCopyExW(Ptr, cchRemaining, L" (", &Ptr, &cchRemaining,
0);
+
+ // Save formatted number of bytes in buffer
+ cchFormatted = GetNumberFormatW(LOCALE_USER_DEFAULT,
+ 0,
+ szNumber,
+ &nf,
+ Ptr,
+ cchRemaining);
+
+ if (cchFormatted == 0)
+ return NULL;
+
+ // cchFormatted is number of characters including NULL - make it a real length
+ --cchFormatted;
+
+ // Copy ' ' to buffer
+ Ptr += cchFormatted;
+ cchRemaining -= cchFormatted;
+ StringCchCopyExW(Ptr, cchRemaining, L" ", &Ptr, &cchRemaining, 0);
+
+ // Copy 'bytes' string and remaining ')'
+ Len = LoadStringW(shell32_hInstance, IDS_BYTES_FORMAT, Ptr, cchRemaining);
+ Ptr += Len;
+ cchRemaining -= Len;
+ StringCchCopy(Ptr, cchRemaining, L")");
+
+ return pszBuf;
}
/*************************************************************************
@@ -309,7 +410,6 @@
int plength;
WCHAR *lpdir;
WCHAR buff[MAX_PATH];
- HWND hDlgCtrl;
if (lpstr == NULL)
return FALSE;
@@ -330,16 +430,14 @@
wcscat(buff, L"\\");
}
- hDlgCtrl = GetDlgItem(hwndDlg, 14009);
- SendMessageW(hDlgCtrl, WM_SETTEXT, (WPARAM)NULL, (LPARAM)buff);
+ SetDlgItemTextW(hwndDlg, 14009, buff);
}
if (flength > 1)
{
/* text filename field */
wcsncpy(buff, &lpdir[1], flength);
- hDlgCtrl = GetDlgItem(hwndDlg, 14001);
- SendMessageW(hDlgCtrl, WM_SETTEXT, (WPARAM)NULL, (LPARAM)buff);
+ SetDlgItemTextW(hwndDlg, 14001, buff);
}
return TRUE;
@@ -362,7 +460,6 @@
FILETIME accessed_time;
FILETIME write_time;
WCHAR resultstr[MAX_PATH];
- HWND hDlgCtrl;
LARGE_INTEGER file_size;
if (lpfilename == NULL)
@@ -392,20 +489,17 @@
if (SHFileGeneralGetFileTimeString(&create_time, resultstr))
{
- hDlgCtrl = GetDlgItem(hwndDlg, 14015);
- SendMessageW(hDlgCtrl, WM_SETTEXT, (WPARAM)NULL, (LPARAM)resultstr);
+ SetDlgItemTextW(hwndDlg, 14015, resultstr);
}
if (SHFileGeneralGetFileTimeString(&accessed_time, resultstr))
{
- hDlgCtrl = GetDlgItem(hwndDlg, 14019);
- SendMessageW(hDlgCtrl, WM_SETTEXT, (WPARAM)NULL, (LPARAM)resultstr);
+ SetDlgItemTextW(hwndDlg, 14019, resultstr);
}
if (SHFileGeneralGetFileTimeString(&write_time, resultstr))
{
- hDlgCtrl = GetDlgItem(hwndDlg, 14017);
- SendMessageW(hDlgCtrl, WM_SETTEXT, (WPARAM)NULL, (LPARAM)resultstr);
+ SetDlgItemTextW(hwndDlg, 14017, resultstr);
}
if (!GetFileSizeEx(hFile, &file_size))
@@ -417,15 +511,13 @@
CloseHandle(hFile);
- if (!StrFormatByteSizeW(file_size.QuadPart,
- resultstr,
- sizeof(resultstr) / sizeof(WCHAR)))
- return FALSE;
-
- hDlgCtrl = GetDlgItem(hwndDlg, 14011);
+ if (!SH_FormatFileSizeWithBytes((PULARGE_INTEGER)&file_size,
+ resultstr,
+ sizeof(resultstr) / sizeof(WCHAR)))
+ return FALSE;
TRACE("result size %u resultstr %s\n", file_size.QuadPart,
debugstr_w(resultstr));
- SendMessageW(hDlgCtrl, WM_SETTEXT, (WPARAM)NULL, (LPARAM)resultstr);
+ SetDlgItemTextW(hwndDlg, 14011, resultstr);
if (lpfilesize)
lpfilesize->QuadPart = (ULONGLONG)file_size.QuadPart;
@@ -444,7 +536,6 @@
SH_FileVersionQuerySetText(HWND hwndDlg, DWORD dlgId, LPVOID pInfo, WCHAR *text, WCHAR
**resptr)
{
UINT reslen;
- HWND hDlgCtrl;
if (hwndDlg == NULL || resptr == NULL || text == NULL)
return FALSE;
@@ -452,9 +543,8 @@
if (VerQueryValueW(pInfo, text, (LPVOID *)resptr, &reslen))
{
/* file description property */
- hDlgCtrl = GetDlgItem(hwndDlg, dlgId);
TRACE("%s :: %s\n", debugstr_w(text), debugstr_w(*resptr));
- SendMessageW(hDlgCtrl, WM_SETTEXT, (WPARAM)0, (LPARAM)*resptr);
+ SetDlgItemTextW(hwndDlg, dlgId, *resptr);
return TRUE;
}
@@ -576,9 +666,8 @@
LOWORD(inf->dwFileVersionMS),
HIWORD(inf->dwFileVersionLS),
LOWORD(inf->dwFileVersionLS));
- hDlgCtrl = GetDlgItem(hwndDlg, 14001);
TRACE("MS %x LS %x res %s \n", inf->dwFileVersionMS,
inf->dwFileVersionLS, debugstr_w(buff));
- SendMessageW(hDlgCtrl, WM_SETTEXT, (WPARAM)NULL, (LPARAM)buff);
+ SetDlgItemTextW(hwndDlg, 14001, buff);
}
if (VerQueryValueW(pBuf, const_cast<LPWSTR>(wTranslation), (LPVOID
*)&lplangcode, &infolen))
@@ -613,8 +702,7 @@
hDlgCtrl = GetDlgItem(hwndDlg, 14009);
SendMessageW(hDlgCtrl, LB_SETCURSEL, 0, 0);
str = (WCHAR *) SendMessageW(hDlgCtrl, LB_GETITEMDATA, (WPARAM)0, (LPARAM)NULL);
- hDlgCtrl = GetDlgItem(hwndDlg, 14010);
- SendMessageW(hDlgCtrl, WM_SETTEXT, (WPARAM)NULL, (LPARAM)str);
+ SetDlgItemTextW(hwndDlg, 14010, str);
return TRUE;
}
@@ -672,9 +760,8 @@
if (str == NULL)
break;
- hDlgCtrl = GetDlgItem(hwndDlg, 14010);
TRACE("hDlgCtrl %x string %s \n", hDlgCtrl, debugstr_w(str));
- SendMessageW(hDlgCtrl, WM_SETTEXT, (WPARAM)NULL, (LPARAM)str);
+ SetDlgItemTextW(hwndDlg, 14010, str);
return TRUE;
}
Modified: trunk/reactos/dll/win32/shell32/lang/bg-BG.rc
URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/dll/win32/shell32/lang/bg-…
==============================================================================
--- trunk/reactos/dll/win32/shell32/lang/bg-BG.rc [iso-8859-1] (original)
+++ trunk/reactos/dll/win32/shell32/lang/bg-BG.rc [iso-8859-1] Mon Nov 28 21:54:45 2011
@@ -767,8 +767,9 @@
IDS_FILE_DETAILSADV "ФайловеÑе Ñ ÑазÑиÑение
'%s' Ñа Ð¾Ñ Ð²Ð¸Ð´Ð° '%s'. Ðа да пÑомениÑе
наÑÑÑойкиÑе, за вÑиÑки '%s' Ñайлове, наÑиÑнеÑе
âРазÑиÑениâ."
IDS_FILE_TYPES "FileTypes"
IDS_COLUMN_EXTENSION "Extensions"
-END
-
-
-
-
+ IDS_BYTES_FORMAT "bytes"
+END
+
+
+
+
Modified: trunk/reactos/dll/win32/shell32/lang/ca-ES.rc
URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/dll/win32/shell32/lang/ca-…
==============================================================================
--- trunk/reactos/dll/win32/shell32/lang/ca-ES.rc [iso-8859-1] (original)
+++ trunk/reactos/dll/win32/shell32/lang/ca-ES.rc [iso-8859-1] Mon Nov 28 21:54:45 2011
@@ -766,4 +766,5 @@
IDS_FILE_DETAILSADV "Files with extension '%s' are of type
'%s'. To change settings that affect all '%s' files, click
Advanced."
IDS_FILE_TYPES "FileTypes"
IDS_COLUMN_EXTENSION "Extensions"
-END
+ IDS_BYTES_FORMAT "bytes"
+END
Modified: trunk/reactos/dll/win32/shell32/lang/cs-CZ.rc
URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/dll/win32/shell32/lang/cs-…
==============================================================================
--- trunk/reactos/dll/win32/shell32/lang/cs-CZ.rc [iso-8859-1] (original)
+++ trunk/reactos/dll/win32/shell32/lang/cs-CZ.rc [iso-8859-1] Mon Nov 28 21:54:45 2011
@@ -754,4 +754,5 @@
IDS_FILE_DETAILSADV "Soubory s pÅÃponou '%s' jsou typu
'%s'. KliknutÃm na tlaÄÃtko PokroÄilé lze zmÄnit nastavenà pro vÅ¡echny
soubory '%s'."
IDS_FILE_TYPES "FileTypes"
IDS_COLUMN_EXTENSION "Extensions"
-END
+ IDS_BYTES_FORMAT "bytes"
+END
Modified: trunk/reactos/dll/win32/shell32/lang/da-DK.rc
URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/dll/win32/shell32/lang/da-…
==============================================================================
--- trunk/reactos/dll/win32/shell32/lang/da-DK.rc [iso-8859-1] (original)
+++ trunk/reactos/dll/win32/shell32/lang/da-DK.rc [iso-8859-1] Mon Nov 28 21:54:45 2011
@@ -755,4 +755,5 @@
IDS_FILE_DETAILSADV "Files with extension '%s' are of type
'%s'. To change settings that affect all '%s' files, click
Advanced."
IDS_FILE_TYPES "FileTypes"
IDS_COLUMN_EXTENSION "Extensions"
-END
+ IDS_BYTES_FORMAT "bytes"
+END
Modified: trunk/reactos/dll/win32/shell32/lang/de-DE.rc
URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/dll/win32/shell32/lang/de-…
==============================================================================
--- trunk/reactos/dll/win32/shell32/lang/de-DE.rc [iso-8859-1] (original)
+++ trunk/reactos/dll/win32/shell32/lang/de-DE.rc [iso-8859-1] Mon Nov 28 21:54:45 2011
@@ -771,4 +771,5 @@
IDS_FILE_DETAILSADV "Um die Einstellungen, die alle Dateien des Typs
'%s' betreffen zu ändern, klicken Sie auf Erweitert."
IDS_FILE_TYPES "Dateitypen"
IDS_COLUMN_EXTENSION "Erweiterungen"
-END
+ IDS_BYTES_FORMAT "Bytes"
+END
Modified: trunk/reactos/dll/win32/shell32/lang/el-GR.rc
URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/dll/win32/shell32/lang/el-…
==============================================================================
--- trunk/reactos/dll/win32/shell32/lang/el-GR.rc [iso-8859-1] (original)
+++ trunk/reactos/dll/win32/shell32/lang/el-GR.rc [iso-8859-1] Mon Nov 28 21:54:45 2011
@@ -767,4 +767,5 @@
IDS_FILE_DETAILSADV "Files with extension '%s' are of type
'%s'. To change settings that affect all '%s' files, click
Advanced."
IDS_FILE_TYPES "FileTypes"
IDS_COLUMN_EXTENSION "Extensions"
-END
+ IDS_BYTES_FORMAT "bytes"
+END
Modified: trunk/reactos/dll/win32/shell32/lang/en-GB.rc
URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/dll/win32/shell32/lang/en-…
==============================================================================
--- trunk/reactos/dll/win32/shell32/lang/en-GB.rc [iso-8859-1] (original)
+++ trunk/reactos/dll/win32/shell32/lang/en-GB.rc [iso-8859-1] Mon Nov 28 21:54:45 2011
@@ -766,4 +766,5 @@
IDS_FILE_DETAILSADV "Files with extension '%s' are of type
'%s'. To change settings that affect all '%s' files, click
Advanced."
IDS_FILE_TYPES "FileTypes"
IDS_COLUMN_EXTENSION "Extensions"
-END
+ IDS_BYTES_FORMAT "bytes"
+END
Modified: trunk/reactos/dll/win32/shell32/lang/en-US.rc
URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/dll/win32/shell32/lang/en-…
==============================================================================
--- trunk/reactos/dll/win32/shell32/lang/en-US.rc [iso-8859-1] (original)
+++ trunk/reactos/dll/win32/shell32/lang/en-US.rc [iso-8859-1] Mon Nov 28 21:54:45 2011
@@ -777,4 +777,5 @@
IDS_FILE_DETAILSADV "Files with extension '%s' are of type
'%s'. To change settings that affect all '%s' files, click
Advanced."
IDS_FILE_TYPES "FileTypes"
IDS_COLUMN_EXTENSION "Extensions"
-END
+ IDS_BYTES_FORMAT "bytes"
+END
Modified: trunk/reactos/dll/win32/shell32/lang/es-ES.rc
URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/dll/win32/shell32/lang/es-…
==============================================================================
--- trunk/reactos/dll/win32/shell32/lang/es-ES.rc [iso-8859-1] (original)
+++ trunk/reactos/dll/win32/shell32/lang/es-ES.rc [iso-8859-1] Mon Nov 28 21:54:45 2011
@@ -779,4 +779,5 @@
IDS_FILE_DETAILSADV "Los archivos con extensión '%s' son del tipo
'%s'. Para cambiar la configuración de los archivos '%s', haga clic en
Opciones avanzadas."
IDS_FILE_TYPES "Tipos de archivos"
IDS_COLUMN_EXTENSION "Extensiones"
-END
+ IDS_BYTES_FORMAT "bytes"
+END
Modified: trunk/reactos/dll/win32/shell32/lang/fi-FI.rc
URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/dll/win32/shell32/lang/fi-…
==============================================================================
--- trunk/reactos/dll/win32/shell32/lang/fi-FI.rc [iso-8859-1] (original)
+++ trunk/reactos/dll/win32/shell32/lang/fi-FI.rc [iso-8859-1] Mon Nov 28 21:54:45 2011
@@ -766,4 +766,5 @@
IDS_FILE_DETAILSADV "Files with extension '%s' are of type
'%s'. To change settings that affect all '%s' files, click
Advanced."
IDS_FILE_TYPES "FileTypes"
IDS_COLUMN_EXTENSION "Extensions"
-END
+ IDS_BYTES_FORMAT "bytes"
+END
Modified: trunk/reactos/dll/win32/shell32/lang/fr-FR.rc
URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/dll/win32/shell32/lang/fr-…
==============================================================================
--- trunk/reactos/dll/win32/shell32/lang/fr-FR.rc [iso-8859-1] (original)
+++ trunk/reactos/dll/win32/shell32/lang/fr-FR.rc [iso-8859-1] Mon Nov 28 21:54:45 2011
@@ -770,4 +770,5 @@
IDS_FILE_DETAILSADV "Les fichiers avec l'extension '%s' sont de
type '%s'. Pour modifier les paramètres qui concernent tous les fichiers
'%s', cliquez sur Avancé."
IDS_FILE_TYPES "FileTypes"
IDS_COLUMN_EXTENSION "Extensions"
-END
+ IDS_BYTES_FORMAT "bytes"
+END
Modified: trunk/reactos/dll/win32/shell32/lang/hu-HU.rc
URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/dll/win32/shell32/lang/hu-…
==============================================================================
--- trunk/reactos/dll/win32/shell32/lang/hu-HU.rc [iso-8859-1] (original)
+++ trunk/reactos/dll/win32/shell32/lang/hu-HU.rc [iso-8859-1] Mon Nov 28 21:54:45 2011
@@ -769,4 +769,5 @@
IDS_FILE_DETAILSADV "Files with extension '%s' are of type
'%s'. To change settings that affect all '%s' files, click
Advanced."
IDS_FILE_TYPES "FileTypes"
IDS_COLUMN_EXTENSION "Extensions"
-END
+ IDS_BYTES_FORMAT "bytes"
+END
Modified: trunk/reactos/dll/win32/shell32/lang/it-IT.rc
URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/dll/win32/shell32/lang/it-…
==============================================================================
--- trunk/reactos/dll/win32/shell32/lang/it-IT.rc [iso-8859-1] (original)
+++ trunk/reactos/dll/win32/shell32/lang/it-IT.rc [iso-8859-1] Mon Nov 28 21:54:45 2011
@@ -234,9 +234,9 @@
BEGIN
ICON "", 14000, 10, 3, 30, 30, WS_VISIBLE
EDITTEXT 14001, 70, 9, 158, 14, ES_LEFT | ES_READONLY
- LTEXT "Tipo del file:", 14004, 8, 35, 50, 10
+ LTEXT "Tipo di file:", 14004, 8, 35, 50, 10
LTEXT "File", 14005, 68, 35, 160, 10
- LTEXT "Si apre con:", 14006, 8, 53, 50, 10
+ LTEXT "Apri con:", 14006, 8, 53, 50, 10
EDITTEXT 14007, 68, 53, 160, 10, ES_LEFT | ES_READONLY | NOT WS_BORDER
LTEXT "Posizione:", 14008, 8, 72, 45, 10
EDITTEXT 14009, 68, 72, 315, 10, ES_LEFT | ES_READONLY | NOT WS_BORDER
@@ -437,7 +437,7 @@
PUSHBUTTON "&Nuovo", 14001, 120, 110, 50, 14, WS_TABSTOP
PUSHBUTTON "&Cancella", 14002, 180, 110, 50, 14, WS_TABSTOP
GROUPBOX "Dettagli per l'estensione '%s'", 14003, 7, 130, 249, 70
-LTEXT "Si apre con:", -1, 12, 140, 40, 10
+LTEXT "Apri con:", -1, 12, 140, 40, 10
//ICON
LTEXT "Nome", 14005, 100, 140, 40, 10
PUSHBUTTON "&Cambia...", 14006, 180, 140, 50, 14, WS_TABSTOP
@@ -777,4 +777,5 @@
IDS_FILE_DETAILSADV "I files con estensione '%s' sono di tipo
'%s'. Per modificare le impostazioni per tutti i file '%s', cliccare su
Avanzate."
IDS_FILE_TYPES "Tipi di file"
IDS_COLUMN_EXTENSION "Estensioni"
-END
+ IDS_BYTES_FORMAT "byte"
+END
Modified: trunk/reactos/dll/win32/shell32/lang/ja-JP.rc
URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/dll/win32/shell32/lang/ja-…
==============================================================================
--- trunk/reactos/dll/win32/shell32/lang/ja-JP.rc [iso-8859-1] (original)
+++ trunk/reactos/dll/win32/shell32/lang/ja-JP.rc [iso-8859-1] Mon Nov 28 21:54:45 2011
@@ -766,4 +766,5 @@
IDS_FILE_DETAILSADV "æ¡å¼µå '%s'
ã®ãã¡ã¤ã«ã®ç¨®é¡ã¯'%s'ã§ãã '%s'
ã®ãã¡ã¤ã«ãã¹ã¦ã«å¯¾ããè¨å®ãå¤æ´ããã«ã¯
詳細è¨å®ãã¯ãªãã¯ãã¦ãã ããã"
IDS_FILE_TYPES "FileTypes"
IDS_COLUMN_EXTENSION "Extensions"
-END
+ IDS_BYTES_FORMAT "bytes"
+END
Modified: trunk/reactos/dll/win32/shell32/lang/ko-KR.rc
URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/dll/win32/shell32/lang/ko-…
==============================================================================
--- trunk/reactos/dll/win32/shell32/lang/ko-KR.rc [iso-8859-1] (original)
+++ trunk/reactos/dll/win32/shell32/lang/ko-KR.rc [iso-8859-1] Mon Nov 28 21:54:45 2011
@@ -766,4 +766,5 @@
IDS_FILE_DETAILSADV "Files with extension '%s' are of type
'%s'. To change settings that affect all '%s' files, click
Advanced."
IDS_FILE_TYPES "FileTypes"
IDS_COLUMN_EXTENSION "Extensions"
-END
+ IDS_BYTES_FORMAT "bytes"
+END
Modified: trunk/reactos/dll/win32/shell32/lang/nl-NL.rc
URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/dll/win32/shell32/lang/nl-…
==============================================================================
--- trunk/reactos/dll/win32/shell32/lang/nl-NL.rc [iso-8859-1] (original)
+++ trunk/reactos/dll/win32/shell32/lang/nl-NL.rc [iso-8859-1] Mon Nov 28 21:54:45 2011
@@ -766,4 +766,5 @@
IDS_FILE_DETAILSADV "Files with extension '%s' are of type
'%s'. To change settings that affect all '%s' files, click
Advanced."
IDS_FILE_TYPES "FileTypes"
IDS_COLUMN_EXTENSION "Extensions"
-END
+ IDS_BYTES_FORMAT "bytes"
+END
Modified: trunk/reactos/dll/win32/shell32/lang/no-NO.rc
URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/dll/win32/shell32/lang/no-…
==============================================================================
--- trunk/reactos/dll/win32/shell32/lang/no-NO.rc [iso-8859-1] (original)
+++ trunk/reactos/dll/win32/shell32/lang/no-NO.rc [iso-8859-1] Mon Nov 28 21:54:45 2011
@@ -769,4 +769,5 @@
IDS_FILE_DETAILSADV "Filer med utvidelser '%s' er av typen
'%s'. For å endre innstillingene som er av filen '%s', trykk på
avansert."
IDS_FILE_TYPES "FileTypes"
IDS_COLUMN_EXTENSION "Extensions"
-END
+ IDS_BYTES_FORMAT "bytes"
+END
Modified: trunk/reactos/dll/win32/shell32/lang/pl-PL.rc
URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/dll/win32/shell32/lang/pl-…
==============================================================================
--- trunk/reactos/dll/win32/shell32/lang/pl-PL.rc [iso-8859-1] (original)
+++ trunk/reactos/dll/win32/shell32/lang/pl-PL.rc [iso-8859-1] Mon Nov 28 21:54:45 2011
@@ -774,4 +774,5 @@
IDS_FILE_DETAILSADV "Pliki z rozszerzeniem '%s' sÄ
typu '%s'. Aby zmieniÄ ustawienia, które dotyczÄ
wszystkich plików '%s', kliknij przycisk Zaawansowane."
IDS_FILE_TYPES "Typy plików"
IDS_COLUMN_EXTENSION "Rozszerzenia"
-END
+ IDS_BYTES_FORMAT "bajtów"
+END
Modified: trunk/reactos/dll/win32/shell32/lang/pt-BR.rc
URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/dll/win32/shell32/lang/pt-…
==============================================================================
--- trunk/reactos/dll/win32/shell32/lang/pt-BR.rc [iso-8859-1] (original)
+++ trunk/reactos/dll/win32/shell32/lang/pt-BR.rc [iso-8859-1] Mon Nov 28 21:54:45 2011
@@ -768,4 +768,5 @@
IDS_FILE_DETAILSADV "Files with extension '%s' are of type
'%s'. To change settings that affect all '%s' files, click
Advanced."
IDS_FILE_TYPES "FileTypes"
IDS_COLUMN_EXTENSION "Extensions"
-END
+ IDS_BYTES_FORMAT "bytes"
+END
Modified: trunk/reactos/dll/win32/shell32/lang/pt-PT.rc
URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/dll/win32/shell32/lang/pt-…
==============================================================================
--- trunk/reactos/dll/win32/shell32/lang/pt-PT.rc [iso-8859-1] (original)
+++ trunk/reactos/dll/win32/shell32/lang/pt-PT.rc [iso-8859-1] Mon Nov 28 21:54:45 2011
@@ -769,4 +769,5 @@
IDS_FILE_DETAILSADV "Ficheiros com extensão '%s' são do tipo
'%s'. Para mudar definições que afectam todos '%s' ficheiros, click
Avançado."
IDS_FILE_TYPES "FileTypes"
IDS_COLUMN_EXTENSION "Extensions"
-END
+ IDS_BYTES_FORMAT "bytes"
+END
Modified: trunk/reactos/dll/win32/shell32/lang/ro-RO.rc
URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/dll/win32/shell32/lang/ro-…
==============================================================================
--- trunk/reactos/dll/win32/shell32/lang/ro-RO.rc [iso-8859-1] (original)
+++ trunk/reactos/dll/win32/shell32/lang/ro-RO.rc [iso-8859-1] Mon Nov 28 21:54:45 2011
@@ -766,5 +766,6 @@
IDS_FILE_DETAILSADV "FiÈierele cu extensia '%s' sunt de tipul
'%s'. Pentru a schimbat setÄri care vor afecta toate fiÈierele '%s',
clic pe Avansat."
IDS_FILE_TYPES "FileTypes"
IDS_COLUMN_EXTENSION "Extensions"
-END
-
+ IDS_BYTES_FORMAT "bytes"
+END
+
Modified: trunk/reactos/dll/win32/shell32/lang/ru-RU.rc
URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/dll/win32/shell32/lang/ru-…
==============================================================================
--- trunk/reactos/dll/win32/shell32/lang/ru-RU.rc [iso-8859-1] (original)
+++ trunk/reactos/dll/win32/shell32/lang/ru-RU.rc [iso-8859-1] Mon Nov 28 21:54:45 2011
@@ -765,4 +765,5 @@
IDS_FILE_DETAILSADV "Ð¤Ð°Ð¹Ð»Ñ Ñ ÑаÑÑиÑением '%s'
имеÑÑ Ñип '%s'. ÐÐ»Ñ Ð¸Ð·Ð¼ÐµÐ½ÐµÐ½Ð¸Ñ Ð¿Ð°ÑамеÑÑов вÑеÑ
Ñайлов '%s', нажмиÑе 'ÐополниÑелÑно'."
IDS_FILE_TYPES "Ð¢Ð¸Ð¿Ñ Ñайлов"
IDS_COLUMN_EXTENSION "РаÑÑиÑениÑ"
-END
+ IDS_BYTES_FORMAT "bytes"
+END
Modified: trunk/reactos/dll/win32/shell32/lang/sk-SK.rc
URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/dll/win32/shell32/lang/sk-…
==============================================================================
--- trunk/reactos/dll/win32/shell32/lang/sk-SK.rc [iso-8859-1] (original)
+++ trunk/reactos/dll/win32/shell32/lang/sk-SK.rc [iso-8859-1] Mon Nov 28 21:54:45 2011
@@ -774,4 +774,5 @@
IDS_FILE_DETAILSADV "Files with extension '%s' are of type
'%s'. To change settings that affect all '%s' files, click
Advanced."
IDS_FILE_TYPES "FileTypes"
IDS_COLUMN_EXTENSION "Extensions"
-END
+ IDS_BYTES_FORMAT "bytes"
+END
Modified: trunk/reactos/dll/win32/shell32/lang/sl-SI.rc
URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/dll/win32/shell32/lang/sl-…
==============================================================================
--- trunk/reactos/dll/win32/shell32/lang/sl-SI.rc [iso-8859-1] (original)
+++ trunk/reactos/dll/win32/shell32/lang/sl-SI.rc [iso-8859-1] Mon Nov 28 21:54:45 2011
@@ -766,4 +766,5 @@
IDS_FILE_DETAILSADV "Files with extension '%s' are of type
'%s'. To change settings that affect all '%s' files, click
Advanced."
IDS_FILE_TYPES "FileTypes"
IDS_COLUMN_EXTENSION "Extensions"
-END
+ IDS_BYTES_FORMAT "bytes"
+END
Modified: trunk/reactos/dll/win32/shell32/lang/sv-SE.rc
URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/dll/win32/shell32/lang/sv-…
==============================================================================
--- trunk/reactos/dll/win32/shell32/lang/sv-SE.rc [iso-8859-1] (original)
+++ trunk/reactos/dll/win32/shell32/lang/sv-SE.rc [iso-8859-1] Mon Nov 28 21:54:45 2011
@@ -766,4 +766,5 @@
IDS_FILE_DETAILSADV "Files with extension '%s' are of type
'%s'. To change settings that affect all '%s' files, click
Advanced."
IDS_FILE_TYPES "FileTypes"
IDS_COLUMN_EXTENSION "Extensions"
-END
+ IDS_BYTES_FORMAT "bytes"
+END
Modified: trunk/reactos/dll/win32/shell32/lang/tr-TR.rc
URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/dll/win32/shell32/lang/tr-…
==============================================================================
--- trunk/reactos/dll/win32/shell32/lang/tr-TR.rc [iso-8859-1] (original)
+++ trunk/reactos/dll/win32/shell32/lang/tr-TR.rc [iso-8859-1] Mon Nov 28 21:54:45 2011
@@ -766,4 +766,5 @@
IDS_FILE_DETAILSADV "Files with extension '%s' are of type
'%s'. To change settings that affect all '%s' files, click
Advanced."
IDS_FILE_TYPES "FileTypes"
IDS_COLUMN_EXTENSION "Extensions"
-END
+ IDS_BYTES_FORMAT "bytes"
+END
Modified: trunk/reactos/dll/win32/shell32/lang/uk-UA.rc
URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/dll/win32/shell32/lang/uk-…
==============================================================================
--- trunk/reactos/dll/win32/shell32/lang/uk-UA.rc [iso-8859-1] (original)
+++ trunk/reactos/dll/win32/shell32/lang/uk-UA.rc [iso-8859-1] Mon Nov 28 21:54:45 2011
@@ -779,4 +779,5 @@
IDS_FILE_DETAILSADV "Файли з ÑозÑиÑеннÑм '%s'
маÑÑÑ Ñип '%s'. Щоб змÑниÑи паÑамеÑÑи, ÑкÑ
впливаÑимÑÑÑ Ð½Ð° вÑÑ Ñайли '%s', наÑиÑнÑÑÑ
ÐºÐ½Ð¾Ð¿ÐºÑ 'ÐодаÑково'."
IDS_FILE_TYPES "Типи ФайлÑв"
IDS_COLUMN_EXTENSION "РозÑиÑеннÑ"
-END
+ IDS_BYTES_FORMAT "bytes"
+END
Modified: trunk/reactos/dll/win32/shell32/lang/zh-CN.rc
URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/dll/win32/shell32/lang/zh-…
==============================================================================
--- trunk/reactos/dll/win32/shell32/lang/zh-CN.rc [iso-8859-1] (original)
+++ trunk/reactos/dll/win32/shell32/lang/zh-CN.rc [iso-8859-1] Mon Nov 28 21:54:45 2011
@@ -754,5 +754,6 @@
IDS_FILE_DETAILSADV "Files with extension '%s' are of type
'%s'. To change settings that affect all '%s' files, click
Advanced."
IDS_FILE_TYPES "FileTypes"
IDS_COLUMN_EXTENSION "Extensions"
-END
-
+ IDS_BYTES_FORMAT "bytes"
+END
+
Modified: trunk/reactos/dll/win32/shell32/lang/zh-TW.rc
URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/dll/win32/shell32/lang/zh-…
==============================================================================
--- trunk/reactos/dll/win32/shell32/lang/zh-TW.rc [iso-8859-1] (original)
+++ trunk/reactos/dll/win32/shell32/lang/zh-TW.rc [iso-8859-1] Mon Nov 28 21:54:45 2011
@@ -766,5 +766,6 @@
IDS_FILE_DETAILSADV "Files with extension '%s' are of type
'%s'. To change settings that affect all '%s' files, click
Advanced."
IDS_FILE_TYPES "FileTypes"
IDS_COLUMN_EXTENSION "Extensions"
-END
-
+ IDS_BYTES_FORMAT "bytes"
+END
+
Modified: trunk/reactos/dll/win32/shell32/precomp.h
URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/dll/win32/shell32/precomp.…
==============================================================================
--- trunk/reactos/dll/win32/shell32/precomp.h [iso-8859-1] (original)
+++ trunk/reactos/dll/win32/shell32/precomp.h [iso-8859-1] Mon Nov 28 21:54:45 2011
@@ -46,6 +46,7 @@
#include <sddl.h>
#include <tchar.h>
+#include <strsafe.h>
#include <atlbase.h>
#include <atlcom.h>
#include <atlwin.h>
Modified: trunk/reactos/dll/win32/shell32/she_ocmenu.cpp
URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/dll/win32/shell32/she_ocme…
==============================================================================
--- trunk/reactos/dll/win32/shell32/she_ocmenu.cpp [iso-8859-1] (original)
+++ trunk/reactos/dll/win32/shell32/she_ocmenu.cpp [iso-8859-1] Mon Nov 28 21:54:45 2011
@@ -523,12 +523,12 @@
if (poainfo->pcszFile)
{
szBuffer[0] = L'\0';
- SendDlgItemMessageW(hwndDlg, 14001, WM_GETTEXT, sizeof(szBuffer),
(LPARAM)szBuffer);
+ GetDlgItemTextW(hwndDlg, 14001, szBuffer,
sizeof(szBuffer)/sizeof(szBuffer[0]));
index = wcslen(szBuffer);
if (index + wcslen(poainfo->pcszFile) + 1 <
sizeof(szBuffer)/sizeof(szBuffer[0]))
wcscat(szBuffer, poainfo->pcszFile);
szBuffer[(sizeof(szBuffer)/sizeof(WCHAR))-1] = L'\0';
- SendDlgItemMessageW(hwndDlg, 14001, WM_SETTEXT, 0, (LPARAM)szBuffer);
+ SetDlgItemTextW(hwndDlg, 14001, szBuffer);
ZeroMemory(&Context, sizeof(OPEN_WITH_CONTEXT));
Context.hDlgCtrl = GetDlgItem(hwndDlg, 14002);
LoadOWItems(&Context, poainfo->pcszFile);
Modified: trunk/reactos/dll/win32/shell32/shell32_main.h
URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/dll/win32/shell32/shell32_…
==============================================================================
--- trunk/reactos/dll/win32/shell32/shell32_main.h [iso-8859-1] (original)
+++ trunk/reactos/dll/win32/shell32/shell32_main.h [iso-8859-1] Mon Nov 28 21:54:45 2011
@@ -217,7 +217,7 @@
BOOL SH_ShowRecycleBinProperties(WCHAR sDrive);
BOOL SH_ShowPropertiesDialog(LPWSTR lpf, LPCITEMIDLIST pidlFolder, LPCITEMIDLIST *
apidl);
BOOL SH_ShowFolderProperties(LPWSTR pwszFolder, LPCITEMIDLIST pidlFolder, LPCITEMIDLIST *
apidl);
-
+LPWSTR SH_FormatFileSizeWithBytes(PULARGE_INTEGER lpQwSize, LPWSTR pszBuf, UINT cchBuf);
EXTERN_C HRESULT WINAPI DoRegisterServer(void);
EXTERN_C HRESULT WINAPI DoUnregisterServer(void);
Modified: trunk/reactos/dll/win32/shell32/shelllink.cpp
URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/dll/win32/shell32/shelllin…
==============================================================================
--- trunk/reactos/dll/win32/shell32/shelllink.cpp [iso-8859-1] (original)
+++ trunk/reactos/dll/win32/shell32/shelllink.cpp [iso-8859-1] Mon Nov 28 21:54:45 2011
@@ -2033,8 +2033,7 @@
wchar_t * wTrgtLocat;
const int ch = '\\';
wTrgtLocat = wcsrchr(pThis->sWorkDir, ch)+1;
- hDlgCtrl = GetDlgItem( hwndDlg, 14007 );
- SendMessageW(hDlgCtrl, WM_SETTEXT, (WPARAM)NULL, (LPARAM)wTrgtLocat);
+ SetDlgItemTextW(hwndDlg, 14007, wTrgtLocat);
/* target path */
hDlgCtrl = GetDlgItem( hwndDlg, 14009 );
@@ -2058,12 +2057,10 @@
if ( lppsn->hdr.code == PSN_APPLY )
{
/* set working directory */
- hDlgCtrl = GetDlgItem( hwndDlg, 14011 );
- SendMessageW( hDlgCtrl, WM_GETTEXT, (WPARAM)MAX_PATH, (LPARAM)szBuffer
);
+ GetDlgItemTextW(hwndDlg, 14011, szBuffer, MAX_PATH);
pThis->SetWorkingDirectory(szBuffer);
/* set link destination */
- hDlgCtrl = GetDlgItem( hwndDlg, 14009 );
- SendMessageW( hDlgCtrl, WM_GETTEXT, (WPARAM)MAX_PATH, (LPARAM)szBuffer);
+ GetDlgItemTextW(hwndDlg, 14009, szBuffer, MAX_PATH);
if ( !SHELL_ExistsFileW(szBuffer) )
{
//FIXME load localized error msg
Modified: trunk/reactos/dll/win32/shell32/shlfileop.cpp
URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/dll/win32/shell32/shlfileo…
==============================================================================
--- trunk/reactos/dll/win32/shell32/shlfileop.cpp [iso-8859-1] (original)
+++ trunk/reactos/dll/win32/shell32/shlfileop.cpp [iso-8859-1] Mon Nov 28 21:54:45 2011
@@ -612,7 +612,7 @@
to = &Context->to->feFiles[Context->Index];
/* update status */
- SendDlgItemMessageW(Context->hwndDlg, 14001, WM_SETTEXT, 0,
(LPARAM)from->szFullPath);
+ SetDlgItemTextW(Context->hwndDlg, 14001, from->szFullPath);
if (Context->op->req->wFunc == FO_COPY)
{
Modified: trunk/reactos/dll/win32/shell32/shresdef.h
URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/dll/win32/shell32/shresdef…
==============================================================================
--- trunk/reactos/dll/win32/shell32/shresdef.h [iso-8859-1] (original)
+++ trunk/reactos/dll/win32/shell32/shresdef.h [iso-8859-1] Mon Nov 28 21:54:45 2011
@@ -136,6 +136,7 @@
#define IDS_FILE_TYPES 174
#define IDS_FILE_DETAILS 175
#define IDS_FILE_DETAILSADV 176
+#define IDS_BYTES_FORMAT 177
#define IDS_RUNDLG_ERROR 180
#define IDS_RUNDLG_BROWSE_ERROR 181