mirror of
https://github.com/Xevion/easy7zip.git
synced 2025-12-13 12:11:38 -06:00
4.43 beta
This commit is contained in:
committed by
Kornel Lesiński
parent
0ec42ff829
commit
804edc5756
@@ -91,7 +91,7 @@ void CApp::SetListSettings()
|
||||
panel._showRealFileIcons = showRealFileIcons;
|
||||
panel._exStyle = extendedStyle;
|
||||
|
||||
DWORD style = panel._listView.GetStyle();
|
||||
DWORD style = (DWORD)panel._listView.GetStyle();
|
||||
if (mySelectionMode)
|
||||
style |= LVS_SINGLESEL;
|
||||
else
|
||||
@@ -227,9 +227,9 @@ static void AddButton(
|
||||
|
||||
but.iBitmap = imageList.GetImageCount();
|
||||
HBITMAP b = ::LoadBitmap(g_hInstance,
|
||||
large ?
|
||||
(LPCTSTR)butInfo.BitmapResID:
|
||||
(LPCTSTR)butInfo.Bitmap2ResID);
|
||||
large ?
|
||||
MAKEINTRESOURCE(butInfo.BitmapResID):
|
||||
MAKEINTRESOURCE(butInfo.Bitmap2ResID));
|
||||
if (b != 0)
|
||||
{
|
||||
imageList.AddMasked(b, RGB(255, 0, 255));
|
||||
@@ -692,7 +692,7 @@ int CApp::GetFocusedPanelIndex() const
|
||||
{
|
||||
return LastFocusedPanel;
|
||||
HWND hwnd = ::GetFocus();
|
||||
while(true)
|
||||
for (;;)
|
||||
{
|
||||
if (hwnd == 0)
|
||||
return 0;
|
||||
@@ -710,7 +710,7 @@ int CApp::GetFocusedPanelIndex() const
|
||||
static UString g_ToolTipBuffer;
|
||||
static CSysString g_ToolTipBufferSys;
|
||||
|
||||
void CApp::OnNotify(int ctrlID, LPNMHDR pnmh)
|
||||
void CApp::OnNotify(int /* ctrlID */, LPNMHDR pnmh)
|
||||
{
|
||||
if (pnmh->hwndFrom == _rebar)
|
||||
{
|
||||
@@ -731,7 +731,7 @@ void CApp::OnNotify(int ctrlID, LPNMHDR pnmh)
|
||||
LPNMTTDISPINFO info = (LPNMTTDISPINFO)pnmh;
|
||||
info->hinst = 0;
|
||||
g_ToolTipBuffer.Empty();
|
||||
SetButtonText(info->hdr.idFrom, g_ToolTipBuffer);
|
||||
SetButtonText((UINT32)info->hdr.idFrom, g_ToolTipBuffer);
|
||||
g_ToolTipBufferSys = GetSystemString(g_ToolTipBuffer);
|
||||
info->lpszText = (LPTSTR)(LPCTSTR)g_ToolTipBufferSys;
|
||||
return;
|
||||
@@ -742,7 +742,7 @@ void CApp::OnNotify(int ctrlID, LPNMHDR pnmh)
|
||||
LPNMTTDISPINFOW info = (LPNMTTDISPINFOW)pnmh;
|
||||
info->hinst = 0;
|
||||
g_ToolTipBuffer.Empty();
|
||||
SetButtonText(info->hdr.idFrom, g_ToolTipBuffer);
|
||||
SetButtonText((UINT32)info->hdr.idFrom, g_ToolTipBuffer);
|
||||
info->lpszText = (LPWSTR)(LPCWSTR)g_ToolTipBuffer;
|
||||
return;
|
||||
}
|
||||
|
||||
@@ -55,7 +55,7 @@ STDMETHODIMP CExtractCallbackImp::SetTotal(UInt64 total)
|
||||
|
||||
STDMETHODIMP CExtractCallbackImp::SetCompleted(const UInt64 *completeValue)
|
||||
{
|
||||
while(true)
|
||||
for (;;)
|
||||
{
|
||||
if(ProgressDialog.ProgressSynch.GetStopped())
|
||||
return E_ABORT;
|
||||
@@ -76,7 +76,8 @@ STDMETHODIMP CExtractCallbackImp::AskOverwrite(
|
||||
COverwriteDialog dialog;
|
||||
|
||||
dialog.OldFileInfo.Time = *existTime;
|
||||
if (dialog.OldFileInfo.SizeIsDefined = (existSize != NULL))
|
||||
dialog.OldFileInfo.SizeIsDefined = (existSize != NULL);
|
||||
if (dialog.OldFileInfo.SizeIsDefined)
|
||||
dialog.OldFileInfo.Size = *existSize;
|
||||
dialog.OldFileInfo.Name = existName;
|
||||
|
||||
@@ -88,7 +89,8 @@ STDMETHODIMP CExtractCallbackImp::AskOverwrite(
|
||||
dialog.NewFileInfo.Time = *newTime;
|
||||
}
|
||||
|
||||
if (dialog.NewFileInfo.SizeIsDefined = (newSize != NULL))
|
||||
dialog.NewFileInfo.SizeIsDefined = (newSize != NULL);
|
||||
if (dialog.NewFileInfo.SizeIsDefined)
|
||||
dialog.NewFileInfo.Size = *newSize;
|
||||
dialog.NewFileInfo.Name = newName;
|
||||
|
||||
@@ -96,7 +98,7 @@ STDMETHODIMP CExtractCallbackImp::AskOverwrite(
|
||||
NOverwriteDialog::NResult::EEnum writeAnswer =
|
||||
NOverwriteDialog::Execute(oldFileInfo, newFileInfo);
|
||||
*/
|
||||
int writeAnswer = dialog.Create(NULL); // ParentWindow doesn't work with 7z
|
||||
INT_PTR writeAnswer = dialog.Create(NULL); // ParentWindow doesn't work with 7z
|
||||
|
||||
switch(writeAnswer)
|
||||
{
|
||||
@@ -126,7 +128,7 @@ STDMETHODIMP CExtractCallbackImp::AskOverwrite(
|
||||
}
|
||||
|
||||
|
||||
STDMETHODIMP CExtractCallbackImp::PrepareOperation(const wchar_t *name, Int32 askExtractMode, const UInt64 *position)
|
||||
STDMETHODIMP CExtractCallbackImp::PrepareOperation(const wchar_t *name, Int32 /* askExtractMode */, const UInt64 * /* position */)
|
||||
{
|
||||
return SetCurrentFilePath(name);
|
||||
}
|
||||
@@ -143,7 +145,7 @@ STDMETHODIMP CExtractCallbackImp::ShowMessage(const wchar_t *message)
|
||||
return S_OK;
|
||||
}
|
||||
|
||||
STDMETHODIMP CExtractCallbackImp::SetOperationResult(Int32 operationResult)
|
||||
STDMETHODIMP CExtractCallbackImp::SetOperationResult(Int32 operationResult, bool encrypted)
|
||||
{
|
||||
switch(operationResult)
|
||||
{
|
||||
@@ -160,12 +162,16 @@ STDMETHODIMP CExtractCallbackImp::SetOperationResult(Int32 operationResult)
|
||||
langID = 0x02000A91;
|
||||
break;
|
||||
case NArchive::NExtract::NOperationResult::kDataError:
|
||||
messageID = IDS_MESSAGES_DIALOG_EXTRACT_MESSAGE_DATA_ERROR;
|
||||
langID = 0x02000A92;
|
||||
messageID = encrypted ?
|
||||
IDS_MESSAGES_DIALOG_EXTRACT_MESSAGE_DATA_ERROR_ENCRYPTED:
|
||||
IDS_MESSAGES_DIALOG_EXTRACT_MESSAGE_DATA_ERROR;
|
||||
langID = encrypted ? 0x02000A94 : 0x02000A92;
|
||||
break;
|
||||
case NArchive::NExtract::NOperationResult::kCRCError:
|
||||
messageID = IDS_MESSAGES_DIALOG_EXTRACT_MESSAGE_CRC;
|
||||
langID = 0x02000A93;
|
||||
messageID = encrypted ?
|
||||
IDS_MESSAGES_DIALOG_EXTRACT_MESSAGE_CRC_ENCRYPTED:
|
||||
IDS_MESSAGES_DIALOG_EXTRACT_MESSAGE_CRC;
|
||||
langID = encrypted ? 0x02000A95 : 0x02000A93;
|
||||
break;
|
||||
default:
|
||||
return E_FAIL;
|
||||
|
||||
@@ -51,7 +51,7 @@ public:
|
||||
STDMETHOD (PrepareOperation)(const wchar_t *name, Int32 askExtractMode, const UInt64 *position);
|
||||
|
||||
STDMETHOD(MessageError)(const wchar_t *message);
|
||||
STDMETHOD(SetOperationResult)(Int32 operationResult);
|
||||
STDMETHOD(SetOperationResult)(Int32 operationResult, bool encrypted);
|
||||
|
||||
// IExtractCallbackUI
|
||||
|
||||
|
||||
@@ -7,6 +7,7 @@
|
||||
|
||||
#include "Common/Defs.h"
|
||||
#include "Common/StringConvert.h"
|
||||
#include "Common/Alloc.h"
|
||||
|
||||
#include "Windows/Control/Toolbar.h"
|
||||
#include "Windows/Error.h"
|
||||
@@ -126,6 +127,7 @@ LRESULT CALLBACK WndProc(HWND hWnd, UINT message, WPARAM wParam, LPARAM lParam);
|
||||
|
||||
const wchar_t *kWindowClass = L"FM";
|
||||
|
||||
#ifndef _UNICODE
|
||||
static bool IsItWindowsNT()
|
||||
{
|
||||
OSVERSIONINFO versionInfo;
|
||||
@@ -134,6 +136,7 @@ static bool IsItWindowsNT()
|
||||
return false;
|
||||
return (versionInfo.dwPlatformId == VER_PLATFORM_WIN32_NT);
|
||||
}
|
||||
#endif
|
||||
|
||||
// FUNCTION: InitInstance(HANDLE, int)
|
||||
BOOL InitInstance(HINSTANCE hInstance, int nCmdShow)
|
||||
@@ -359,14 +362,16 @@ static void SetMemoryLock()
|
||||
NSecurity::EnableLockMemoryPrivilege();
|
||||
}
|
||||
|
||||
int WINAPI WinMain( HINSTANCE hInstance,
|
||||
HINSTANCE hPrevInstance,
|
||||
LPSTR lpCmdLine,
|
||||
int nCmdShow)
|
||||
int WINAPI WinMain(HINSTANCE hInstance, HINSTANCE /* hPrevInstance */, LPSTR /* lpCmdLine */, int nCmdShow)
|
||||
{
|
||||
#ifndef _UNICODE
|
||||
g_IsNT = IsItWindowsNT();
|
||||
#endif
|
||||
|
||||
#ifdef _WIN32
|
||||
SetLargePageSize();
|
||||
#endif
|
||||
|
||||
InitCommonControls();
|
||||
|
||||
g_ComCtl32Version = ::GetDllVersion(TEXT("comctl32.dll"));
|
||||
@@ -430,7 +435,7 @@ int WINAPI WinMain( HINSTANCE hInstance,
|
||||
|
||||
g_HWND = 0;
|
||||
OleUninitialize();
|
||||
return msg.wParam;
|
||||
return (int)msg.wParam;
|
||||
}
|
||||
|
||||
static void SaveWindowInfo(HWND aWnd)
|
||||
@@ -650,7 +655,7 @@ LRESULT CALLBACK WndProc(HWND hWnd, UINT message, WPARAM wParam, LPARAM lParam)
|
||||
*/
|
||||
case WM_NOTIFY:
|
||||
{
|
||||
g_App.OnNotify(wParam, (LPNMHDR)lParam);
|
||||
g_App.OnNotify((int)wParam, (LPNMHDR)lParam);
|
||||
break;
|
||||
}
|
||||
/*
|
||||
@@ -672,6 +677,7 @@ LRESULT CALLBACK WndProc(HWND hWnd, UINT message, WPARAM wParam, LPARAM lParam)
|
||||
|
||||
void OnSize(HWND hWnd)
|
||||
{
|
||||
/*
|
||||
if (g_App._rebar)
|
||||
{
|
||||
RECT rect;
|
||||
@@ -682,6 +688,7 @@ void OnSize(HWND hWnd)
|
||||
// g_App._rebar.SizeToRect(&rect);
|
||||
// g_App._rebar.Move(0, 0, xSize, ySize);
|
||||
}
|
||||
*/
|
||||
MoveSubWindows(hWnd);
|
||||
}
|
||||
|
||||
|
||||
@@ -187,7 +187,7 @@ STDMETHODIMP CFSDrives::BindToParentFolder(IFolderFolder **resultFolder)
|
||||
return S_OK;
|
||||
}
|
||||
|
||||
STDMETHODIMP CFSDrives::GetName(BSTR *name)
|
||||
STDMETHODIMP CFSDrives::GetName(BSTR * /* name */)
|
||||
{
|
||||
return E_NOTIMPL;
|
||||
}
|
||||
|
||||
@@ -172,7 +172,7 @@ bool CFSFolder::LoadComments()
|
||||
if (length >= (1 << 28))
|
||||
return false;
|
||||
AString s;
|
||||
char *p = s.GetBuffer((size_t)length + 1);
|
||||
char *p = s.GetBuffer((int)((size_t)length + 1));
|
||||
UInt32 processedSize;
|
||||
file.Read(p, (UInt32)length, processedSize);
|
||||
p[length] = 0;
|
||||
@@ -380,7 +380,7 @@ STDMETHODIMP CFSFolder::BindToParentFolder(IFolderFolder **resultFolder)
|
||||
return S_OK;
|
||||
}
|
||||
|
||||
STDMETHODIMP CFSFolder::GetName(BSTR *name)
|
||||
STDMETHODIMP CFSFolder::GetName(BSTR * /* name */)
|
||||
{
|
||||
return E_NOTIMPL;
|
||||
/*
|
||||
@@ -429,7 +429,7 @@ STDMETHODIMP CFSFolder::GetPath(BSTR *path)
|
||||
STDMETHODIMP CFSFolder::WasChanged(INT32 *wasChanged)
|
||||
{
|
||||
bool wasChangedMain = false;
|
||||
while (true)
|
||||
for (;;)
|
||||
{
|
||||
if (!_findChangeNotificationDefined)
|
||||
{
|
||||
@@ -518,7 +518,7 @@ HRESULT CFSFolder::GetComplexName(const wchar_t *name, UString &resultPath)
|
||||
return S_OK;
|
||||
}
|
||||
|
||||
STDMETHODIMP CFSFolder::CreateFolder(const wchar_t *name, IProgress *progress)
|
||||
STDMETHODIMP CFSFolder::CreateFolder(const wchar_t *name, IProgress * /* progress */)
|
||||
{
|
||||
UString processedName;
|
||||
RINOK(GetComplexName(name, processedName));
|
||||
@@ -531,7 +531,7 @@ STDMETHODIMP CFSFolder::CreateFolder(const wchar_t *name, IProgress *progress)
|
||||
return S_OK;
|
||||
}
|
||||
|
||||
STDMETHODIMP CFSFolder::CreateFile(const wchar_t *name, IProgress *progress)
|
||||
STDMETHODIMP CFSFolder::CreateFile(const wchar_t *name, IProgress * /* progress */)
|
||||
{
|
||||
UString processedName;
|
||||
RINOK(GetComplexName(name, processedName));
|
||||
@@ -541,7 +541,7 @@ STDMETHODIMP CFSFolder::CreateFile(const wchar_t *name, IProgress *progress)
|
||||
return S_OK;
|
||||
}
|
||||
|
||||
STDMETHODIMP CFSFolder::Rename(UInt32 index, const wchar_t *newName, IProgress *progress)
|
||||
STDMETHODIMP CFSFolder::Rename(UInt32 index, const wchar_t *newName, IProgress * /* progress */)
|
||||
{
|
||||
const CDirItem &fileInfo = *_refs[index];
|
||||
const UString fullPrefix = _path + GetPrefix(fileInfo);
|
||||
@@ -550,13 +550,11 @@ STDMETHODIMP CFSFolder::Rename(UInt32 index, const wchar_t *newName, IProgress *
|
||||
return S_OK;
|
||||
}
|
||||
|
||||
STDMETHODIMP CFSFolder::Delete(const UInt32 *indices, UInt32 numItems,
|
||||
IProgress *progress)
|
||||
STDMETHODIMP CFSFolder::Delete(const UInt32 *indices, UInt32 numItems,IProgress *progress)
|
||||
{
|
||||
RINOK(progress->SetTotal(numItems));
|
||||
for (UInt32 i = 0; i < numItems; i++)
|
||||
{
|
||||
int index = indices[i];
|
||||
const CDirItem &fileInfo = *_refs[indices[i]];
|
||||
const UString fullPath = _path + GetRelPath(fileInfo);
|
||||
bool result;
|
||||
@@ -573,7 +571,7 @@ STDMETHODIMP CFSFolder::Delete(const UInt32 *indices, UInt32 numItems,
|
||||
}
|
||||
|
||||
STDMETHODIMP CFSFolder::SetProperty(UInt32 index, PROPID propID,
|
||||
const PROPVARIANT *value, IProgress *progress)
|
||||
const PROPVARIANT *value, IProgress * /* progress */)
|
||||
{
|
||||
if (index >= (UInt32)_refs.Size())
|
||||
return E_INVALIDARG;
|
||||
|
||||
@@ -20,6 +20,7 @@ using namespace NFind;
|
||||
extern bool g_IsNT;
|
||||
#endif
|
||||
|
||||
/*
|
||||
static bool IsItWindows2000orHigher()
|
||||
{
|
||||
OSVERSIONINFO versionInfo;
|
||||
@@ -29,6 +30,7 @@ static bool IsItWindows2000orHigher()
|
||||
return (versionInfo.dwPlatformId == VER_PLATFORM_WIN32_NT) &&
|
||||
(versionInfo.dwMajorVersion >= 5);
|
||||
}
|
||||
*/
|
||||
|
||||
struct CProgressInfo
|
||||
{
|
||||
@@ -37,14 +39,14 @@ struct CProgressInfo
|
||||
};
|
||||
|
||||
static DWORD CALLBACK CopyProgressRoutine(
|
||||
LARGE_INTEGER TotalFileSize, // file size
|
||||
LARGE_INTEGER /* TotalFileSize */, // file size
|
||||
LARGE_INTEGER TotalBytesTransferred, // bytes transferred
|
||||
LARGE_INTEGER StreamSize, // bytes in stream
|
||||
LARGE_INTEGER StreamBytesTransferred, // bytes transferred for stream
|
||||
DWORD dwStreamNumber, // current stream
|
||||
DWORD dwCallbackReason, // callback reason
|
||||
HANDLE hSourceFile, // handle to source file
|
||||
HANDLE hDestinationFile, // handle to destination file
|
||||
LARGE_INTEGER /* StreamSize */, // bytes in stream
|
||||
LARGE_INTEGER /* StreamBytesTransferred */, // bytes transferred for stream
|
||||
DWORD /* dwStreamNumber */, // current stream
|
||||
DWORD /* dwCallbackReason */, // callback reason
|
||||
HANDLE /* hSourceFile */, // handle to source file
|
||||
HANDLE /* hDestinationFile */, // handle to destination file
|
||||
LPVOID lpData // from CopyFileEx
|
||||
)
|
||||
{
|
||||
@@ -133,7 +135,6 @@ static bool MyMoveFile(LPCWSTR existingFile, LPCWSTR newFile,
|
||||
CProgressInfo progressInfo;
|
||||
progressInfo.Progress = progress;
|
||||
progressInfo.StartPos = completedSize;
|
||||
BOOL CancelFlag = FALSE;
|
||||
|
||||
MoveFileWithProgressPointer moveFunction = (MoveFileWithProgressPointer)
|
||||
::GetProcAddress(::GetModuleHandle(TEXT("kernel32.dll")),
|
||||
@@ -462,9 +463,8 @@ STDMETHODIMP CFSFolder::MoveTo(
|
||||
return S_OK;
|
||||
}
|
||||
|
||||
STDMETHODIMP CFSFolder::CopyFrom(
|
||||
const wchar_t *fromFolderPath,
|
||||
const wchar_t **itemsPaths, UInt32 numItems, IProgress *progress)
|
||||
STDMETHODIMP CFSFolder::CopyFrom(const wchar_t * /* fromFolderPath */,
|
||||
const wchar_t ** /* itemsPaths */, UInt32 /* numItems */, IProgress * /* progress */)
|
||||
{
|
||||
return E_NOTIMPL;
|
||||
}
|
||||
|
||||
@@ -103,7 +103,7 @@ void LoadLangs(CObjectVector<CLangEx> &langs)
|
||||
continue;
|
||||
CLangEx lang;
|
||||
UString filePath = folderPath + fileInfo.Name;
|
||||
const kExtSize = 4;
|
||||
const int kExtSize = 4;
|
||||
if (fileInfo.Name.Right(kExtSize) != L".txt")
|
||||
continue;
|
||||
lang.ShortName = fileInfo.Name.Left(fileInfo.Name.Length() - kExtSize);
|
||||
@@ -138,8 +138,8 @@ void FindMatchLang(UString &shortName)
|
||||
{
|
||||
shortName.Empty();
|
||||
LANGID langID = GetUserDefaultLangID();
|
||||
WORD primLang = PRIMARYLANGID(langID);
|
||||
WORD subLang = SUBLANGID(langID);
|
||||
WORD primLang = (WORD)(PRIMARYLANGID(langID));
|
||||
WORD subLang = (WORD)(SUBLANGID(langID));
|
||||
CObjectVector<CLangEx> langs;
|
||||
LoadLangs(langs);
|
||||
for (int i = 0; i < langs.Size(); i++)
|
||||
|
||||
@@ -301,7 +301,7 @@ static void CopyMenu(HMENU srcMenuSpec, HMENU destMenuSpec)
|
||||
}
|
||||
}
|
||||
|
||||
void OnMenuActivating(HWND hWnd, HMENU hMenu, int position)
|
||||
void OnMenuActivating(HWND /* hWnd */, HMENU hMenu, int position)
|
||||
{
|
||||
if (::GetSubMenu(::GetMenu(g_HWND), position) != hMenu)
|
||||
return;
|
||||
@@ -357,7 +357,7 @@ void OnMenuActivating(HWND hWnd, HMENU hMenu, int position)
|
||||
{
|
||||
UString s = LangString(IDS_BOOKMARK, 0x03000720);
|
||||
s += L" ";
|
||||
wchar_t c = L'0' + i;
|
||||
wchar_t c = (wchar_t)(L'0' + i);
|
||||
s += c;
|
||||
s += L"\tAlt+Shift+";
|
||||
s += c;
|
||||
@@ -381,7 +381,7 @@ void OnMenuActivating(HWND hWnd, HMENU hMenu, int position)
|
||||
if (s.IsEmpty())
|
||||
s = L"-";
|
||||
s += L"\tAlt+";
|
||||
s += (L'0' + i);
|
||||
s += (wchar_t)(L'0' + i);
|
||||
menu.AppendItem(MF_STRING, kOpenBookmarkMenuID + i, s);
|
||||
}
|
||||
}
|
||||
@@ -402,8 +402,7 @@ void OnMenuUnActivating(HWND hWnd)
|
||||
*/
|
||||
|
||||
|
||||
void LoadFileMenu(HMENU hMenu, int startPos, bool forFileMode,
|
||||
bool programMenu)
|
||||
void LoadFileMenu(HMENU hMenu, int startPos, bool /* forFileMode */, bool programMenu)
|
||||
{
|
||||
{
|
||||
CMenu srcMenu;
|
||||
|
||||
@@ -85,7 +85,7 @@ STDMETHODIMP CNetFolder::LoadItems()
|
||||
_items.Clear();
|
||||
CEnum enumerator;
|
||||
|
||||
while(true)
|
||||
for (;;)
|
||||
{
|
||||
DWORD result = enumerator.Open(
|
||||
RESOURCE_GLOBALNET,
|
||||
@@ -104,7 +104,7 @@ STDMETHODIMP CNetFolder::LoadItems()
|
||||
return result;
|
||||
}
|
||||
|
||||
while(true)
|
||||
for (;;)
|
||||
{
|
||||
CResourceEx resource;
|
||||
DWORD result = enumerator.Next(resource);
|
||||
@@ -212,7 +212,7 @@ STDMETHODIMP CNetFolder::BindToFolder(UInt32 index, IFolderFolder **resultFolder
|
||||
return S_OK;
|
||||
}
|
||||
|
||||
STDMETHODIMP CNetFolder::BindToFolder(const wchar_t *name, IFolderFolder **resultFolder)
|
||||
STDMETHODIMP CNetFolder::BindToFolder(const wchar_t * /* name */, IFolderFolder ** /* resultFolder */)
|
||||
{
|
||||
return E_NOTIMPL;
|
||||
}
|
||||
|
||||
@@ -9,22 +9,22 @@
|
||||
#include "Windows/PropVariant.h"
|
||||
#include "../Common/FileStreams.h"
|
||||
|
||||
STDMETHODIMP COpenArchiveCallback::SetTotal(const UINT64 *numFiles, const UINT64 *numBytes)
|
||||
STDMETHODIMP COpenArchiveCallback::SetTotal(const UINT64 * /* numFiles */, const UINT64 * /* numBytes */)
|
||||
{
|
||||
return S_OK;
|
||||
}
|
||||
|
||||
STDMETHODIMP COpenArchiveCallback::SetCompleted(const UINT64 *numFiles, const UINT64 *numBytes)
|
||||
STDMETHODIMP COpenArchiveCallback::SetCompleted(const UINT64 * /* numFiles */, const UINT64 * /* numBytes */)
|
||||
{
|
||||
return S_OK;
|
||||
}
|
||||
|
||||
STDMETHODIMP COpenArchiveCallback::SetTotal(const UINT64 total)
|
||||
STDMETHODIMP COpenArchiveCallback::SetTotal(const UINT64 /* total */)
|
||||
{
|
||||
return S_OK;
|
||||
}
|
||||
|
||||
STDMETHODIMP COpenArchiveCallback::SetCompleted(const UINT64 *completed)
|
||||
STDMETHODIMP COpenArchiveCallback::SetCompleted(const UINT64 * /* completed */)
|
||||
{
|
||||
return S_OK;
|
||||
}
|
||||
|
||||
@@ -26,7 +26,7 @@
|
||||
|
||||
using namespace NWindows;
|
||||
|
||||
void OptionsDialog(HWND hwndOwner, HINSTANCE hInstance)
|
||||
void OptionsDialog(HWND hwndOwner, HINSTANCE /* hInstance */)
|
||||
{
|
||||
CSystemPage systemPage;
|
||||
CPluginsPage pluginsPage;
|
||||
@@ -48,7 +48,7 @@ void OptionsDialog(HWND hwndOwner, HINSTANCE hInstance)
|
||||
pages.Add(page);
|
||||
}
|
||||
|
||||
int res = NControl::MyPropertySheet(pages, hwndOwner, LangString(IDS_OPTIONS, 0x03010000));
|
||||
INT_PTR res = NControl::MyPropertySheet(pages, hwndOwner, LangString(IDS_OPTIONS, 0x03010000));
|
||||
if (res != -1 && res != 0)
|
||||
{
|
||||
if (langPage._langWasChanged)
|
||||
|
||||
@@ -80,7 +80,7 @@ LRESULT CPanel::Create(HWND mainWindow, HWND parentWindow, UINT id,
|
||||
|
||||
if (!CreateEx(0, kClassName, 0, WS_CHILD | WS_VISIBLE,
|
||||
0, 0, _xSize, 260,
|
||||
parentWindow, (HMENU)id, g_hInstance))
|
||||
parentWindow, (HMENU)(UINT_PTR)id, g_hInstance))
|
||||
return E_FAIL;
|
||||
return S_OK;
|
||||
}
|
||||
@@ -132,7 +132,7 @@ LRESULT CMyListView::OnMessage(UINT message, WPARAM wParam, LPARAM lParam)
|
||||
{
|
||||
if (message == WM_CHAR)
|
||||
{
|
||||
UINT scanCode = (lParam >> 16) & 0xFF;
|
||||
UINT scanCode = (UINT)((lParam >> 16) & 0xFF);
|
||||
bool extended = ((lParam & 0x1000000) != 0);
|
||||
UINT virtualKey = MapVirtualKey(scanCode, 1);
|
||||
if (virtualKey == VK_MULTIPLY || virtualKey == VK_ADD ||
|
||||
@@ -148,7 +148,7 @@ LRESULT CMyListView::OnMessage(UINT message, WPARAM wParam, LPARAM lParam)
|
||||
else if (message == WM_SYSCHAR)
|
||||
{
|
||||
// For Alt+Enter Beep disabling
|
||||
UINT scanCode = (lParam >> 16) & 0xFF;
|
||||
UINT scanCode = (UINT)(lParam >> 16) & 0xFF;
|
||||
UINT virtualKey = MapVirtualKey(scanCode, 1);
|
||||
if (virtualKey == VK_RETURN || virtualKey == VK_MULTIPLY ||
|
||||
virtualKey == VK_ADD || virtualKey == VK_SUBTRACT)
|
||||
@@ -164,8 +164,8 @@ LRESULT CMyListView::OnMessage(UINT message, WPARAM wParam, LPARAM lParam)
|
||||
{
|
||||
bool alt = (::GetKeyState(VK_MENU) & 0x8000) != 0;
|
||||
bool ctrl = (::GetKeyState(VK_CONTROL) & 0x8000) != 0;
|
||||
bool leftCtrl = (::GetKeyState(VK_LCONTROL) & 0x8000) != 0;
|
||||
bool RightCtrl = (::GetKeyState(VK_RCONTROL) & 0x8000) != 0;
|
||||
// bool leftCtrl = (::GetKeyState(VK_LCONTROL) & 0x8000) != 0;
|
||||
// bool RightCtrl = (::GetKeyState(VK_RCONTROL) & 0x8000) != 0;
|
||||
bool shift = (::GetKeyState(VK_SHIFT) & 0x8000) != 0;
|
||||
switch(wParam)
|
||||
{
|
||||
@@ -295,7 +295,7 @@ LRESULT CMyComboBoxEdit::OnMessage(UINT message, WPARAM wParam, LPARAM lParam)
|
||||
return CallWindowProc(_origWindowProc, *this, message, wParam, lParam);
|
||||
}
|
||||
|
||||
bool CPanel::OnCreate(CREATESTRUCT *createStruct)
|
||||
bool CPanel::OnCreate(CREATESTRUCT * /* createStruct */)
|
||||
{
|
||||
// _virtualMode = false;
|
||||
// _sortIndex = 0;
|
||||
@@ -329,7 +329,7 @@ bool CPanel::OnCreate(CREATESTRUCT *createStruct)
|
||||
exStyle = WS_EX_CLIENTEDGE;
|
||||
|
||||
if (!_listView.CreateEx(exStyle, style, 0, 0, 116, 260,
|
||||
HWND(*this), (HMENU)_baseID + 1, g_hInstance, NULL))
|
||||
HWND(*this), (HMENU)(UINT_PTR)(_baseID + 1), g_hInstance, NULL))
|
||||
return false;
|
||||
|
||||
_listView.SetUnicodeFormat(true);
|
||||
@@ -438,7 +438,7 @@ bool CPanel::OnCreate(CREATESTRUCT *createStruct)
|
||||
WS_BORDER | WS_VISIBLE |WS_CHILD | CBS_DROPDOWN | CBS_AUTOHSCROLL,
|
||||
0, 0, 100, 20,
|
||||
((_headerReBar == 0) ? HWND(*this) : _headerToolBar),
|
||||
(HMENU)(_comboBoxID),
|
||||
(HMENU)(UINT_PTR)(_comboBoxID),
|
||||
g_hInstance, NULL);
|
||||
// _headerComboBox.SendMessage(CBEM_SETUNICODEFORMAT, (WPARAM)(BOOL)TRUE, 0);
|
||||
|
||||
@@ -569,7 +569,7 @@ void CPanel::ChangeWindowSize(int xSize, int ySize)
|
||||
// _statusBar2.MoveWindow(0, 200, xSize, kStatusBar2Size);
|
||||
}
|
||||
|
||||
bool CPanel::OnSize(WPARAM wParam, int xSize, int ySize)
|
||||
bool CPanel::OnSize(WPARAM /* wParam */, int xSize, int ySize)
|
||||
{
|
||||
if (_headerReBar)
|
||||
_headerReBar.Move(0, 0, xSize, 0);
|
||||
@@ -577,7 +577,7 @@ bool CPanel::OnSize(WPARAM wParam, int xSize, int ySize)
|
||||
return true;
|
||||
}
|
||||
|
||||
bool CPanel::OnNotifyReBar(LPNMHDR header, LRESULT &result)
|
||||
bool CPanel::OnNotifyReBar(LPNMHDR header, LRESULT & /* result */)
|
||||
{
|
||||
switch(header->code)
|
||||
{
|
||||
@@ -592,7 +592,7 @@ bool CPanel::OnNotifyReBar(LPNMHDR header, LRESULT &result)
|
||||
return false;
|
||||
}
|
||||
|
||||
bool CPanel::OnNotify(UINT controlID, LPNMHDR header, LRESULT &result)
|
||||
bool CPanel::OnNotify(UINT /* controlID */, LPNMHDR header, LRESULT &result)
|
||||
{
|
||||
if (!_processNotify)
|
||||
return false;
|
||||
@@ -729,7 +729,7 @@ void CPanel::SetListViewMode(UINT32 index)
|
||||
if (index >= 4)
|
||||
return;
|
||||
_ListViewMode = index;
|
||||
DWORD oldStyle = _listView.GetStyle();
|
||||
DWORD oldStyle = (DWORD)_listView.GetStyle();
|
||||
DWORD newStyle = kStyles[index];
|
||||
if ((oldStyle & LVS_TYPEMASK) != newStyle)
|
||||
_listView.SetStyle((oldStyle & ~LVS_TYPEMASK) | newStyle);
|
||||
@@ -770,8 +770,7 @@ void CPanel::AddToArchive()
|
||||
}
|
||||
const UString archiveName = CreateArchiveName(
|
||||
names.Front(), (names.Size() > 1), false);
|
||||
CompressFiles(_currentFolderPrefix, archiveName,
|
||||
names, false, true, false);
|
||||
CompressFiles(_currentFolderPrefix, archiveName, L"", names, false, true, false);
|
||||
// KillSelection();
|
||||
}
|
||||
|
||||
|
||||
@@ -240,7 +240,7 @@ public:
|
||||
if (_virtualMode)
|
||||
return _realIndices[item.iItem];
|
||||
*/
|
||||
return item.lParam;
|
||||
return (UInt32)item.lParam;
|
||||
}
|
||||
int GetRealItemIndex(int indexInListView) const
|
||||
{
|
||||
@@ -251,7 +251,7 @@ public:
|
||||
LPARAM param;
|
||||
if (!_listView.GetItemParam(indexInListView, param))
|
||||
throw 1;
|
||||
return param;
|
||||
return (int)param;
|
||||
}
|
||||
|
||||
UInt32 _ListViewMode;
|
||||
@@ -415,26 +415,28 @@ public:
|
||||
|
||||
CPanel &_panel;
|
||||
public:
|
||||
CDisableTimerProcessing(CPanel &panel): _panel(panel)
|
||||
{
|
||||
Disable();
|
||||
}
|
||||
void Disable()
|
||||
{
|
||||
_processTimerMem = _panel._processTimer;
|
||||
_processNotifyMem = _panel._processNotify;
|
||||
_panel._processTimer = false;
|
||||
_panel._processNotify = false;
|
||||
}
|
||||
void Restore()
|
||||
{
|
||||
_panel._processTimer = _processTimerMem;
|
||||
_panel._processNotify = _processNotifyMem;
|
||||
}
|
||||
~CDisableTimerProcessing()
|
||||
{
|
||||
Restore();
|
||||
}
|
||||
|
||||
CDisableTimerProcessing(CPanel &panel): _panel(panel)
|
||||
{
|
||||
Disable();
|
||||
}
|
||||
void Disable()
|
||||
{
|
||||
_processTimerMem = _panel._processTimer;
|
||||
_processNotifyMem = _panel._processNotify;
|
||||
_panel._processTimer = false;
|
||||
_panel._processNotify = false;
|
||||
}
|
||||
void Restore()
|
||||
{
|
||||
_panel._processTimer = _processTimerMem;
|
||||
_panel._processNotify = _processNotifyMem;
|
||||
}
|
||||
~CDisableTimerProcessing()
|
||||
{
|
||||
Restore();
|
||||
}
|
||||
CDisableTimerProcessing& operator=(const CDisableTimerProcessing &) {; }
|
||||
};
|
||||
|
||||
// bool _passwordIsDefined;
|
||||
@@ -466,7 +468,7 @@ public:
|
||||
HRESULT OpenItemAsArchive(int index);
|
||||
void OpenItemInArchive(int index, bool tryInternal, bool tryExternal,
|
||||
bool editMode);
|
||||
LRESULT OnOpenItemChanged(const UString &folderPath, const UString &itemName);
|
||||
HRESULT OnOpenItemChanged(const UString &folderPath, const UString &itemName);
|
||||
LRESULT OnOpenItemChanged(LPARAM lParam);
|
||||
|
||||
void OpenItem(int index, bool tryInternal, bool tryExternal);
|
||||
|
||||
@@ -53,7 +53,7 @@ void CDirEnumerator::Init()
|
||||
bool CDirEnumerator::GetNextFile(NFind::CFileInfoW &fileInfo, bool &filled, UString &resPath, DWORD &errorCode)
|
||||
{
|
||||
filled = false;
|
||||
while(true)
|
||||
for (;;)
|
||||
{
|
||||
if (Enumerators.IsEmpty())
|
||||
{
|
||||
@@ -154,7 +154,7 @@ struct CThreadCrc
|
||||
UString scanningStr = LangString(IDS_SCANNING, 0x03020800);
|
||||
scanningStr += L" ";
|
||||
|
||||
while (true)
|
||||
for (;;)
|
||||
{
|
||||
NFile::NFind::CFileInfoW fileInfo;
|
||||
bool filled;
|
||||
@@ -180,7 +180,7 @@ struct CThreadCrc
|
||||
|
||||
DirEnumerator.Init();
|
||||
|
||||
while(true)
|
||||
for (;;)
|
||||
{
|
||||
NFile::NFind::CFileInfoW fileInfo;
|
||||
bool filled;
|
||||
@@ -209,7 +209,7 @@ struct CThreadCrc
|
||||
}
|
||||
NumFiles++;
|
||||
ProgressDialog->ProgressSynch.SetCurrentFileName(resPath);
|
||||
while(true)
|
||||
for (;;)
|
||||
{
|
||||
UInt32 processedSize;
|
||||
if (!inFile.Read(buffer, kBufSize, processedSize))
|
||||
@@ -232,8 +232,8 @@ struct CThreadCrc
|
||||
for (int i = 0; i < resPath.Length(); i++)
|
||||
{
|
||||
wchar_t c = resPath[i];
|
||||
crc.UpdateByte(c & 0xFF);
|
||||
crc.UpdateByte((c >> 8) & 0xFF);
|
||||
crc.UpdateByte((Byte)(c & 0xFF));
|
||||
crc.UpdateByte((Byte)((c >> 8) & 0xFF));
|
||||
}
|
||||
DataNameCrcSum += crc.GetDigest();
|
||||
Result = ProgressDialog->ProgressSynch.SetPosAndCheckPaused(DataSize);
|
||||
|
||||
@@ -42,16 +42,16 @@ public:
|
||||
STDMETHODIMP GetDataHere(LPFORMATETC pformatetc, LPSTGMEDIUM medium);
|
||||
STDMETHODIMP QueryGetData(LPFORMATETC pformatetc );
|
||||
|
||||
STDMETHODIMP GetCanonicalFormatEtc ( LPFORMATETC pformatetc, LPFORMATETC pformatetcOut)
|
||||
STDMETHODIMP GetCanonicalFormatEtc ( LPFORMATETC /* pformatetc */, LPFORMATETC pformatetcOut)
|
||||
{ pformatetcOut->ptd = NULL; return ResultFromScode(E_NOTIMPL); }
|
||||
|
||||
STDMETHODIMP SetData(LPFORMATETC etc, STGMEDIUM *medium, BOOL release);
|
||||
STDMETHODIMP EnumFormatEtc(DWORD drection, LPENUMFORMATETC *enumFormatEtc);
|
||||
|
||||
STDMETHODIMP DAdvise(FORMATETC *etc, DWORD advf, LPADVISESINK pAdvSink, DWORD *pdwConnection)
|
||||
STDMETHODIMP DAdvise(FORMATETC * /* etc */, DWORD /* advf */, LPADVISESINK /* pAdvSink */, DWORD * /* pdwConnection */)
|
||||
{ return OLE_E_ADVISENOTSUPPORTED; }
|
||||
STDMETHODIMP DUnadvise(DWORD dwConnection) { return OLE_E_ADVISENOTSUPPORTED; }
|
||||
STDMETHODIMP EnumDAdvise( LPENUMSTATDATA *ppenumAdvise) { return OLE_E_ADVISENOTSUPPORTED; }
|
||||
STDMETHODIMP DUnadvise(DWORD /* dwConnection */) { return OLE_E_ADVISENOTSUPPORTED; }
|
||||
STDMETHODIMP EnumDAdvise( LPENUMSTATDATA * /* ppenumAdvise */) { return OLE_E_ADVISENOTSUPPORTED; }
|
||||
|
||||
CDataObject();
|
||||
|
||||
@@ -69,7 +69,7 @@ CDataObject::CDataObject()
|
||||
m_Etc.tymed = TYMED_HGLOBAL;
|
||||
}
|
||||
|
||||
STDMETHODIMP CDataObject::SetData(LPFORMATETC etc, STGMEDIUM *medium, BOOL release)
|
||||
STDMETHODIMP CDataObject::SetData(LPFORMATETC etc, STGMEDIUM *medium, BOOL /* release */)
|
||||
{
|
||||
if (etc->cfFormat == m_SetFolderFormat && etc->tymed == TYMED_HGLOBAL &&
|
||||
etc->dwAspect == DVASPECT_CONTENT && medium->tymed == TYMED_HGLOBAL)
|
||||
@@ -131,7 +131,7 @@ STDMETHODIMP CDataObject::GetData(LPFORMATETC etc, LPSTGMEDIUM medium)
|
||||
return S_OK;
|
||||
}
|
||||
|
||||
STDMETHODIMP CDataObject::GetDataHere(LPFORMATETC etc, LPSTGMEDIUM medium)
|
||||
STDMETHODIMP CDataObject::GetDataHere(LPFORMATETC /* etc */, LPSTGMEDIUM /* medium */)
|
||||
{
|
||||
// Seems Windows doesn't call it, so we will not implement it.
|
||||
return E_UNEXPECTED;
|
||||
@@ -248,7 +248,7 @@ static bool CopyNamesToHGlobal(NMemory::CGlobal &hgDrop, const UStringVector &na
|
||||
{
|
||||
const AString &s = namesA[i];
|
||||
int fullLength = s.Length() + 1;
|
||||
strcpy(p, s);
|
||||
MyStringCopy(p, (const char *)s);
|
||||
p += fullLength;
|
||||
totalLength -= fullLength;
|
||||
}
|
||||
@@ -278,7 +278,7 @@ static bool CopyNamesToHGlobal(NMemory::CGlobal &hgDrop, const UStringVector &na
|
||||
{
|
||||
const UString &s = names[i];
|
||||
int fullLength = s.Length() + 1;
|
||||
wcscpy(p, s);
|
||||
MyStringCopy(p, (const WCHAR *)s);
|
||||
p += fullLength;
|
||||
totalLength -= fullLength;
|
||||
}
|
||||
@@ -287,7 +287,7 @@ static bool CopyNamesToHGlobal(NMemory::CGlobal &hgDrop, const UStringVector &na
|
||||
return true;
|
||||
}
|
||||
|
||||
void CPanel::OnDrag(LPNMLISTVIEW nmListView)
|
||||
void CPanel::OnDrag(LPNMLISTVIEW /* nmListView */)
|
||||
{
|
||||
CPanel::CDisableTimerProcessing disableTimerProcessing2(*this);
|
||||
if (!DoesItSupportOperations())
|
||||
@@ -586,7 +586,7 @@ bool CDropTarget::IsItSameDrive() const
|
||||
|
||||
}
|
||||
|
||||
DWORD CDropTarget::GetEffect(DWORD keyState, POINTL pt, DWORD allowedEffect)
|
||||
DWORD CDropTarget::GetEffect(DWORD keyState, POINTL /* pt */, DWORD allowedEffect)
|
||||
{
|
||||
if (!m_DropIsAllowed || !m_PanelDropIsAllowed)
|
||||
return DROPEFFECT_NONE;
|
||||
@@ -636,7 +636,7 @@ bool CDropTarget::SetPath(bool enablePath) const
|
||||
{
|
||||
UINT setFolderFormat = RegisterClipboardFormat(kSvenZipSetFolderFormat);
|
||||
|
||||
FORMATETC etc = { setFolderFormat, 0, DVASPECT_CONTENT, -1, TYMED_HGLOBAL };
|
||||
FORMATETC etc = { (CLIPFORMAT)setFolderFormat, 0, DVASPECT_CONTENT, -1, TYMED_HGLOBAL };
|
||||
STGMEDIUM medium;
|
||||
medium.tymed = etc.tymed;
|
||||
medium.pUnkForRelease = 0;
|
||||
@@ -653,7 +653,7 @@ bool CDropTarget::SetPath(bool enablePath) const
|
||||
GlobalUnlock(medium.hGlobal);
|
||||
return false;
|
||||
}
|
||||
wcscpy(dest, path);
|
||||
MyStringCopy(dest, (const wchar_t *)path);
|
||||
GlobalUnlock(medium.hGlobal);
|
||||
bool res = m_DataObject->SetData(&etc, &medium, FALSE) == S_OK;
|
||||
GlobalFree(medium.hGlobal);
|
||||
@@ -785,7 +785,7 @@ void CPanel::CompressDropFiles(const UStringVector &fileNames, const UString &fo
|
||||
if (IsFolderInTemp(folderPath2))
|
||||
folderPath2 = L"C:\\"; // fix it
|
||||
}
|
||||
CompressFiles(folderPath2, archiveName, fileNames,
|
||||
CompressFiles(folderPath2, archiveName, L"", fileNames,
|
||||
false, // email
|
||||
true, // showDialog
|
||||
AreThereNamesFromTemp(fileNames) // waitFinish
|
||||
|
||||
@@ -216,7 +216,7 @@ bool CPanel::OnNotifyComboBoxEndEdit(PNMCBEENDEDIT info, LRESULT &result)
|
||||
}
|
||||
#endif
|
||||
|
||||
void CPanel::OnComboBoxCommand(UINT code, LPARAM ¶m)
|
||||
void CPanel::OnComboBoxCommand(UINT /* code */, LPARAM & /* param */)
|
||||
{
|
||||
/*
|
||||
if (code == CBN_SELENDOK)
|
||||
|
||||
@@ -51,15 +51,15 @@ struct CTmpProcessInfo: public CTempFileInfo
|
||||
|
||||
class CTmpProcessInfoRelease
|
||||
{
|
||||
CTmpProcessInfo &_tmpProcessInfo;
|
||||
CTmpProcessInfo *_tmpProcessInfo;
|
||||
public:
|
||||
bool _needDelete;
|
||||
CTmpProcessInfoRelease(CTmpProcessInfo &tmpProcessInfo):
|
||||
_tmpProcessInfo(tmpProcessInfo), _needDelete(true) {}
|
||||
_tmpProcessInfo(&tmpProcessInfo), _needDelete(true) {}
|
||||
~CTmpProcessInfoRelease()
|
||||
{
|
||||
if (_needDelete)
|
||||
_tmpProcessInfo.DeleteDirAndFile();
|
||||
_tmpProcessInfo->DeleteDirAndFile();
|
||||
}
|
||||
};
|
||||
|
||||
@@ -139,6 +139,17 @@ HRESULT CPanel::OpenParentArchiveFolder()
|
||||
return S_OK;
|
||||
}
|
||||
|
||||
static const wchar_t *kStartExtensions[] =
|
||||
{
|
||||
L"exe",
|
||||
L"bat",
|
||||
L"com",
|
||||
L"chm",
|
||||
L"doc",
|
||||
L"pdf",
|
||||
L"xls"
|
||||
};
|
||||
|
||||
static bool DoItemAlwaysStart(const UString &name)
|
||||
{
|
||||
int extPos = name.ReverseFind('.');
|
||||
@@ -146,10 +157,10 @@ static bool DoItemAlwaysStart(const UString &name)
|
||||
return false;
|
||||
UString ext = name.Mid(extPos + 1);
|
||||
ext.MakeLower();
|
||||
return (ext == UString(L"exe") ||
|
||||
ext == UString(L"bat") ||
|
||||
ext == UString(L"com") ||
|
||||
ext == UString(L"chm"));
|
||||
for (int i = 0; i < sizeof(kStartExtensions) / sizeof(kStartExtensions[0]); i++)
|
||||
if (ext.Compare(kStartExtensions[i]) == 0)
|
||||
return true;
|
||||
return false;
|
||||
}
|
||||
|
||||
static HANDLE StartEditApplication(const UString &path, HWND window)
|
||||
@@ -237,7 +248,7 @@ static HANDLE StartApplication(const UString &path, HWND window)
|
||||
if (shellExecuteExW == 0)
|
||||
return 0;
|
||||
shellExecuteExW(&execInfo);
|
||||
result = (UINT32)execInfo.hInstApp;
|
||||
result = (UINT32)(UINT_PTR)execInfo.hInstApp;
|
||||
hProcess = execInfo.hProcess;
|
||||
}
|
||||
else
|
||||
@@ -255,7 +266,7 @@ static HANDLE StartApplication(const UString &path, HWND window)
|
||||
execInfo.nShow = SW_SHOWNORMAL;
|
||||
execInfo.hProcess = 0;
|
||||
::ShellExecuteEx(&execInfo);
|
||||
result = (UINT32)execInfo.hInstApp;
|
||||
result = (UINT32)(UINT_PTR)execInfo.hInstApp;
|
||||
hProcess = execInfo.hProcess;
|
||||
}
|
||||
if(result <= 32)
|
||||
@@ -319,7 +330,7 @@ void CPanel::OpenItem(int index, bool tryInternal, bool tryExternal)
|
||||
}
|
||||
}
|
||||
|
||||
LRESULT CPanel::OnOpenItemChanged(const UString &folderPath, const UString &itemName)
|
||||
HRESULT CPanel::OnOpenItemChanged(const UString &folderPath, const UString &itemName)
|
||||
{
|
||||
CMyComPtr<IFolderOperations> folderOperations;
|
||||
if (_folder.QueryInterface(IID_IFolderOperations, &folderOperations) != S_OK)
|
||||
|
||||
@@ -131,7 +131,7 @@ void CPanel::InitColumns()
|
||||
}
|
||||
// InitColumns2(sortID);
|
||||
|
||||
while(true)
|
||||
for (;;)
|
||||
if (!_listView.DeleteColumn(0))
|
||||
break;
|
||||
|
||||
@@ -331,7 +331,6 @@ void CPanel::RefreshListCtrl(const UString &focusedName, int focusedPos, bool se
|
||||
SetToRootFolder();
|
||||
}
|
||||
|
||||
bool isRoot = IsRootFolder();
|
||||
_headerToolBar.EnableButton(kParentFolderID, !IsRootFolder());
|
||||
|
||||
CMyComPtr<IFolderSetFlatMode> folderSetFlatMode;
|
||||
@@ -411,7 +410,7 @@ void CPanel::RefreshListCtrl(const UString &focusedName, int focusedPos, bool se
|
||||
if (itemName.Find(L" ") >= 0)
|
||||
{
|
||||
int pos = 0;
|
||||
while (true)
|
||||
for (;;)
|
||||
{
|
||||
int posNew = itemName.Find(L" ", pos);
|
||||
if (posNew < 0)
|
||||
@@ -653,7 +652,7 @@ bool CPanel::IsItemFolder(int itemIndex) const
|
||||
return VARIANT_BOOLToBool(propVariant.boolVal);
|
||||
if (propVariant.vt == VT_EMPTY)
|
||||
return false;
|
||||
throw 21632;
|
||||
return false;
|
||||
}
|
||||
|
||||
UINT64 CPanel::GetItemSize(int itemIndex) const
|
||||
|
||||
@@ -43,7 +43,7 @@ bool CPanel::OnKeyDown(LPNMLVKEYDOWN keyDownInfo, LRESULT &result)
|
||||
}
|
||||
bool alt = (::GetKeyState(VK_MENU) & 0x8000) != 0;
|
||||
bool ctrl = (::GetKeyState(VK_CONTROL) & 0x8000) != 0;
|
||||
bool leftCtrl = (::GetKeyState(VK_LCONTROL) & 0x8000) != 0;
|
||||
// bool leftCtrl = (::GetKeyState(VK_LCONTROL) & 0x8000) != 0;
|
||||
bool rightCtrl = (::GetKeyState(VK_RCONTROL) & 0x8000) != 0;
|
||||
bool shift = (::GetKeyState(VK_SHIFT) & 0x8000) != 0;
|
||||
result = 0;
|
||||
|
||||
@@ -141,7 +141,7 @@ LRESULT CPanel::SetItemText(LVITEMW &item)
|
||||
{
|
||||
if(s.Length() + 1 > size)
|
||||
s = s.Left(size - 1);
|
||||
wcscpy(item.pszText, s);
|
||||
MyStringCopy(item.pszText, (const wchar_t *)s);
|
||||
}
|
||||
return 0;
|
||||
}
|
||||
@@ -150,7 +150,7 @@ extern DWORD g_ComCtl32Version;
|
||||
|
||||
void CPanel::OnItemChanged(NMLISTVIEW *item)
|
||||
{
|
||||
int index = item->lParam;
|
||||
int index = (int)item->lParam;
|
||||
if (index == kParentIndex)
|
||||
return;
|
||||
bool oldSelected = (item->uOldState & LVIS_SELECTED) != 0;
|
||||
@@ -162,9 +162,9 @@ void CPanel::OnItemChanged(NMLISTVIEW *item)
|
||||
|
||||
bool CPanel::OnNotifyList(LPNMHDR header, LRESULT &result)
|
||||
{
|
||||
bool alt = (::GetKeyState(VK_MENU) & 0x8000) != 0;
|
||||
bool ctrl = (::GetKeyState(VK_CONTROL) & 0x8000) != 0;
|
||||
bool shift = (::GetKeyState(VK_SHIFT) & 0x8000) != 0;
|
||||
// bool alt = (::GetKeyState(VK_MENU) & 0x8000) != 0;
|
||||
// bool ctrl = (::GetKeyState(VK_CONTROL) & 0x8000) != 0;
|
||||
// bool shift = (::GetKeyState(VK_SHIFT) & 0x8000) != 0;
|
||||
switch(header->code)
|
||||
{
|
||||
case LVN_ITEMCHANGED:
|
||||
@@ -222,8 +222,8 @@ bool CPanel::OnNotifyList(LPNMHDR header, LRESULT &result)
|
||||
{
|
||||
bool alt = (::GetKeyState(VK_MENU) & 0x8000) != 0;
|
||||
bool ctrl = (::GetKeyState(VK_CONTROL) & 0x8000) != 0;
|
||||
bool leftCtrl = (::GetKeyState(VK_LCONTROL) & 0x8000) != 0;
|
||||
bool RightCtrl = (::GetKeyState(VK_RCONTROL) & 0x8000) != 0;
|
||||
// bool leftCtrl = (::GetKeyState(VK_LCONTROL) & 0x8000) != 0;
|
||||
// bool RightCtrl = (::GetKeyState(VK_RCONTROL) & 0x8000) != 0;
|
||||
bool shift = (::GetKeyState(VK_SHIFT) & 0x8000) != 0;
|
||||
if (!shift && alt && !ctrl)
|
||||
{
|
||||
@@ -310,7 +310,7 @@ bool CPanel::OnCustomDraw(LPNMLVCUSTOMDRAW lplvcd, LRESULT &result)
|
||||
lplvcd->clrTextBk = GetBkColorForItem(lplvcd->nmcd.dwItemSpec,
|
||||
lplvcd->nmcd.lItemlParam);
|
||||
*/
|
||||
int realIndex = lplvcd->nmcd.lItemlParam;
|
||||
int realIndex = (int)lplvcd->nmcd.lItemlParam;
|
||||
bool selected = false;
|
||||
if (realIndex != kParentIndex)
|
||||
selected = _selectedStatusVector[realIndex];
|
||||
|
||||
@@ -326,13 +326,13 @@ bool CPanel::InvokePluginCommand(int id,
|
||||
commandInfo.cbSize = sizeof(commandInfo);
|
||||
commandInfo.fMask = CMIC_MASK_UNICODE;
|
||||
commandInfo.hwnd = GetParent();
|
||||
commandInfo.lpVerb = LPCSTR(offset);
|
||||
commandInfo.lpVerb = (LPCSTR)(MAKEINTRESOURCE(offset));
|
||||
commandInfo.lpParameters = NULL;
|
||||
CSysString currentFolderSys = GetSystemString(_currentFolderPrefix);
|
||||
commandInfo.lpDirectory = (LPCSTR)(LPCTSTR)(currentFolderSys);
|
||||
commandInfo.nShow = SW_SHOW;
|
||||
commandInfo.lpTitle = "";
|
||||
commandInfo.lpVerbW = LPCWSTR(offset);
|
||||
commandInfo.lpVerbW = (LPCWSTR)(MAKEINTRESOURCEW(offset));
|
||||
commandInfo.lpParameters = NULL;
|
||||
UString currentFolderUnicode = _currentFolderPrefix;
|
||||
commandInfo.lpDirectoryW = currentFolderUnicode;
|
||||
|
||||
@@ -95,7 +95,7 @@ void CPanel::DeleteItems(bool toRecycleBin)
|
||||
fo.fAnyOperationsAborted = FALSE;
|
||||
fo.hNameMappings = 0;
|
||||
fo.lpszProgressTitle = 0;
|
||||
int res = ::SHFileOperationA(&fo);
|
||||
/* int res = */ ::SHFileOperationA(&fo);
|
||||
}
|
||||
else
|
||||
#endif
|
||||
|
||||
@@ -29,14 +29,14 @@ int CALLBACK CompareItems2(LPARAM lParam1, LPARAM lParam2, LPARAM lpData)
|
||||
// if (panel->_sortIndex == 0)
|
||||
case kpidName:
|
||||
{
|
||||
const UString &name1 = panel->GetItemName(lParam1);
|
||||
const UString &name2 = panel->GetItemName(lParam2);
|
||||
const UString name1 = panel->GetItemName((int)lParam1);
|
||||
const UString name2 = panel->GetItemName((int)lParam2);
|
||||
int res = name1.CompareNoCase(name2);
|
||||
/*
|
||||
if (res != 0 || !panel->_flatMode)
|
||||
return res;
|
||||
const UString &prefix1 = panel->GetItemPrefix(lParam1);
|
||||
const UString &prefix2 = panel->GetItemPrefix(lParam2);
|
||||
const UString prefix1 = panel->GetItemPrefix(lParam1);
|
||||
const UString prefix2 = panel->GetItemPrefix(lParam2);
|
||||
return res = prefix1.CompareNoCase(prefix2);
|
||||
*/
|
||||
return res;
|
||||
@@ -47,8 +47,8 @@ int CALLBACK CompareItems2(LPARAM lParam1, LPARAM lParam2, LPARAM lpData)
|
||||
}
|
||||
case kpidExtension:
|
||||
{
|
||||
const UString &ext1 = GetExtension(panel->GetItemName(lParam1));
|
||||
const UString &ext2 = GetExtension(panel->GetItemName(lParam2));
|
||||
const UString ext1 = GetExtension(panel->GetItemName((int)lParam1));
|
||||
const UString ext2 = GetExtension(panel->GetItemName((int)lParam2));
|
||||
return ext1.CompareNoCase(ext2);
|
||||
}
|
||||
}
|
||||
@@ -63,13 +63,13 @@ int CALLBACK CompareItems2(LPARAM lParam1, LPARAM lParam2, LPARAM lpData)
|
||||
|
||||
NCOM::CPropVariant propVariant1, propVariant2;
|
||||
// Name must be first property
|
||||
panel->_folder->GetProperty(lParam1, propID, &propVariant1);
|
||||
panel->_folder->GetProperty(lParam2, propID, &propVariant2);
|
||||
panel->_folder->GetProperty((UINT32)lParam1, propID, &propVariant1);
|
||||
panel->_folder->GetProperty((UINT32)lParam2, propID, &propVariant2);
|
||||
if(propVariant1.vt != propVariant2.vt)
|
||||
return 0; // It means some BUG
|
||||
if (propVariant1.vt == VT_BSTR)
|
||||
{
|
||||
return wcsicmp(propVariant1.bstrVal, propVariant2.bstrVal);
|
||||
return _wcsicmp(propVariant1.bstrVal, propVariant2.bstrVal);
|
||||
}
|
||||
return propVariant1.Compare(propVariant2);
|
||||
// return 0;
|
||||
@@ -86,8 +86,8 @@ int CALLBACK CompareItems(LPARAM lParam1, LPARAM lParam2, LPARAM lpData)
|
||||
|
||||
CPanel *panel = (CPanel*)lpData;
|
||||
|
||||
bool isDirectory1 = panel->IsItemFolder(lParam1);
|
||||
bool isDirectory2 = panel->IsItemFolder(lParam2);
|
||||
bool isDirectory1 = panel->IsItemFolder((int)lParam1);
|
||||
bool isDirectory2 = panel->IsItemFolder((int)lParam2);
|
||||
|
||||
if(isDirectory1 && (!isDirectory2))
|
||||
return -1;
|
||||
@@ -95,8 +95,6 @@ int CALLBACK CompareItems(LPARAM lParam1, LPARAM lParam2, LPARAM lpData)
|
||||
return 1;
|
||||
|
||||
int result = CompareItems2(lParam1, lParam2, lpData);
|
||||
if(lpData == NULL)
|
||||
return 0;
|
||||
return panel->_ascending ? result: (-result);
|
||||
}
|
||||
|
||||
|
||||
@@ -122,7 +122,7 @@ struct CThreadSplit
|
||||
|
||||
int volIndex = 0;
|
||||
|
||||
while(true)
|
||||
for (;;)
|
||||
{
|
||||
UInt64 volSize;
|
||||
if (volIndex < VolumeSizes.Size())
|
||||
@@ -298,7 +298,7 @@ struct CThreadCombine
|
||||
|
||||
UString nextName = InputDirPrefix + FirstVolumeName;
|
||||
UInt64 totalSize = 0;
|
||||
while (true)
|
||||
for (;;)
|
||||
{
|
||||
NFile::NFind::CFileInfoW fileInfo;
|
||||
if (!NFile::NFind::FindFile(nextName, fileInfo))
|
||||
@@ -337,7 +337,7 @@ struct CThreadCombine
|
||||
UInt64 pos = 0;
|
||||
nextName = InputDirPrefix + FirstVolumeName;
|
||||
bool needOpen = true;
|
||||
while(true)
|
||||
for (;;)
|
||||
{
|
||||
if (needOpen)
|
||||
{
|
||||
|
||||
@@ -79,10 +79,10 @@ STDMETHODIMP CPhysDriveFolder::GetProperty(UInt32 itemIndex, PROPID propID, PROP
|
||||
return S_OK;
|
||||
}
|
||||
|
||||
STDMETHODIMP CPhysDriveFolder::BindToFolder(UInt32 index, IFolderFolder **resultFolder)
|
||||
STDMETHODIMP CPhysDriveFolder::BindToFolder(UInt32 /* index */, IFolderFolder ** /* resultFolder */)
|
||||
{ return E_NOTIMPL; }
|
||||
|
||||
STDMETHODIMP CPhysDriveFolder::BindToFolder(const wchar_t *name, IFolderFolder **resultFolder)
|
||||
STDMETHODIMP CPhysDriveFolder::BindToFolder(const wchar_t * /* name */, IFolderFolder ** /* resultFolder */)
|
||||
{ return E_NOTIMPL; }
|
||||
|
||||
STDMETHODIMP CPhysDriveFolder::BindToParentFolder(IFolderFolder **resultFolder)
|
||||
@@ -91,7 +91,7 @@ STDMETHODIMP CPhysDriveFolder::BindToParentFolder(IFolderFolder **resultFolder)
|
||||
return S_OK;
|
||||
}
|
||||
|
||||
STDMETHODIMP CPhysDriveFolder::GetName(BSTR *name)
|
||||
STDMETHODIMP CPhysDriveFolder::GetName(BSTR * /* name */)
|
||||
{ return E_NOTIMPL; }
|
||||
|
||||
STDMETHODIMP CPhysDriveFolder::GetNumberOfProperties(UInt32 *numProperties)
|
||||
@@ -144,7 +144,7 @@ STDMETHODIMP CPhysDriveFolder::Clone(IFolderFolder **resultFolder)
|
||||
return S_OK;
|
||||
}
|
||||
|
||||
STDMETHODIMP CPhysDriveFolder::GetItemFullSize(UInt32 index, PROPVARIANT *value, IProgress *progress)
|
||||
STDMETHODIMP CPhysDriveFolder::GetItemFullSize(UInt32 index, PROPVARIANT *value, IProgress * /* progress */)
|
||||
{
|
||||
NCOM::CPropVariant propVariant;
|
||||
if (index >= 1)
|
||||
@@ -156,20 +156,20 @@ STDMETHODIMP CPhysDriveFolder::GetItemFullSize(UInt32 index, PROPVARIANT *value,
|
||||
return result;
|
||||
}
|
||||
|
||||
STDMETHODIMP CPhysDriveFolder::CreateFolder(const wchar_t *name, IProgress *progress)
|
||||
STDMETHODIMP CPhysDriveFolder::CreateFolder(const wchar_t * /* name */, IProgress * /* progress */)
|
||||
{ return E_NOTIMPL; }
|
||||
|
||||
STDMETHODIMP CPhysDriveFolder::CreateFile(const wchar_t *name, IProgress *progress)
|
||||
STDMETHODIMP CPhysDriveFolder::CreateFile(const wchar_t * /* name */, IProgress * /* progress */)
|
||||
{ return E_NOTIMPL; }
|
||||
|
||||
STDMETHODIMP CPhysDriveFolder::Rename(UInt32 index, const wchar_t *newName, IProgress *progress)
|
||||
STDMETHODIMP CPhysDriveFolder::Rename(UInt32 /* index */, const wchar_t * /* newName */, IProgress * /* progress */)
|
||||
{ return E_NOTIMPL; }
|
||||
|
||||
STDMETHODIMP CPhysDriveFolder::Delete(const UInt32 *indices, UInt32 numItems, IProgress *progress)
|
||||
STDMETHODIMP CPhysDriveFolder::Delete(const UInt32 * /* indices */, UInt32 /* numItems */, IProgress * /* progress */)
|
||||
{ return E_NOTIMPL; }
|
||||
|
||||
STDMETHODIMP CPhysDriveFolder::SetProperty(UInt32 index, PROPID propID,
|
||||
const PROPVARIANT *value, IProgress *progress)
|
||||
STDMETHODIMP CPhysDriveFolder::SetProperty(UInt32 index, PROPID /* propID */,
|
||||
const PROPVARIANT * /* value */, IProgress * /* progress */)
|
||||
{
|
||||
if (index >= 1)
|
||||
return E_INVALIDARG;
|
||||
@@ -186,7 +186,7 @@ HRESULT CPhysDriveFolder::GetLength(UInt64 &length) const
|
||||
return S_OK;
|
||||
}
|
||||
|
||||
STDMETHODIMP CPhysDriveFolder::CopyTo(const UInt32 *indices, UInt32 numItems,
|
||||
STDMETHODIMP CPhysDriveFolder::CopyTo(const UInt32 * /* indices */, UInt32 numItems,
|
||||
const wchar_t *path, IFolderOperationsExtractCallback *callback)
|
||||
{
|
||||
if (numItems == 0)
|
||||
@@ -258,17 +258,17 @@ STDMETHODIMP CPhysDriveFolder::CopyTo(const UInt32 *indices, UInt32 numItems,
|
||||
// Move Operations
|
||||
|
||||
STDMETHODIMP CPhysDriveFolder::MoveTo(
|
||||
const UInt32 *indices,
|
||||
UInt32 numItems,
|
||||
const wchar_t *path,
|
||||
IFolderOperationsExtractCallback *callback)
|
||||
const UInt32 * /* indices */,
|
||||
UInt32 /* numItems */,
|
||||
const wchar_t * /* path */,
|
||||
IFolderOperationsExtractCallback * /* callback */)
|
||||
{
|
||||
return E_NOTIMPL;
|
||||
}
|
||||
|
||||
STDMETHODIMP CPhysDriveFolder::CopyFrom(
|
||||
const wchar_t *fromFolderPath,
|
||||
const wchar_t **itemsPaths, UInt32 numItems, IProgress *progress)
|
||||
const wchar_t * /* fromFolderPath */,
|
||||
const wchar_t ** /* itemsPaths */, UInt32 /* numItems */, IProgress * /* progress */)
|
||||
{
|
||||
return E_NOTIMPL;
|
||||
}
|
||||
|
||||
@@ -94,6 +94,7 @@ static bool ReadOption(const TCHAR *value, bool defaultValue)
|
||||
return defaultValue;
|
||||
}
|
||||
|
||||
/*
|
||||
static void SaveLmOption(const TCHAR *value, bool enabled)
|
||||
{
|
||||
CKey key;
|
||||
@@ -112,6 +113,7 @@ static bool ReadLmOption(const TCHAR *value, bool defaultValue)
|
||||
}
|
||||
return defaultValue;
|
||||
}
|
||||
*/
|
||||
|
||||
void SaveShowDots(bool showDots) { SaveOption(kShowDots, showDots); }
|
||||
bool ReadShowDots() { return ReadOption(kShowDots, false); }
|
||||
|
||||
@@ -235,7 +235,7 @@ bool CBenchmarkDialog::OnInit()
|
||||
TCHAR s[40];
|
||||
ConvertUInt64ToString((dictionary >> 20), s);
|
||||
lstrcat(s, kMB);
|
||||
int index = m_Dictionary.AddString(s);
|
||||
int index = (int)m_Dictionary.AddString(s);
|
||||
m_Dictionary.SetItemData(index, dictionary);
|
||||
}
|
||||
m_Dictionary.SetCurSel(0);
|
||||
@@ -413,7 +413,7 @@ void CBenchmarkDialog::PrintResults(
|
||||
PrintRating(rating, ratingID);
|
||||
}
|
||||
|
||||
bool CBenchmarkDialog::OnTimer(WPARAM timerID, LPARAM callback)
|
||||
bool CBenchmarkDialog::OnTimer(WPARAM /* timerID */, LPARAM /* callback */)
|
||||
{
|
||||
PrintTime();
|
||||
NWindows::NSynchronization::CCriticalSectionLock lock(_syncInfo.CS);
|
||||
@@ -629,7 +629,7 @@ struct CDecoderProgressInfo:
|
||||
};
|
||||
|
||||
STDMETHODIMP CDecoderProgressInfo::SetRatioInfo(
|
||||
const UInt64 *inSize, const UInt64 *outSize)
|
||||
const UInt64 * /* inSize */, const UInt64 * /* outSize */)
|
||||
{
|
||||
NSynchronization::CCriticalSectionLock lock(SyncInfo->CS);
|
||||
if (SyncInfo->Changed)
|
||||
@@ -647,16 +647,18 @@ struct CThreadBenchmark:
|
||||
NDLL::CLibrary Library;
|
||||
CMyComPtr<ICompressCoder> Encoder;
|
||||
CMyComPtr<ICompressCoder> Decoder;
|
||||
DWORD Process();
|
||||
HRESULT Process();
|
||||
HRESULT Result;
|
||||
static DWORD WINAPI MyThreadFunction(void *param)
|
||||
{
|
||||
return ((CThreadBenchmark *)param)->Process();
|
||||
((CThreadBenchmark *)param)->Result = ((CThreadBenchmark *)param)->Process();
|
||||
return 0;
|
||||
}
|
||||
MY_UNKNOWN_IMP
|
||||
STDMETHOD(SetRatioInfo)(const UInt64 *inSize, const UInt64 *outSize);
|
||||
};
|
||||
|
||||
DWORD CThreadBenchmark::Process()
|
||||
HRESULT CThreadBenchmark::Process()
|
||||
{
|
||||
try
|
||||
{
|
||||
@@ -685,7 +687,7 @@ DWORD CThreadBenchmark::Process()
|
||||
CMyComPtr<ICompressProgressInfo> decoderProgress = decoderProgressInfoSpec;
|
||||
decoderProgressInfoSpec->SyncInfo = SyncInfo;
|
||||
|
||||
while(true)
|
||||
for (;;)
|
||||
{
|
||||
if (SyncInfo->WasStopped())
|
||||
return 0;
|
||||
@@ -760,7 +762,7 @@ DWORD CThreadBenchmark::Process()
|
||||
// this code is for reducing time of memory allocationg
|
||||
inStreamSpec->Init(randomGenerator.Buffer, MyMin((UInt32)1, randomGenerator.BufferSize));
|
||||
outStreamSpec->Init();
|
||||
HRESULT result = Encoder->Code(inStream, outStream, 0, 0, NULL);
|
||||
/* HRESULT result = */ Encoder->Code(inStream, outStream, 0, 0, NULL);
|
||||
}
|
||||
|
||||
inStreamSpec->Init(randomGenerator.Buffer, randomGenerator.BufferSize);
|
||||
@@ -815,7 +817,7 @@ DWORD CThreadBenchmark::Process()
|
||||
if (compressSetDecoderProperties)
|
||||
{
|
||||
RINOK(compressSetDecoderProperties->SetDecoderProperties2(
|
||||
propStreamSpec->GetBuffer(), propStreamSpec->GetSize()));
|
||||
propStreamSpec->GetBuffer(), (UInt32)propStreamSpec->GetSize()));
|
||||
}
|
||||
|
||||
UInt64 outSize = kBufferSize;
|
||||
|
||||
@@ -30,7 +30,7 @@ bool CLangPage::OnInit()
|
||||
s += L" (";
|
||||
s += NWindows::MyLoadStringW(IDS_LANG_NATIVE);
|
||||
s += L")";
|
||||
int index = _langCombo.AddString(s);
|
||||
int index = (int)_langCombo.AddString(s);
|
||||
_langCombo.SetItemData(index, _paths.Size());
|
||||
_paths.Add(L"-");
|
||||
_langCombo.SetCurSel(0);
|
||||
@@ -55,7 +55,7 @@ bool CLangPage::OnInit()
|
||||
name += L")";
|
||||
}
|
||||
}
|
||||
index = _langCombo.AddString(name);
|
||||
index = (int)_langCombo.AddString(name);
|
||||
_langCombo.SetItemData(index, _paths.Size());
|
||||
_paths.Add(lang.ShortName);
|
||||
if (g_LangID.CompareNoCase(lang.ShortName) == 0)
|
||||
@@ -67,7 +67,7 @@ bool CLangPage::OnInit()
|
||||
LONG CLangPage::OnApply()
|
||||
{
|
||||
int selectedIndex = _langCombo.GetCurSel();
|
||||
int pathIndex = _langCombo.GetItemData(selectedIndex);
|
||||
int pathIndex = (int)_langCombo.GetItemData(selectedIndex);
|
||||
SaveRegLang(_paths[pathIndex]);
|
||||
ReloadLang();
|
||||
_langWasChanged = true;
|
||||
|
||||
@@ -45,7 +45,7 @@ bool CListViewDialog::OnInit()
|
||||
return CModalDialog::OnInit();
|
||||
}
|
||||
|
||||
bool CListViewDialog::OnNotify(UINT controlID, LPNMHDR header)
|
||||
bool CListViewDialog::OnNotify(UINT /* controlID */, LPNMHDR header)
|
||||
{
|
||||
if (header->hwndFrom != _listView)
|
||||
return false;
|
||||
@@ -63,7 +63,7 @@ bool CListViewDialog::OnNotify(UINT controlID, LPNMHDR header)
|
||||
int focusedIndex = _listView.GetFocusedItem();
|
||||
if (focusedIndex < 0)
|
||||
focusedIndex = 0;
|
||||
while(true)
|
||||
for (;;)
|
||||
{
|
||||
int index = _listView.GetNextSelectedItem(-1);
|
||||
if (index < 0)
|
||||
|
||||
@@ -82,7 +82,7 @@ void CProgressDialog::SetPos(UINT64 pos)
|
||||
}
|
||||
}
|
||||
|
||||
bool CProgressDialog::OnTimer(WPARAM timerID, LPARAM callback)
|
||||
bool CProgressDialog::OnTimer(WPARAM /* timerID */, LPARAM /* callback */)
|
||||
{
|
||||
if (ProgressSynch.GetPaused())
|
||||
return true;
|
||||
|
||||
@@ -31,7 +31,7 @@ static CIDLangPair kIDLangPairs[] =
|
||||
|
||||
HRESULT CProgressSynch::SetPosAndCheckPaused(UInt64 completed)
|
||||
{
|
||||
while(true)
|
||||
for (;;)
|
||||
{
|
||||
if(GetStopped())
|
||||
return E_ABORT;
|
||||
@@ -114,7 +114,7 @@ void CProgressDialog::OnCancel()
|
||||
static void ConvertSizeToString(UInt64 value, wchar_t *s)
|
||||
{
|
||||
const wchar_t *kModif = L" KMGTP";
|
||||
for (int i = 0; true; i++)
|
||||
for (int i = 0; ; i++)
|
||||
if (i == 5 || value < (UInt64(10000) << (i * 10)))
|
||||
{
|
||||
ConvertUInt64ToString(value >> (i * 10), s);
|
||||
@@ -163,7 +163,7 @@ static void GetTimeString(UInt64 timeValue, TCHAR *s)
|
||||
UInt32(timeValue % 60));
|
||||
}
|
||||
|
||||
bool CProgressDialog::OnTimer(WPARAM timerID, LPARAM callback)
|
||||
bool CProgressDialog::OnTimer(WPARAM /* timerID */, LPARAM /* callback */)
|
||||
{
|
||||
if (ProgressSynch.GetPaused())
|
||||
return true;
|
||||
|
||||
@@ -351,7 +351,7 @@ void CSystemPage::UpdateDatabase()
|
||||
LPARAM param;
|
||||
if (!_listViewExt.GetItemParam(i, param))
|
||||
return;
|
||||
CExtInfoBig &extInfo = _extDatabase.ExtBigItems[param];
|
||||
CExtInfoBig &extInfo = _extDatabase.ExtBigItems[(int)param];
|
||||
extInfo.Associated = _listViewExt.GetCheckState(i);
|
||||
}
|
||||
|
||||
@@ -376,7 +376,7 @@ int CSystemPage::GetSelectedExtIndex()
|
||||
LPARAM param;
|
||||
if (!_listViewExt.GetItemParam(selectedIndex, param))
|
||||
return -1;
|
||||
return param;
|
||||
return (int)param;
|
||||
}
|
||||
|
||||
|
||||
|
||||
@@ -151,7 +151,7 @@ STDMETHODIMP CRootFolder::BindToParentFolder(IFolderFolder **resultFolder)
|
||||
return S_OK;
|
||||
}
|
||||
|
||||
STDMETHODIMP CRootFolder::GetName(BSTR *name)
|
||||
STDMETHODIMP CRootFolder::GetName(BSTR * /* name */)
|
||||
{
|
||||
return E_NOTIMPL;
|
||||
}
|
||||
|
||||
@@ -50,7 +50,7 @@ bool ParseVolumeSizes(const UString &s, CRecordVector<UInt64> &values)
|
||||
return false;
|
||||
values.Add(value);
|
||||
prevIsNumber = true;
|
||||
UString rem = subString.Mid(end - start);
|
||||
UString rem = subString.Mid((int)(end - start));
|
||||
if (!rem.IsEmpty())
|
||||
destStrings.Insert(i + 1, rem);
|
||||
}
|
||||
|
||||
@@ -123,7 +123,7 @@ static int ComparePairItems(const CTextPair &p1, const CTextPair &p2)
|
||||
// typedef void* MY_PVOID;
|
||||
|
||||
// static int ComparePairItems(const MY_PVOID *a1, const MY_PVOID *a2, void *param)
|
||||
static int ComparePairItems(void *const *a1, void *const *a2, void *param)
|
||||
static int ComparePairItems(void *const *a1, void *const *a2, void * /* param */)
|
||||
{ return ComparePairItems(**(const CTextPair **)a1, **(const CTextPair **)a2); }
|
||||
|
||||
void CPairsStorage::Sort()
|
||||
|
||||
@@ -36,7 +36,7 @@ STDMETHODIMP CUpdateCallback100Imp::SetTotal(UINT64 size)
|
||||
|
||||
STDMETHODIMP CUpdateCallback100Imp::SetCompleted(const UINT64 *completeValue)
|
||||
{
|
||||
while(true)
|
||||
for (;;)
|
||||
{
|
||||
if(ProgressDialog.ProgressSynch.GetStopped())
|
||||
return E_ABORT;
|
||||
@@ -55,12 +55,12 @@ STDMETHODIMP CUpdateCallback100Imp::CompressOperation(const wchar_t *name)
|
||||
return S_OK;
|
||||
}
|
||||
|
||||
STDMETHODIMP CUpdateCallback100Imp::DeleteOperation(const wchar_t *name)
|
||||
STDMETHODIMP CUpdateCallback100Imp::DeleteOperation(const wchar_t * /* name */)
|
||||
{
|
||||
return S_OK;
|
||||
}
|
||||
|
||||
STDMETHODIMP CUpdateCallback100Imp::OperationResult(INT32 operationResult)
|
||||
STDMETHODIMP CUpdateCallback100Imp::OperationResult(INT32 /* operationResult */)
|
||||
{
|
||||
return S_OK;
|
||||
}
|
||||
|
||||
@@ -286,7 +286,7 @@ void SaveToolbarsMask(UInt32 toolbarMask)
|
||||
key.SetValue(kToolbars, toolbarMask);
|
||||
}
|
||||
|
||||
static const kDefaultToolbarMask = 8 | 4 | 1;
|
||||
static const UInt32 kDefaultToolbarMask = 8 | 4 | 1;
|
||||
|
||||
UInt32 ReadToolbarsMask()
|
||||
{
|
||||
@@ -360,11 +360,11 @@ void SaveStringList(LPCTSTR valueName, const UStringVector &folders)
|
||||
sizeInChars += folders[i].Length() + 1;
|
||||
CBuffer<wchar_t> buffer;
|
||||
buffer.SetCapacity(sizeInChars);
|
||||
int aPos = 0;
|
||||
int pos = 0;
|
||||
for (i = 0; i < folders.Size(); i++)
|
||||
{
|
||||
wcscpy(buffer + aPos, folders[i]);
|
||||
aPos += folders[i].Length() + 1;
|
||||
MyStringCopy((wchar_t *)buffer + pos, (const wchar_t *)folders[i]);
|
||||
pos += folders[i].Length() + 1;
|
||||
}
|
||||
CKey key;
|
||||
NSynchronization::CCriticalSectionLock lock(g_RegistryOperationsCriticalSection);
|
||||
|
||||
Reference in New Issue
Block a user