mirror of
https://github.com/Xevion/easy7zip.git
synced 2025-12-10 14:07:11 -06:00
4.20
This commit is contained in:
committed by
Kornel Lesiński
parent
8c1b5c7b7e
commit
3c510ba80b
@@ -16,11 +16,8 @@ static CIDLangPair kIDLangPairs[] =
|
||||
};
|
||||
|
||||
static LPCTSTR kHomePageURL = TEXT("http://www.7-zip.org/");
|
||||
// static LPCTSTR kRegisterRegNowURL = TEXT("https://secure.shareit.com/shareit/checkout.html?PRODUCT[104808]=1&languageid=1");
|
||||
static LPCTSTR kRegisterRegNowURL = TEXT("https://www.regnow.com/softsell/nph-softsell.cgi?item=2521-1&vreferrer=program");
|
||||
|
||||
static LPCTSTR kEmailAction =
|
||||
TEXT("mailto:support@7-zip.org?subject=7-Zip");
|
||||
static LPCTSTR kRegisterPageURL = TEXT("http://www.7-zip.org/register.html");
|
||||
static LPCTSTR kSupportPageURL = TEXT("http://www.7-zip.org/support.html");
|
||||
|
||||
static LPCWSTR kHelpTopic = L"start.htm";
|
||||
|
||||
@@ -36,27 +33,26 @@ void CAboutDialog::OnHelp()
|
||||
ShowHelpWindow(NULL, kHelpTopic);
|
||||
}
|
||||
|
||||
static void MyShellExecute(LPCTSTR url)
|
||||
{
|
||||
::ShellExecute(NULL, NULL, url, NULL, NULL, SW_SHOWNORMAL);
|
||||
}
|
||||
|
||||
bool CAboutDialog::OnButtonClicked(int buttonID, HWND buttonHWND)
|
||||
{
|
||||
switch(buttonID)
|
||||
{
|
||||
case IDC_ABOUT_BUTTON_HOMEPAGE:
|
||||
::ShellExecute(NULL, NULL, kHomePageURL, NULL, NULL, SW_SHOWNORMAL);
|
||||
::MyShellExecute(kHomePageURL);
|
||||
break;
|
||||
case IDC_ABOUT_BUTTON_REGISTER:
|
||||
{
|
||||
LPCTSTR registerURL = kRegisterRegNowURL;
|
||||
/*
|
||||
LCID aLCID = ::GetUserDefaultLCID();
|
||||
if (aLCID == 0x0419 || aLCID == 0x422 || aLCID == 0x0423)
|
||||
registerURL = TEXT("http://www.7-zip.org/ru/donate.html");
|
||||
*/
|
||||
::ShellExecute(NULL, NULL, registerURL, NULL, NULL, SW_SHOWNORMAL);
|
||||
::MyShellExecute(kRegisterPageURL);
|
||||
break;
|
||||
}
|
||||
case IDC_ABOUT_BUTTON_EMAIL:
|
||||
{
|
||||
::ShellExecute(NULL, NULL, kEmailAction, NULL, NULL, SW_SHOWNORMAL);
|
||||
::MyShellExecute(kSupportPageURL);
|
||||
break;
|
||||
}
|
||||
default:
|
||||
|
||||
@@ -1,7 +1,5 @@
|
||||
// AboutDialog.h
|
||||
|
||||
#pragma once
|
||||
|
||||
#ifndef __ABOUTDIALOG_H
|
||||
#define __ABOUTDIALOG_H
|
||||
|
||||
|
||||
@@ -80,13 +80,13 @@ FONT 8, "MS Shell Dlg"
|
||||
BEGIN
|
||||
PUSHBUTTON "OK",IDOK,180,151,50,14
|
||||
PUSHBUTTON "www.7-zip.org",IDC_ABOUT_BUTTON_HOMEPAGE,136,7,94,14
|
||||
PUSHBUTTON "support@7-zip.org",IDC_ABOUT_BUTTON_EMAIL,136,30,94,14
|
||||
PUSHBUTTON "Support",IDC_ABOUT_BUTTON_EMAIL,136,30,94,14
|
||||
PUSHBUTTON "Register",IDC_ABOUT_BUTTON_REGISTER,136,53,94,14
|
||||
ICON IDI_LOGO,IDC_STATIC,7,7,20,20,SS_REALSIZEIMAGE
|
||||
LTEXT "7-Zip 3.13",IDC_STATIC,7,54,119,9
|
||||
LTEXT "Copyright (c) 1999-2003 Igor Pavlov",IDC_STATIC,7,67,
|
||||
LTEXT "7-Zip 4.20",IDC_STATIC,7,54,119,9
|
||||
LTEXT "Copyright (c) 1999-2005 Igor Pavlov",IDC_STATIC,7,67,
|
||||
119,17
|
||||
LTEXT "7-Zip is free software. However, you can support development of 7-Zip by registering. As registered user, you will be able to get technical support.",
|
||||
LTEXT "7-Zip is free software. However, you can support development of 7-Zip by registering.",
|
||||
IDC_ABOUT_STATIC_REGISTER_INFO,7,91,223,54
|
||||
END
|
||||
|
||||
|
||||
@@ -24,8 +24,8 @@ static LPCWSTR kHelpTopic = L"fm/benchmark.htm";
|
||||
static const UINT_PTR kTimerID = 4;
|
||||
static const UINT kTimerElapse = 1000;
|
||||
|
||||
static const UINT32 kAdditionalSize = (6 << 20);
|
||||
static const UINT32 kCompressedAdditionalSize = (1 << 10);
|
||||
static const UInt32 kAdditionalSize = (6 << 20);
|
||||
static const UInt32 kCompressedAdditionalSize = (1 << 10);
|
||||
static const int kSubBits = 8;
|
||||
|
||||
#ifdef LANG
|
||||
@@ -65,7 +65,7 @@ static void MyMessageBoxError(HWND hwnd, LPCWSTR message)
|
||||
MessageBoxW(hwnd, message, L"7-Zip", MB_ICONERROR);
|
||||
}
|
||||
|
||||
UINT64 GetTimeCount()
|
||||
UInt64 GetTimeCount()
|
||||
{
|
||||
return GetTickCount();
|
||||
/*
|
||||
@@ -76,7 +76,7 @@ UINT64 GetTimeCount()
|
||||
*/
|
||||
}
|
||||
|
||||
UINT64 GetFreq()
|
||||
UInt64 GetFreq()
|
||||
{
|
||||
return 1000;
|
||||
/*
|
||||
@@ -89,12 +89,12 @@ UINT64 GetFreq()
|
||||
|
||||
class CRandomGenerator
|
||||
{
|
||||
UINT32 A1;
|
||||
UINT32 A2;
|
||||
UInt32 A1;
|
||||
UInt32 A2;
|
||||
public:
|
||||
CRandomGenerator() { Init(); }
|
||||
void Init() { A1 = 362436069; A2 = 521288629;}
|
||||
UINT32 GetRnd()
|
||||
UInt32 GetRnd()
|
||||
{
|
||||
return
|
||||
((A1 = 36969 * (A1 & 0xffff) + (A1 >> 16)) << 16) ^
|
||||
@@ -105,7 +105,7 @@ public:
|
||||
class CBitRandomGenerator
|
||||
{
|
||||
CRandomGenerator RG;
|
||||
UINT32 Value;
|
||||
UInt32 Value;
|
||||
int NumBits;
|
||||
public:
|
||||
void Init()
|
||||
@@ -113,17 +113,17 @@ public:
|
||||
Value = 0;
|
||||
NumBits = 0;
|
||||
}
|
||||
UINT32 GetRnd(int numBits)
|
||||
UInt32 GetRnd(int numBits)
|
||||
{
|
||||
if (NumBits > numBits)
|
||||
{
|
||||
UINT32 result = Value & ((1 << numBits) - 1);
|
||||
UInt32 result = Value & ((1 << numBits) - 1);
|
||||
Value >>= numBits;
|
||||
NumBits -= numBits;
|
||||
return result;
|
||||
}
|
||||
numBits -= NumBits;
|
||||
UINT32 result = (Value << numBits);
|
||||
UInt32 result = (Value << numBits);
|
||||
Value = RG.GetRnd();
|
||||
result |= Value & ((1 << numBits) - 1);
|
||||
Value >>= numBits;
|
||||
@@ -135,41 +135,41 @@ public:
|
||||
class CBenchRandomGenerator
|
||||
{
|
||||
CBitRandomGenerator RG;
|
||||
UINT32 Pos;
|
||||
UInt32 Pos;
|
||||
public:
|
||||
UINT32 BufferSize;
|
||||
BYTE *Buffer;
|
||||
UInt32 BufferSize;
|
||||
Byte *Buffer;
|
||||
CBenchRandomGenerator(): Buffer(0) {}
|
||||
~CBenchRandomGenerator() { delete []Buffer; }
|
||||
void Init() { RG.Init(); }
|
||||
void Set(UINT32 bufferSize)
|
||||
void Set(UInt32 bufferSize)
|
||||
{
|
||||
delete []Buffer;
|
||||
Buffer = 0;
|
||||
Buffer = new BYTE[bufferSize];
|
||||
Buffer = new Byte[bufferSize];
|
||||
Pos = 0;
|
||||
BufferSize = bufferSize;
|
||||
}
|
||||
UINT32 GetRndBit() { return RG.GetRnd(1); }
|
||||
UInt32 GetRndBit() { return RG.GetRnd(1); }
|
||||
/*
|
||||
UINT32 GetLogRand(int maxLen)
|
||||
UInt32 GetLogRand(int maxLen)
|
||||
{
|
||||
UINT32 len = GetRnd() % (maxLen + 1);
|
||||
UInt32 len = GetRnd() % (maxLen + 1);
|
||||
return GetRnd() & ((1 << len) - 1);
|
||||
}
|
||||
*/
|
||||
UINT32 GetLogRandBits(int numBits)
|
||||
UInt32 GetLogRandBits(int numBits)
|
||||
{
|
||||
UINT32 len = RG.GetRnd(numBits);
|
||||
UInt32 len = RG.GetRnd(numBits);
|
||||
return RG.GetRnd(len);
|
||||
}
|
||||
UINT32 GetOffset()
|
||||
UInt32 GetOffset()
|
||||
{
|
||||
if (GetRndBit() == 0)
|
||||
return GetLogRandBits(4);
|
||||
return (GetLogRandBits(4) << 10) | RG.GetRnd(10);
|
||||
}
|
||||
UINT32 GetLen()
|
||||
UInt32 GetLen()
|
||||
{
|
||||
if (GetRndBit() == 0)
|
||||
return RG.GetRnd(2);
|
||||
@@ -182,15 +182,15 @@ public:
|
||||
while(Pos < BufferSize)
|
||||
{
|
||||
if (GetRndBit() == 0 || Pos < 1)
|
||||
Buffer[Pos++] = BYTE(RG.GetRnd(8));
|
||||
Buffer[Pos++] = Byte(RG.GetRnd(8));
|
||||
else
|
||||
{
|
||||
UINT32 offset = GetOffset();
|
||||
UInt32 offset = GetOffset();
|
||||
while (offset >= Pos)
|
||||
offset >>= 1;
|
||||
offset += 1;
|
||||
UINT32 len = 2 + GetLen();
|
||||
for (UINT32 i = 0; i < len && Pos < BufferSize; i++, Pos++)
|
||||
UInt32 len = 2 + GetLen();
|
||||
for (UInt32 i = 0; i < len && Pos < BufferSize; i++, Pos++)
|
||||
Buffer[Pos] = Buffer[Pos - offset];
|
||||
}
|
||||
}
|
||||
@@ -213,9 +213,9 @@ bool CBenchmarkDialog::OnInit()
|
||||
for (int i = kNumBenchDictionaryBitsStart; i < 28; i++)
|
||||
for (int j = 0; j < 2; j++)
|
||||
{
|
||||
UINT32 dictionary = (1 << i) + (j << (i - 1));
|
||||
UInt32 dictionary = (1 << i) + (j << (i - 1));
|
||||
TCHAR s[40];
|
||||
ConvertUINT64ToString((dictionary >> 20), s);
|
||||
ConvertUInt64ToString((dictionary >> 20), s);
|
||||
lstrcat(s, kMB);
|
||||
int index = m_Dictionary.AddString(s);
|
||||
m_Dictionary.SetItemData(index, dictionary);
|
||||
@@ -231,24 +231,24 @@ bool CBenchmarkDialog::OnInit()
|
||||
return CModalDialog::OnInit();
|
||||
}
|
||||
|
||||
static UINT64 GetLZMAUsage(UINT32 dictionary)
|
||||
{ return ((UINT64)dictionary * 19 / 2) + (8 << 20); }
|
||||
static UInt64 GetLZMAUsage(UInt32 dictionary)
|
||||
{ return ((UInt64)dictionary * 19 / 2) + (8 << 20); }
|
||||
|
||||
static UINT64 GetMemoryUsage(UINT32 dictionary)
|
||||
static UInt64 GetMemoryUsage(UInt32 dictionary)
|
||||
{
|
||||
const UINT32 kBufferSize = dictionary + kAdditionalSize;
|
||||
const UINT32 kCompressedBufferSize = (kBufferSize / 2) + kCompressedAdditionalSize;
|
||||
const UInt32 kBufferSize = dictionary + kAdditionalSize;
|
||||
const UInt32 kCompressedBufferSize = (kBufferSize / 2) + kCompressedAdditionalSize;
|
||||
return kBufferSize + kCompressedBufferSize +
|
||||
GetLZMAUsage(dictionary) + dictionary + (1 << 20);
|
||||
}
|
||||
|
||||
UINT32 CBenchmarkDialog::OnChangeDictionary()
|
||||
UInt32 CBenchmarkDialog::OnChangeDictionary()
|
||||
{
|
||||
UINT64 dictionary = m_Dictionary.GetItemData(m_Dictionary.GetCurSel());
|
||||
UINT64 memUsage = GetMemoryUsage(dictionary);
|
||||
UInt64 dictionary = m_Dictionary.GetItemData(m_Dictionary.GetCurSel());
|
||||
UInt64 memUsage = GetMemoryUsage(dictionary);
|
||||
memUsage = (memUsage + (1 << 20) - 1) >> 20;
|
||||
TCHAR s[40];
|
||||
ConvertUINT64ToString(memUsage, s);
|
||||
ConvertUInt64ToString(memUsage, s);
|
||||
lstrcat(s, kMB);
|
||||
SetItemText(IDC_BENCHMARK_MEMORY_VALUE, s);
|
||||
return dictionary;
|
||||
@@ -257,7 +257,7 @@ UINT32 CBenchmarkDialog::OnChangeDictionary()
|
||||
void CBenchmarkDialog::OnChangeSettings()
|
||||
{
|
||||
EnableItem(IDC_BUTTON_STOP, true);
|
||||
UINT32 dictionary = OnChangeDictionary();
|
||||
UInt32 dictionary = OnChangeDictionary();
|
||||
SetItemText(IDC_BENCHMARK_COMPRESSING_SPEED, kProcessingString);
|
||||
SetItemText(IDC_BENCHMARK_COMPRESSING_SPEED2, kProcessingString);
|
||||
SetItemText(IDC_BENCHMARK_COMPRESSING_RATING, kProcessingString);
|
||||
@@ -299,83 +299,83 @@ void CBenchmarkDialog::OnCancel()
|
||||
CModalDialog::OnCancel();
|
||||
}
|
||||
|
||||
static void GetTimeString(UINT64 timeValue, TCHAR *s)
|
||||
static void GetTimeString(UInt64 timeValue, TCHAR *s)
|
||||
{
|
||||
wsprintf(s, TEXT("%02d:%02d:%02d"),
|
||||
UINT32(timeValue / 3600),
|
||||
UINT32((timeValue / 60) % 60),
|
||||
UINT32(timeValue % 60));
|
||||
UInt32(timeValue / 3600),
|
||||
UInt32((timeValue / 60) % 60),
|
||||
UInt32(timeValue % 60));
|
||||
}
|
||||
|
||||
void CBenchmarkDialog::PrintTime()
|
||||
{
|
||||
UINT32 curTime = ::GetTickCount();
|
||||
UINT32 elapsedTime = (curTime - _startTime);
|
||||
UINT32 elapsedSec = elapsedTime / 1000;
|
||||
UInt32 curTime = ::GetTickCount();
|
||||
UInt32 elapsedTime = (curTime - _startTime);
|
||||
UInt32 elapsedSec = elapsedTime / 1000;
|
||||
TCHAR s[40];
|
||||
GetTimeString(elapsedSec, s);
|
||||
SetItemText(IDC_BENCHMARK_ELAPSED_VALUE, s);
|
||||
}
|
||||
|
||||
static UINT32 GetLogSize(UINT32 size)
|
||||
static UInt32 GetLogSize(UInt32 size)
|
||||
{
|
||||
for (int i = kSubBits; i < 32; i++)
|
||||
for (UINT32 j = 0; j < (1 << kSubBits); j++)
|
||||
if (size <= (((UINT32)1) << i) + (j << (i - kSubBits)))
|
||||
for (UInt32 j = 0; j < (1 << kSubBits); j++)
|
||||
if (size <= (((UInt32)1) << i) + (j << (i - kSubBits)))
|
||||
return (i << kSubBits) + j;
|
||||
return (32 << kSubBits);
|
||||
}
|
||||
|
||||
static UINT64 GetCompressRating(UINT32 dictionarySize,
|
||||
UINT64 elapsedTime, UINT64 size)
|
||||
static UInt64 GetCompressRating(UInt32 dictionarySize,
|
||||
UInt64 elapsedTime, UInt64 size)
|
||||
{
|
||||
if (elapsedTime == 0)
|
||||
elapsedTime = 1;
|
||||
UINT64 t = GetLogSize(dictionarySize) - (19 << kSubBits);
|
||||
UINT64 numCommandsForOne = 2000 + ((t * t * 68) >> (2 * kSubBits));
|
||||
UINT64 numCommands = (UINT64)(size) * numCommandsForOne;
|
||||
UInt64 t = GetLogSize(dictionarySize) - (19 << kSubBits);
|
||||
UInt64 numCommandsForOne = 2000 + ((t * t * 68) >> (2 * kSubBits));
|
||||
UInt64 numCommands = (UInt64)(size) * numCommandsForOne;
|
||||
return numCommands * GetFreq() / elapsedTime;
|
||||
}
|
||||
|
||||
static UINT64 GetDecompressRating(UINT64 elapsedTime,
|
||||
UINT64 outSize, UINT64 inSize)
|
||||
static UInt64 GetDecompressRating(UInt64 elapsedTime,
|
||||
UInt64 outSize, UInt64 inSize)
|
||||
{
|
||||
if (elapsedTime == 0)
|
||||
elapsedTime = 1;
|
||||
UINT64 numCommands = inSize * 250 + outSize * 20;
|
||||
UInt64 numCommands = inSize * 250 + outSize * 21;
|
||||
return numCommands * GetFreq() / elapsedTime;
|
||||
}
|
||||
|
||||
static UINT64 GetTotalRating(
|
||||
UINT32 dictionarySize,
|
||||
UINT64 elapsedTimeEn, UINT64 sizeEn,
|
||||
UINT64 elapsedTimeDe,
|
||||
UINT64 inSizeDe, UINT64 outSizeDe)
|
||||
static UInt64 GetTotalRating(
|
||||
UInt32 dictionarySize,
|
||||
UInt64 elapsedTimeEn, UInt64 sizeEn,
|
||||
UInt64 elapsedTimeDe,
|
||||
UInt64 inSizeDe, UInt64 outSizeDe)
|
||||
{
|
||||
return (GetCompressRating(dictionarySize, elapsedTimeEn, sizeEn) +
|
||||
GetDecompressRating(elapsedTimeDe, inSizeDe, outSizeDe)) / 2;
|
||||
}
|
||||
|
||||
void CBenchmarkDialog::PrintRating(UINT64 rating, UINT controlID)
|
||||
void CBenchmarkDialog::PrintRating(UInt64 rating, UINT controlID)
|
||||
{
|
||||
TCHAR s[40];
|
||||
ConvertUINT64ToString(rating / 1000000, s);
|
||||
ConvertUInt64ToString(rating / 1000000, s);
|
||||
lstrcat(s, kMIPS);
|
||||
SetItemText(controlID, s);
|
||||
}
|
||||
|
||||
void CBenchmarkDialog::PrintResults(
|
||||
UINT32 dictionarySize,
|
||||
UINT64 elapsedTime,
|
||||
UINT64 size, UINT speedID, UINT ratingID,
|
||||
bool decompressMode, UINT64 secondSize)
|
||||
UInt32 dictionarySize,
|
||||
UInt64 elapsedTime,
|
||||
UInt64 size, UINT speedID, UINT ratingID,
|
||||
bool decompressMode, UInt64 secondSize)
|
||||
{
|
||||
TCHAR s[40];
|
||||
UINT64 speed = size * GetFreq() / elapsedTime;
|
||||
ConvertUINT64ToString(speed / 1024, s);
|
||||
UInt64 speed = size * GetFreq() / elapsedTime;
|
||||
ConvertUInt64ToString(speed / 1024, s);
|
||||
lstrcat(s, kKBs);
|
||||
SetItemText(speedID, s);
|
||||
UINT64 rating;
|
||||
UInt64 rating;
|
||||
if (decompressMode)
|
||||
rating = GetDecompressRating(elapsedTime, size, secondSize);
|
||||
else
|
||||
@@ -389,20 +389,20 @@ bool CBenchmarkDialog::OnTimer(WPARAM timerID, LPARAM callback)
|
||||
NWindows::NSynchronization::CCriticalSectionLock lock(_syncInfo.CS);
|
||||
|
||||
TCHAR s[40];
|
||||
ConvertUINT64ToString((_syncInfo.ProcessedSize >> 20), s);
|
||||
ConvertUInt64ToString((_syncInfo.ProcessedSize >> 20), s);
|
||||
lstrcat(s, kMB);
|
||||
SetItemText(IDC_BENCHMARK_SIZE_VALUE, s);
|
||||
|
||||
ConvertUINT64ToString(_syncInfo.NumPasses, s);
|
||||
ConvertUInt64ToString(_syncInfo.NumPasses, s);
|
||||
SetItemText(IDC_BENCHMARK_PASSES_VALUE, s);
|
||||
|
||||
ConvertUINT64ToString(_syncInfo.NumErrors, s);
|
||||
ConvertUInt64ToString(_syncInfo.NumErrors, s);
|
||||
SetItemText(IDC_BENCHMARK_ERRORS_VALUE, s);
|
||||
|
||||
UINT64 elapsedTime = _syncInfo.CompressingInfoTemp.Time;
|
||||
UInt64 elapsedTime = _syncInfo.CompressingInfoTemp.Time;
|
||||
if (elapsedTime >= 1)
|
||||
{
|
||||
UINT32 dicSizeTemp = (UINT32)MyMax(_syncInfo.ProcessedSize, UINT64(1) << 20);
|
||||
UInt32 dicSizeTemp = (UInt32)MyMax(_syncInfo.ProcessedSize, UInt64(1) << 20);
|
||||
dicSizeTemp = MyMin(dicSizeTemp, _syncInfo.DictionarySize),
|
||||
PrintResults(dicSizeTemp, elapsedTime,
|
||||
_syncInfo.CompressingInfoTemp.InSize,
|
||||
@@ -487,29 +487,29 @@ class CBenchmarkInStream:
|
||||
public ISequentialInStream,
|
||||
public CMyUnknownImp
|
||||
{
|
||||
const BYTE *Data;
|
||||
UINT32 Pos;
|
||||
UINT32 Size;
|
||||
const Byte *Data;
|
||||
UInt32 Pos;
|
||||
UInt32 Size;
|
||||
public:
|
||||
MY_UNKNOWN_IMP
|
||||
void Init(const BYTE *data, UINT32 size)
|
||||
void Init(const Byte *data, UInt32 size)
|
||||
{
|
||||
Data = data;
|
||||
Size = size;
|
||||
Pos = 0;
|
||||
}
|
||||
STDMETHOD(Read)(void *data, UINT32 size, UINT32 *processedSize);
|
||||
STDMETHOD(ReadPart)(void *data, UINT32 size, UINT32 *processedSize);
|
||||
STDMETHOD(Read)(void *data, UInt32 size, UInt32 *processedSize);
|
||||
STDMETHOD(ReadPart)(void *data, UInt32 size, UInt32 *processedSize);
|
||||
};
|
||||
|
||||
STDMETHODIMP CBenchmarkInStream::Read(void *data, UINT32 size, UINT32 *processedSize)
|
||||
STDMETHODIMP CBenchmarkInStream::Read(void *data, UInt32 size, UInt32 *processedSize)
|
||||
{
|
||||
UINT32 remain = Size - Pos;
|
||||
UInt32 remain = Size - Pos;
|
||||
if (size > remain)
|
||||
size = remain;
|
||||
for (UINT32 i = 0; i < size; i++)
|
||||
for (UInt32 i = 0; i < size; i++)
|
||||
{
|
||||
((BYTE *)data)[i] = Data[Pos + i];
|
||||
((Byte *)data)[i] = Data[Pos + i];
|
||||
}
|
||||
Pos += size;
|
||||
if(processedSize != NULL)
|
||||
@@ -517,7 +517,7 @@ STDMETHODIMP CBenchmarkInStream::Read(void *data, UINT32 size, UINT32 *processed
|
||||
return S_OK;
|
||||
}
|
||||
|
||||
STDMETHODIMP CBenchmarkInStream::ReadPart(void *data, UINT32 size, UINT32 *processedSize)
|
||||
STDMETHODIMP CBenchmarkInStream::ReadPart(void *data, UInt32 size, UInt32 *processedSize)
|
||||
{
|
||||
return Read(data, size, processedSize);
|
||||
}
|
||||
@@ -526,30 +526,30 @@ class CBenchmarkOutStream:
|
||||
public ISequentialOutStream,
|
||||
public CMyUnknownImp
|
||||
{
|
||||
UINT32 BufferSize;
|
||||
UInt32 BufferSize;
|
||||
public:
|
||||
UINT32 Pos;
|
||||
BYTE *Buffer;
|
||||
UInt32 Pos;
|
||||
Byte *Buffer;
|
||||
CBenchmarkOutStream(): Buffer(0) {}
|
||||
~CBenchmarkOutStream() { delete []Buffer; }
|
||||
void Init(UINT32 bufferSize)
|
||||
void Init(UInt32 bufferSize)
|
||||
{
|
||||
delete []Buffer;
|
||||
Buffer = 0;
|
||||
Buffer = new BYTE[bufferSize];
|
||||
Buffer = new Byte[bufferSize];
|
||||
Pos = 0;
|
||||
BufferSize = bufferSize;
|
||||
}
|
||||
MY_UNKNOWN_IMP
|
||||
STDMETHOD(Write)(const void *data, UINT32 size, UINT32 *processedSize);
|
||||
STDMETHOD(WritePart)(const void *data, UINT32 size, UINT32 *processedSize);
|
||||
STDMETHOD(Write)(const void *data, UInt32 size, UInt32 *processedSize);
|
||||
STDMETHOD(WritePart)(const void *data, UInt32 size, UInt32 *processedSize);
|
||||
};
|
||||
|
||||
STDMETHODIMP CBenchmarkOutStream::Write(const void *data, UINT32 size, UINT32 *processedSize)
|
||||
STDMETHODIMP CBenchmarkOutStream::Write(const void *data, UInt32 size, UInt32 *processedSize)
|
||||
{
|
||||
UINT32 i;
|
||||
UInt32 i;
|
||||
for (i = 0; i < size && Pos < BufferSize; i++)
|
||||
Buffer[Pos++] = ((const BYTE *)data)[i];
|
||||
Buffer[Pos++] = ((const Byte *)data)[i];
|
||||
if(processedSize != NULL)
|
||||
*processedSize = i;
|
||||
if (i != size)
|
||||
@@ -560,7 +560,7 @@ STDMETHODIMP CBenchmarkOutStream::Write(const void *data, UINT32 size, UINT32 *p
|
||||
return S_OK;
|
||||
}
|
||||
|
||||
STDMETHODIMP CBenchmarkOutStream::WritePart(const void *data, UINT32 size, UINT32 *processedSize)
|
||||
STDMETHODIMP CBenchmarkOutStream::WritePart(const void *data, UInt32 size, UInt32 *processedSize)
|
||||
{
|
||||
return Write(data, size, processedSize);
|
||||
}
|
||||
@@ -573,11 +573,11 @@ public:
|
||||
CCRC CRC;
|
||||
MY_UNKNOWN_IMP
|
||||
void Init() { CRC.Init(); }
|
||||
STDMETHOD(Write)(const void *data, UINT32 size, UINT32 *processedSize);
|
||||
STDMETHOD(WritePart)(const void *data, UINT32 size, UINT32 *processedSize);
|
||||
STDMETHOD(Write)(const void *data, UInt32 size, UInt32 *processedSize);
|
||||
STDMETHOD(WritePart)(const void *data, UInt32 size, UInt32 *processedSize);
|
||||
};
|
||||
|
||||
STDMETHODIMP CCompareOutStream::Write(const void *data, UINT32 size, UINT32 *processedSize)
|
||||
STDMETHODIMP CCompareOutStream::Write(const void *data, UInt32 size, UInt32 *processedSize)
|
||||
{
|
||||
CRC.Update(data, size);
|
||||
if(processedSize != NULL)
|
||||
@@ -585,12 +585,12 @@ STDMETHODIMP CCompareOutStream::Write(const void *data, UINT32 size, UINT32 *pro
|
||||
return S_OK;
|
||||
}
|
||||
|
||||
STDMETHODIMP CCompareOutStream::WritePart(const void *data, UINT32 size, UINT32 *processedSize)
|
||||
STDMETHODIMP CCompareOutStream::WritePart(const void *data, UInt32 size, UInt32 *processedSize)
|
||||
{
|
||||
return Write(data, size, processedSize);
|
||||
}
|
||||
|
||||
typedef UINT32 (WINAPI * CreateObjectPointer)(const GUID *clsID,
|
||||
typedef UInt32 (WINAPI * CreateObjectPointer)(const GUID *clsID,
|
||||
const GUID *interfaceID, void **outObject);
|
||||
|
||||
struct CDecoderProgressInfo:
|
||||
@@ -599,11 +599,11 @@ struct CDecoderProgressInfo:
|
||||
{
|
||||
CProgressSyncInfo *SyncInfo;
|
||||
MY_UNKNOWN_IMP
|
||||
STDMETHOD(SetRatioInfo)(const UINT64 *inSize, const UINT64 *outSize);
|
||||
STDMETHOD(SetRatioInfo)(const UInt64 *inSize, const UInt64 *outSize);
|
||||
};
|
||||
|
||||
STDMETHODIMP CDecoderProgressInfo::SetRatioInfo(
|
||||
const UINT64 *inSize, const UINT64 *outSize)
|
||||
const UInt64 *inSize, const UInt64 *outSize)
|
||||
{
|
||||
NSynchronization::CCriticalSectionLock lock(SyncInfo->CS);
|
||||
if (SyncInfo->Changed)
|
||||
@@ -616,8 +616,8 @@ struct CThreadBenchmark:
|
||||
public CMyUnknownImp
|
||||
{
|
||||
CProgressSyncInfo *SyncInfo;
|
||||
UINT64 _startTime;
|
||||
UINT64 _approvedStart;
|
||||
UInt64 _startTime;
|
||||
UInt64 _approvedStart;
|
||||
NDLL::CLibrary Library;
|
||||
CMyComPtr<ICompressCoder> Encoder;
|
||||
CMyComPtr<ICompressCoder> Decoder;
|
||||
@@ -627,7 +627,7 @@ struct CThreadBenchmark:
|
||||
return ((CThreadBenchmark *)param)->Process();
|
||||
}
|
||||
MY_UNKNOWN_IMP
|
||||
STDMETHOD(SetRatioInfo)(const UINT64 *inSize, const UINT64 *outSize);
|
||||
STDMETHOD(SetRatioInfo)(const UInt64 *inSize, const UInt64 *outSize);
|
||||
};
|
||||
|
||||
DWORD CThreadBenchmark::Process()
|
||||
@@ -640,9 +640,9 @@ DWORD CThreadBenchmark::Process()
|
||||
CMyComPtr<ICompressWriteCoderProperties> writeCoderProperties;
|
||||
Encoder.QueryInterface(IID_ICompressWriteCoderProperties,
|
||||
&writeCoderProperties);
|
||||
CMyComPtr<ICompressSetDecoderProperties> compressSetDecoderProperties;
|
||||
CMyComPtr<ICompressSetDecoderProperties2> compressSetDecoderProperties;
|
||||
Decoder.QueryInterface(
|
||||
IID_ICompressSetDecoderProperties, &compressSetDecoderProperties);
|
||||
IID_ICompressSetDecoderProperties2, &compressSetDecoderProperties);
|
||||
CSequentialOutStreamImp *propStreamSpec = 0;
|
||||
CMyComPtr<ISequentialOutStream> propStream;
|
||||
if (writeCoderProperties != NULL)
|
||||
@@ -655,14 +655,6 @@ DWORD CThreadBenchmark::Process()
|
||||
Encoder.QueryInterface(IID_ICompressSetCoderProperties,
|
||||
&setCoderProperties);
|
||||
|
||||
CBenchmarkInStream *propDecoderStreamSpec = 0;
|
||||
CMyComPtr<ISequentialInStream> propDecoderStream;
|
||||
if (compressSetDecoderProperties)
|
||||
{
|
||||
propDecoderStreamSpec = new CBenchmarkInStream;
|
||||
propDecoderStream = propDecoderStreamSpec;
|
||||
}
|
||||
|
||||
CDecoderProgressInfo *decoderProgressInfoSpec = new
|
||||
CDecoderProgressInfo;
|
||||
CMyComPtr<ICompressProgressInfo> decoderProgress = decoderProgressInfoSpec;
|
||||
@@ -677,7 +669,7 @@ DWORD CThreadBenchmark::Process()
|
||||
Sleep(200);
|
||||
continue;
|
||||
}
|
||||
UINT32 dictionarySize;
|
||||
UInt32 dictionarySize;
|
||||
bool multiThread;
|
||||
{
|
||||
NSynchronization::CCriticalSectionLock lock(SyncInfo->CS);
|
||||
@@ -687,8 +679,8 @@ DWORD CThreadBenchmark::Process()
|
||||
SyncInfo->Init();
|
||||
}
|
||||
|
||||
const UINT32 kBufferSize = dictionarySize + kAdditionalSize;
|
||||
const UINT32 kCompressedBufferSize = (kBufferSize / 2) + kCompressedAdditionalSize;
|
||||
const UInt32 kBufferSize = dictionarySize + kAdditionalSize;
|
||||
const UInt32 kCompressedBufferSize = (kBufferSize / 2) + kCompressedAdditionalSize;
|
||||
|
||||
if (setCoderProperties)
|
||||
{
|
||||
@@ -699,7 +691,7 @@ DWORD CThreadBenchmark::Process()
|
||||
};
|
||||
const int kNumProps = sizeof(propIDs) / sizeof(propIDs[0]);
|
||||
NWindows::NCOM::CPropVariant properties[kNumProps];
|
||||
properties[0] = UINT32(dictionarySize);
|
||||
properties[0] = UInt32(dictionarySize);
|
||||
properties[1] = bool(multiThread);
|
||||
RINOK(setCoderProperties->SetCoderProperties(propIDs,
|
||||
properties, kNumProps));
|
||||
@@ -733,8 +725,8 @@ DWORD CThreadBenchmark::Process()
|
||||
_approvedStart = dictionarySize;
|
||||
_startTime = ::GetTimeCount();
|
||||
HRESULT result = Encoder->Code(inStream, outStream, 0, 0, this);
|
||||
UINT64 tickCount = ::GetTimeCount() - _startTime;
|
||||
UINT32 compressedSize = outStreamSpec->Pos;
|
||||
UInt64 tickCount = ::GetTimeCount() - _startTime;
|
||||
UInt32 compressedSize = outStreamSpec->Pos;
|
||||
{
|
||||
NSynchronization::CCriticalSectionLock lock(SyncInfo->CS);
|
||||
if (result == S_OK)
|
||||
@@ -778,13 +770,12 @@ DWORD CThreadBenchmark::Process()
|
||||
|
||||
if (compressSetDecoderProperties)
|
||||
{
|
||||
propDecoderStreamSpec->Init(
|
||||
propStreamSpec->GetBuffer(), propStreamSpec->GetSize());
|
||||
RINOK(compressSetDecoderProperties->SetDecoderProperties(propDecoderStream));
|
||||
RINOK(compressSetDecoderProperties->SetDecoderProperties2(
|
||||
propStreamSpec->GetBuffer(), propStreamSpec->GetSize()));
|
||||
}
|
||||
|
||||
UINT64 outSize = kBufferSize;
|
||||
UINT64 startTime = ::GetTimeCount();
|
||||
UInt64 outSize = kBufferSize;
|
||||
UInt64 startTime = ::GetTimeCount();
|
||||
result = Decoder->Code(inStream, outCompareStream, 0, &outSize, decoderProgress);
|
||||
tickCount = ::GetTimeCount() - startTime;
|
||||
{
|
||||
@@ -827,7 +818,7 @@ DWORD CThreadBenchmark::Process()
|
||||
}
|
||||
|
||||
STDMETHODIMP CThreadBenchmark::SetRatioInfo(
|
||||
const UINT64 *inSize, const UINT64 *outSize)
|
||||
const UInt64 *inSize, const UInt64 *outSize)
|
||||
{
|
||||
NSynchronization::CCriticalSectionLock lock(SyncInfo->CS);
|
||||
if (SyncInfo->Changed || SyncInfo->WasPaused() || SyncInfo->WasStopped())
|
||||
@@ -838,7 +829,7 @@ STDMETHODIMP CThreadBenchmark::SetRatioInfo(
|
||||
ci.Time = ::GetTimeCount() - _startTime;
|
||||
SyncInfo->ProcessedSize = *inSize;
|
||||
|
||||
UINT64 deltaTime = ci.Time - SyncInfo->CompressingInfoPrev.Time;
|
||||
UInt64 deltaTime = ci.Time - SyncInfo->CompressingInfoPrev.Time;
|
||||
if (deltaTime >= GetFreq())
|
||||
{
|
||||
SyncInfo->CompressingInfoTemp.Time = deltaTime;
|
||||
@@ -859,8 +850,8 @@ static bool GetCoderPath(UString &path)
|
||||
return true;
|
||||
}
|
||||
|
||||
typedef UINT32 (WINAPI *GetMethodPropertyFunc)(
|
||||
UINT32 index, PROPID propID, PROPVARIANT *value);
|
||||
typedef UInt32 (WINAPI *GetMethodPropertyFunc)(
|
||||
UInt32 index, PROPID propID, PROPVARIANT *value);
|
||||
|
||||
static bool LoadCoder(
|
||||
const UString &filePath,
|
||||
|
||||
@@ -1,7 +1,5 @@
|
||||
// BenchmarkDialog.h
|
||||
|
||||
#pragma once
|
||||
|
||||
#ifndef __BENCHMARKDIALOG_H
|
||||
#define __BENCHMARKDIALOG_H
|
||||
|
||||
|
||||
@@ -1,7 +1,5 @@
|
||||
// ComboDialog.h
|
||||
|
||||
#pragma once
|
||||
|
||||
#ifndef __COMBODIALOG_H
|
||||
#define __COMBODIALOG_H
|
||||
|
||||
@@ -20,7 +18,6 @@ public:
|
||||
UString Static;
|
||||
UString Value;
|
||||
CSysStringVector Strings;
|
||||
|
||||
// CComboDialog(): Sorted(false) {};
|
||||
INT_PTR Create(HWND parentWindow = 0)
|
||||
{ return CModalDialog::Create(MAKEINTRESOURCE(IDD_DIALOG_COMBO), parentWindow); }
|
||||
|
||||
@@ -38,15 +38,15 @@ bool CCopyDialog::OnInit()
|
||||
return CModalDialog::OnInit();
|
||||
}
|
||||
|
||||
bool CCopyDialog::OnButtonClicked(int aButtonID, HWND buttonHWND)
|
||||
bool CCopyDialog::OnButtonClicked(int buttonID, HWND buttonHWND)
|
||||
{
|
||||
switch(aButtonID)
|
||||
switch(buttonID)
|
||||
{
|
||||
case IDC_COPY_SET_PATH:
|
||||
OnButtonSetPath();
|
||||
return true;
|
||||
}
|
||||
return CModalDialog::OnButtonClicked(aButtonID, buttonHWND);
|
||||
return CModalDialog::OnButtonClicked(buttonID, buttonHWND);
|
||||
}
|
||||
|
||||
void CCopyDialog::OnButtonSetPath()
|
||||
|
||||
@@ -1,7 +1,5 @@
|
||||
// CopyDialog.h
|
||||
|
||||
#pragma once
|
||||
|
||||
#ifndef __COPYDIALOG_H
|
||||
#define __COPYDIALOG_H
|
||||
|
||||
|
||||
@@ -1,7 +1,5 @@
|
||||
// EditPage.h
|
||||
|
||||
#pragma once
|
||||
|
||||
#ifndef __EDITPAGE_H
|
||||
#define __EDITPAGE_H
|
||||
|
||||
|
||||
@@ -47,12 +47,19 @@ bool CLangPage::OnInit()
|
||||
continue;
|
||||
CLang lang;
|
||||
UString filePath = folderPath + fileInfo.Name;
|
||||
UString shortName;
|
||||
const kExtSize = 4;
|
||||
if (fileInfo.Name.Right(kExtSize) != L".txt")
|
||||
continue;
|
||||
shortName = fileInfo.Name.Left(fileInfo.Name.Length() - kExtSize);
|
||||
if (lang.Open(GetSystemString(filePath)))
|
||||
{
|
||||
UString name;
|
||||
UString englishName, nationalName;
|
||||
if (lang.GetMessage(0x00000000, englishName))
|
||||
name += englishName;
|
||||
name = englishName;
|
||||
else
|
||||
name = shortName;
|
||||
if (lang.GetMessage(0x00000001, nationalName))
|
||||
{
|
||||
if (!nationalName.IsEmpty())
|
||||
@@ -62,12 +69,11 @@ bool CLangPage::OnInit()
|
||||
name += L")";
|
||||
}
|
||||
}
|
||||
if (name.IsEmpty())
|
||||
name = fileInfo.Name;
|
||||
index = _langCombo.AddString(GetSystemString(name));
|
||||
_langCombo.SetItemData(index, _paths.Size());
|
||||
_paths.Add(GetSystemString(filePath));
|
||||
if (g_LangPath.CollateNoCase(GetSystemString(filePath)) == 0)
|
||||
_paths.Add(GetSystemString(shortName));
|
||||
if (g_LangID.CollateNoCase(GetSystemString(shortName)) == 0 ||
|
||||
g_LangID.CollateNoCase(GetSystemString(filePath)) == 0)
|
||||
_langCombo.SetCurSel(index);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -1,7 +1,5 @@
|
||||
// LangPage.h
|
||||
|
||||
#pragma once
|
||||
|
||||
#ifndef __LANGPAGE_H
|
||||
#define __LANGPAGE_H
|
||||
|
||||
|
||||
@@ -1,7 +1,5 @@
|
||||
// ListViewDialog.h
|
||||
|
||||
#pragma once
|
||||
|
||||
#ifndef __LISTVIEWDIALOG_H
|
||||
#define __LISTVIEWDIALOG_H
|
||||
|
||||
|
||||
@@ -4,8 +4,6 @@
|
||||
#include "MessagesDialog.h"
|
||||
#include "Windows/ResourceString.h"
|
||||
|
||||
// #include "../resource.h"
|
||||
|
||||
#ifdef LANG
|
||||
#include "../../LangUtils.h"
|
||||
#endif
|
||||
@@ -19,7 +17,7 @@ static CIDLangPair kIDLangPairs[] =
|
||||
};
|
||||
#endif
|
||||
|
||||
void CMessagesDialog::AddMessage(LPCTSTR aMessage)
|
||||
void CMessagesDialog::AddMessageDirect(LPCTSTR message)
|
||||
{
|
||||
int itemIndex = _messageList.GetItemCount();
|
||||
LVITEM item;
|
||||
@@ -36,11 +34,25 @@ void CMessagesDialog::AddMessage(LPCTSTR aMessage)
|
||||
_messageList.InsertItem(&item);
|
||||
|
||||
item.mask = LVIF_TEXT;
|
||||
item.pszText = (LPTSTR)aMessage;
|
||||
item.pszText = (LPTSTR)message;
|
||||
item.iSubItem = 1;
|
||||
_messageList.SetItem(&item);
|
||||
}
|
||||
|
||||
void CMessagesDialog::AddMessage(LPCTSTR message)
|
||||
{
|
||||
CSysString s = message;
|
||||
while (!s.IsEmpty())
|
||||
{
|
||||
int pos = s.Find(TEXT('\n'));
|
||||
if (pos < 0)
|
||||
break;
|
||||
AddMessageDirect(s.Left(pos));
|
||||
s.Delete(0, pos + 1);
|
||||
}
|
||||
AddMessageDirect(s);
|
||||
}
|
||||
|
||||
bool CMessagesDialog::OnInit()
|
||||
{
|
||||
#ifdef LANG
|
||||
@@ -73,8 +85,8 @@ bool CMessagesDialog::OnInit()
|
||||
|
||||
_messageList.InsertColumn(1, &columnInfo);
|
||||
|
||||
for(int i = 0; i < _messages->Size(); i++)
|
||||
AddMessage((*_messages)[i]);
|
||||
for(int i = 0; i < Messages->Size(); i++)
|
||||
AddMessage((*Messages)[i]);
|
||||
|
||||
/*
|
||||
if(_messageList.GetItemCount() > 0)
|
||||
|
||||
@@ -1,7 +1,5 @@
|
||||
// MessagesDialog.h
|
||||
|
||||
#pragma once
|
||||
|
||||
#ifndef __MESSAGESDIALOG_H
|
||||
#define __MESSAGESDIALOG_H
|
||||
|
||||
@@ -13,10 +11,11 @@
|
||||
class CMessagesDialog: public NWindows::NControl::CModalDialog
|
||||
{
|
||||
NWindows::NControl::CListView _messageList;
|
||||
void AddMessage(LPCTSTR string);
|
||||
void AddMessageDirect(LPCTSTR message);
|
||||
void AddMessage(LPCTSTR message);
|
||||
virtual bool OnInit();
|
||||
public:
|
||||
const CSysStringVector *_messages;
|
||||
const CSysStringVector *Messages;
|
||||
INT_PTR Create(HWND parentWindow = 0)
|
||||
{ return CModalDialog::Create(MAKEINTRESOURCE(IDD_DIALOG_MESSAGES), parentWindow); }
|
||||
};
|
||||
|
||||
@@ -3,7 +3,7 @@
|
||||
// Used by resource.rc
|
||||
//
|
||||
|
||||
#define IDS_MESSAGES_DIALOG_MESSAGE_COLUMN 11
|
||||
#define IDS_MESSAGES_DIALOG_MESSAGE_COLUMN 503
|
||||
|
||||
#define IDD_DIALOG_MESSAGES 503
|
||||
|
||||
@@ -14,7 +14,7 @@
|
||||
//
|
||||
#ifdef APSTUDIO_INVOKED
|
||||
#ifndef APSTUDIO_READONLY_SYMBOLS
|
||||
#define _APS_NEXT_RESOURCE_VALUE 157
|
||||
#define _APS_NEXT_RESOURCE_VALUE 657
|
||||
#define _APS_NEXT_COMMAND_VALUE 40001
|
||||
#define _APS_NEXT_CONTROL_VALUE 1002
|
||||
#define _APS_NEXT_SYMED_VALUE 101
|
||||
|
||||
@@ -84,7 +84,6 @@ END
|
||||
#ifdef APSTUDIO_INVOKED
|
||||
GUIDELINES DESIGNINFO DISCARDABLE
|
||||
BEGIN
|
||||
|
||||
IDD_DIALOG_MESSAGES, DIALOG
|
||||
BEGIN
|
||||
LEFTMARGIN, 7
|
||||
@@ -92,8 +91,9 @@ BEGIN
|
||||
TOPMARGIN, 7
|
||||
BOTTOMMARGIN, 128
|
||||
END
|
||||
|
||||
END
|
||||
#endif // APSTUDIO_INVOKED
|
||||
|
||||
|
||||
/////////////////////////////////////////////////////////////////////////////
|
||||
//
|
||||
@@ -105,9 +105,6 @@ BEGIN
|
||||
IDS_MESSAGES_DIALOG_MESSAGE_COLUMN "Message"
|
||||
END
|
||||
|
||||
|
||||
#endif // APSTUDIO_INVOKED
|
||||
|
||||
#endif // English (U.S.) resources
|
||||
/////////////////////////////////////////////////////////////////////////////
|
||||
|
||||
|
||||
@@ -67,7 +67,7 @@ void COverwriteDialog::SetFileInfoControl(int textID, int iconID,
|
||||
FILETIME localFileTime;
|
||||
if (!FileTimeToLocalFileTime(&fileInfo.Time, &localFileTime))
|
||||
throw 4190402;
|
||||
timeString = ConvertFileTimeToString2(localFileTime);
|
||||
timeString = ConvertFileTimeToString(localFileTime);
|
||||
|
||||
fullString +=
|
||||
#ifdef LANG
|
||||
|
||||
@@ -1,7 +1,5 @@
|
||||
// OverwriteDialog.h
|
||||
|
||||
#pragma once
|
||||
|
||||
#ifndef __OVERWRITEDIALOG_H
|
||||
#define __OVERWRITEDIALOG_H
|
||||
|
||||
|
||||
@@ -24,7 +24,7 @@ bool CPasswordDialog::OnInit()
|
||||
LangSetDlgItemsText(HWND(*this), kIDLangPairs, sizeof(kIDLangPairs) / sizeof(kIDLangPairs[0]));
|
||||
#endif
|
||||
_passwordControl.Attach(GetItem(IDC_EDIT_PASSWORD));
|
||||
_passwordControl.SetText(_password);
|
||||
_passwordControl.SetText(Password);
|
||||
_passwordControl.SetPasswordChar(TEXT('*'));
|
||||
return CModalDialog::OnInit();
|
||||
}
|
||||
@@ -45,6 +45,6 @@ bool CPasswordDialog::OnButtonClicked(int buttonID, HWND buttonHWND)
|
||||
|
||||
void CPasswordDialog::OnOK()
|
||||
{
|
||||
_passwordControl.GetText(_password);
|
||||
_passwordControl.GetText(Password);
|
||||
CModalDialog::OnOK();
|
||||
}
|
||||
|
||||
@@ -1,7 +1,5 @@
|
||||
// PasswordDialog.h
|
||||
|
||||
#pragma once
|
||||
|
||||
#ifndef __PASSWORDDIALOG_H
|
||||
#define __PASSWORDDIALOG_H
|
||||
|
||||
@@ -16,7 +14,7 @@ class CPasswordDialog: public NWindows::NControl::CModalDialog
|
||||
virtual bool OnInit();
|
||||
virtual bool OnButtonClicked(int buttonID, HWND buttonHWND);
|
||||
public:
|
||||
CSysString _password;
|
||||
UString Password;
|
||||
INT_PTR Create(HWND parentWindow = 0)
|
||||
{ return CModalDialog::Create(MAKEINTRESOURCE(IDD_DIALOG_PASSWORD), parentWindow); }
|
||||
};
|
||||
|
||||
@@ -1,7 +1,5 @@
|
||||
// PluginsPage.h
|
||||
|
||||
#pragma once
|
||||
|
||||
#include "Windows/Control/ListView.h"
|
||||
|
||||
#ifndef __PLUGINSPAGE_H
|
||||
|
||||
@@ -61,7 +61,7 @@ void CProgressDialog::OnCancel()
|
||||
void CProgressDialog::SetRange(UINT64 range)
|
||||
{
|
||||
_range = range;
|
||||
_peviousPos = _UI64_MAX;
|
||||
_peviousPos = (UInt64)(Int64)-1;
|
||||
_converter.Init(range);
|
||||
m_ProgressBar.SetRange32(0 , _converter.Count(range)); // Test it for 100%
|
||||
}
|
||||
@@ -99,7 +99,7 @@ bool CProgressDialog::OnTimer(WPARAM timerID, LPARAM callback)
|
||||
if (percentValue != _prevPercentValue)
|
||||
{
|
||||
wchar_t s[64];
|
||||
ConvertUINT64ToString(percentValue, s);
|
||||
ConvertUInt64ToString(percentValue, s);
|
||||
UString title = s;
|
||||
title += L"% ";
|
||||
SetText(title + _title);
|
||||
|
||||
@@ -1,7 +1,5 @@
|
||||
// ProgressDialog.h
|
||||
|
||||
#pragma once
|
||||
|
||||
#ifndef __PROGRESSDIALOG_H
|
||||
#define __PROGRESSDIALOG_H
|
||||
|
||||
|
||||
@@ -29,6 +29,20 @@ static CIDLangPair kIDLangPairs[] =
|
||||
};
|
||||
#endif
|
||||
|
||||
HRESULT CProgressSynch::SetPosAndCheckPaused(UInt64 completed)
|
||||
{
|
||||
while(true)
|
||||
{
|
||||
if(GetStopped())
|
||||
return E_ABORT;
|
||||
if(!GetPaused())
|
||||
break;
|
||||
::Sleep(100);
|
||||
}
|
||||
SetPos(completed);
|
||||
return S_OK;
|
||||
}
|
||||
|
||||
#ifndef _SFX
|
||||
CProgressDialog::~CProgressDialog()
|
||||
{
|
||||
@@ -42,17 +56,26 @@ void CProgressDialog::AddToTitle(LPCWSTR s)
|
||||
window.SetText(s + UString(MainTitle));
|
||||
}
|
||||
}
|
||||
|
||||
static const int kTitleFileNameSizeLimit = 36;
|
||||
static const int kCurrentFileNameSizeLimit = 68;
|
||||
|
||||
static void ReduceString(UString &s, int size)
|
||||
{
|
||||
if (s.Length() > size)
|
||||
s = s.Left(size / 2) + UString(L" ... ") + s.Right(size / 2);
|
||||
}
|
||||
#endif
|
||||
|
||||
bool CProgressDialog::OnInit()
|
||||
{
|
||||
_range = UINT64(-1);
|
||||
_prevPercentValue = UINT32(-1);
|
||||
_prevElapsedSec = UINT32(-1);
|
||||
_prevRemainingSec = UINT32(-1);
|
||||
_prevSpeed = UINT32(-1);
|
||||
_range = UInt64(-1);
|
||||
_prevPercentValue = UInt32(-1);
|
||||
_prevElapsedSec = UInt32(-1);
|
||||
_prevRemainingSec = UInt32(-1);
|
||||
_prevSpeed = UInt32(-1);
|
||||
_prevMode = kSpeedBytes;
|
||||
_pevTime = ::GetTickCount();
|
||||
_prevTime = ::GetTickCount();
|
||||
_elapsedTime = 0;
|
||||
_foreground = true;
|
||||
|
||||
@@ -88,35 +111,35 @@ void CProgressDialog::OnCancel()
|
||||
ProgressSynch.SetStopped(true);
|
||||
}
|
||||
|
||||
static void ConvertSizeToString(UINT64 value, wchar_t *s)
|
||||
static void ConvertSizeToString(UInt64 value, wchar_t *s)
|
||||
{
|
||||
if (value < (UINT64(10000) << 0))
|
||||
if (value < (UInt64(10000) << 0))
|
||||
{
|
||||
ConvertUINT64ToString(value, s);
|
||||
ConvertUInt64ToString(value, s);
|
||||
lstrcatW(s, L" B");
|
||||
return;
|
||||
}
|
||||
if (value < (UINT64(10000) << 10))
|
||||
if (value < (UInt64(10000) << 10))
|
||||
{
|
||||
ConvertUINT64ToString((value >> 10), s);
|
||||
ConvertUInt64ToString((value >> 10), s);
|
||||
lstrcatW(s, L" KB");
|
||||
return;
|
||||
}
|
||||
if (value < (UINT64(10000) << 20))
|
||||
if (value < (UInt64(10000) << 20))
|
||||
{
|
||||
ConvertUINT64ToString((value >> 20), s);
|
||||
ConvertUInt64ToString((value >> 20), s);
|
||||
lstrcatW(s, L" MB");
|
||||
return;
|
||||
}
|
||||
ConvertUINT64ToString((value >> 30), s);
|
||||
ConvertUInt64ToString((value >> 30), s);
|
||||
lstrcatW(s, L" GB");
|
||||
return;
|
||||
}
|
||||
|
||||
void CProgressDialog::SetRange(UINT64 range)
|
||||
void CProgressDialog::SetRange(UInt64 range)
|
||||
{
|
||||
_range = range;
|
||||
_previousPos = _UI64_MAX;
|
||||
_previousPos = (UInt64)(Int64)-1;
|
||||
_converter.Init(range);
|
||||
m_ProgressBar.SetRange32(0 , _converter.Count(range)); // Test it for 100%
|
||||
|
||||
@@ -125,7 +148,7 @@ void CProgressDialog::SetRange(UINT64 range)
|
||||
SetItemText(IDC_PROGRESS_SPEED_TOTAL_VALUE, s);
|
||||
}
|
||||
|
||||
void CProgressDialog::SetPos(UINT64 pos)
|
||||
void CProgressDialog::SetPos(UInt64 pos)
|
||||
{
|
||||
bool redraw = true;
|
||||
if (pos < _range && pos > _previousPos)
|
||||
@@ -140,31 +163,31 @@ void CProgressDialog::SetPos(UINT64 pos)
|
||||
}
|
||||
}
|
||||
|
||||
static void GetTimeString(UINT64 timeValue, TCHAR *s)
|
||||
static void GetTimeString(UInt64 timeValue, TCHAR *s)
|
||||
{
|
||||
wsprintf(s, TEXT("%02d:%02d:%02d"),
|
||||
UINT32(timeValue / 3600),
|
||||
UINT32((timeValue / 60) % 60),
|
||||
UINT32(timeValue % 60));
|
||||
UInt32(timeValue / 3600),
|
||||
UInt32((timeValue / 60) % 60),
|
||||
UInt32(timeValue % 60));
|
||||
}
|
||||
|
||||
bool CProgressDialog::OnTimer(WPARAM timerID, LPARAM callback)
|
||||
{
|
||||
if (ProgressSynch.GetPaused())
|
||||
return true;
|
||||
UINT64 total, completed;
|
||||
UInt64 total, completed;
|
||||
ProgressSynch.GetProgress(total, completed);
|
||||
|
||||
UINT32 curTime = ::GetTickCount();
|
||||
UInt32 curTime = ::GetTickCount();
|
||||
|
||||
if (total != _range)
|
||||
SetRange(total);
|
||||
SetPos(completed);
|
||||
|
||||
_elapsedTime += (curTime - _pevTime);
|
||||
_pevTime = curTime;
|
||||
_elapsedTime += (curTime - _prevTime);
|
||||
_prevTime = curTime;
|
||||
|
||||
UINT32 elapsedSec = _elapsedTime / 1000;
|
||||
UInt32 elapsedSec = _elapsedTime / 1000;
|
||||
|
||||
bool elapsedChanged = false;
|
||||
if (elapsedSec != _prevElapsedSec)
|
||||
@@ -178,10 +201,10 @@ bool CProgressDialog::OnTimer(WPARAM timerID, LPARAM callback)
|
||||
|
||||
if (completed != 0 && elapsedChanged)
|
||||
{
|
||||
UINT64 remainingTime = 0;
|
||||
UInt64 remainingTime = 0;
|
||||
if (completed < total)
|
||||
remainingTime = _elapsedTime * (total - completed) / completed;
|
||||
UINT64 remainingSec = remainingTime / 1000;
|
||||
UInt64 remainingSec = remainingTime / 1000;
|
||||
if (remainingSec != _prevRemainingSec)
|
||||
{
|
||||
TCHAR s[40];
|
||||
@@ -191,17 +214,17 @@ bool CProgressDialog::OnTimer(WPARAM timerID, LPARAM callback)
|
||||
}
|
||||
// if (elapsedChanged)
|
||||
{
|
||||
UINT64 speedB = (completed * 1000) / _elapsedTime;
|
||||
UINT64 speedKB = speedB / 1024;
|
||||
UINT64 speedMB = speedKB / 1024;
|
||||
const UINT32 kLimit1 = 10;
|
||||
UInt64 speedB = (completed * 1000) / _elapsedTime;
|
||||
UInt64 speedKB = speedB / 1024;
|
||||
UInt64 speedMB = speedKB / 1024;
|
||||
const UInt32 kLimit1 = 10;
|
||||
TCHAR s[40];
|
||||
bool needRedraw = false;
|
||||
if (speedMB >= kLimit1)
|
||||
{
|
||||
if (_prevMode != kSpeedMBytes || speedMB != _prevSpeed)
|
||||
{
|
||||
ConvertUINT64ToString(speedMB, s);
|
||||
ConvertUInt64ToString(speedMB, s);
|
||||
lstrcat(s, TEXT(" MB/s"));
|
||||
_prevMode = kSpeedMBytes;
|
||||
_prevSpeed = speedMB;
|
||||
@@ -212,7 +235,7 @@ bool CProgressDialog::OnTimer(WPARAM timerID, LPARAM callback)
|
||||
{
|
||||
if (_prevMode != kSpeedKBytes || speedKB != _prevSpeed)
|
||||
{
|
||||
ConvertUINT64ToString(speedKB, s);
|
||||
ConvertUInt64ToString(speedKB, s);
|
||||
lstrcat(s, TEXT(" KB/s"));
|
||||
_prevMode = kSpeedKBytes;
|
||||
_prevSpeed = speedKB;
|
||||
@@ -223,7 +246,7 @@ bool CProgressDialog::OnTimer(WPARAM timerID, LPARAM callback)
|
||||
{
|
||||
if (_prevMode != kSpeedBytes || speedB != _prevSpeed)
|
||||
{
|
||||
ConvertUINT64ToString(speedB, s);
|
||||
ConvertUInt64ToString(speedB, s);
|
||||
lstrcat(s, TEXT(" B/s"));
|
||||
_prevMode = kSpeedBytes;
|
||||
_prevSpeed = speedB;
|
||||
@@ -237,24 +260,24 @@ bool CProgressDialog::OnTimer(WPARAM timerID, LPARAM callback)
|
||||
|
||||
if (total == 0)
|
||||
total = 1;
|
||||
UINT32 percentValue = (UINT32)(completed * 100 / total);
|
||||
if (percentValue != _prevPercentValue)
|
||||
UInt32 percentValue = (UInt32)(completed * 100 / total);
|
||||
UString titleName;
|
||||
ProgressSynch.GetTitleFileName(titleName);
|
||||
if (percentValue != _prevPercentValue || _prevTitleName != titleName)
|
||||
{
|
||||
wchar_t s[64];
|
||||
ConvertUINT64ToString(percentValue, s);
|
||||
UString title = s;
|
||||
title += L"% ";
|
||||
if (!_foreground)
|
||||
{
|
||||
title += backgroundedString;
|
||||
title += L" ";
|
||||
}
|
||||
SetText(title + _title);
|
||||
#ifndef _SFX
|
||||
AddToTitle(title + MainAddTitle);
|
||||
#endif
|
||||
_prevPercentValue = percentValue;
|
||||
SetTitleText();
|
||||
_prevTitleName = titleName;
|
||||
}
|
||||
UString fileName;
|
||||
ProgressSynch.GetCurrentFileName(fileName);
|
||||
if (_prevFileName != fileName)
|
||||
{
|
||||
ReduceString(fileName, kCurrentFileNameSizeLimit);
|
||||
SetItemText(IDC_PROGRESS_FILE_NAME, fileName);
|
||||
_prevFileName == fileName;
|
||||
}
|
||||
|
||||
return true;
|
||||
}
|
||||
|
||||
@@ -262,9 +285,9 @@ bool CProgressDialog::OnTimer(WPARAM timerID, LPARAM callback)
|
||||
////////////////////
|
||||
// CU64ToI32Converter
|
||||
|
||||
static const UINT64 kMaxIntValue = 0x7FFFFFFF;
|
||||
static const UInt64 kMaxIntValue = 0x7FFFFFFF;
|
||||
|
||||
void CU64ToI32Converter::Init(UINT64 range)
|
||||
void CU64ToI32Converter::Init(UInt64 range)
|
||||
{
|
||||
_numShiftBits = 0;
|
||||
while(range > kMaxIntValue)
|
||||
@@ -274,7 +297,7 @@ void CU64ToI32Converter::Init(UINT64 range)
|
||||
}
|
||||
}
|
||||
|
||||
int CU64ToI32Converter::Count(UINT64 aValue)
|
||||
int CU64ToI32Converter::Count(UInt64 aValue)
|
||||
{
|
||||
return int(aValue >> _numShiftBits);
|
||||
}
|
||||
@@ -301,23 +324,54 @@ bool CProgressDialog::OnMessage(UINT message, WPARAM wParam, LPARAM lParam)
|
||||
return CModalDialog::OnMessage(message, wParam, lParam);
|
||||
}
|
||||
|
||||
void CProgressDialog::SetTitleText()
|
||||
{
|
||||
UString title;
|
||||
if (ProgressSynch.GetPaused())
|
||||
{
|
||||
title = pausedString;
|
||||
title += L" ";
|
||||
}
|
||||
wchar_t s[64];
|
||||
ConvertUInt64ToString(_prevPercentValue, s);
|
||||
title += s;
|
||||
title += L"%";
|
||||
if (!_foreground)
|
||||
{
|
||||
title += L" ";
|
||||
title += backgroundedString;
|
||||
}
|
||||
title += L" ";
|
||||
UString totalTitle = title + _title;
|
||||
UString fileName;
|
||||
ProgressSynch.GetTitleFileName(fileName);
|
||||
if (!fileName.IsEmpty())
|
||||
{
|
||||
ReduceString(fileName, kTitleFileNameSizeLimit);
|
||||
totalTitle += L" ";
|
||||
totalTitle += fileName;
|
||||
}
|
||||
SetText(totalTitle);
|
||||
#ifndef _SFX
|
||||
AddToTitle(title + MainAddTitle);
|
||||
#endif
|
||||
}
|
||||
|
||||
void CProgressDialog::SetPauseText()
|
||||
{
|
||||
SetItemText(IDC_BUTTON_PAUSE, ProgressSynch.GetPaused() ?
|
||||
continueString : pauseString);
|
||||
|
||||
SetText(LangLoadStringW(IDS_PROGRESS_PAUSED, 0x02000C20) +
|
||||
UString(L" ") + _title);
|
||||
SetTitleText();
|
||||
}
|
||||
|
||||
void CProgressDialog::OnPauseButton()
|
||||
{
|
||||
bool paused = !ProgressSynch.GetPaused();
|
||||
ProgressSynch.SetPaused(paused);
|
||||
UINT32 curTime = ::GetTickCount();
|
||||
UInt32 curTime = ::GetTickCount();
|
||||
if (paused)
|
||||
_elapsedTime += (curTime - _pevTime);
|
||||
_pevTime = curTime;
|
||||
_elapsedTime += (curTime - _prevTime);
|
||||
_prevTime = curTime;
|
||||
SetPauseText();
|
||||
}
|
||||
|
||||
@@ -326,6 +380,7 @@ void CProgressDialog::SetPriorityText()
|
||||
SetItemText(IDC_BUTTON_PROGRESS_PRIORITY, _foreground ?
|
||||
backgroundString :
|
||||
foregroundString);
|
||||
SetTitleText();
|
||||
}
|
||||
|
||||
void CProgressDialog::OnPriorityButton()
|
||||
|
||||
@@ -1,12 +1,12 @@
|
||||
// ProgressDialog.h
|
||||
|
||||
#pragma once
|
||||
|
||||
#ifndef __PROGRESSDIALOG_H
|
||||
#define __PROGRESSDIALOG_H
|
||||
|
||||
#include "resource.h"
|
||||
|
||||
#include "Common/Types.h"
|
||||
|
||||
#include "Windows/Control/Dialog.h"
|
||||
#include "Windows/Control/ProgressBar.h"
|
||||
#include "Windows/Synchronization.h"
|
||||
@@ -16,8 +16,10 @@ class CProgressSynch
|
||||
NWindows::NSynchronization::CCriticalSection _criticalSection;
|
||||
bool _stopped;
|
||||
bool _paused;
|
||||
UINT64 _total;
|
||||
UINT64 _completed;
|
||||
UInt64 _total;
|
||||
UInt64 _completed;
|
||||
UString TitleFileName;
|
||||
UString CurrentFileName;
|
||||
public:
|
||||
CProgressSynch(): _stopped(false), _paused(false), _total(1), _completed(0) {}
|
||||
|
||||
@@ -41,31 +43,52 @@ public:
|
||||
NWindows::NSynchronization::CCriticalSectionLock lock(_criticalSection);
|
||||
_paused = value;
|
||||
}
|
||||
void SetProgress(UINT64 total, UINT64 completed)
|
||||
void SetProgress(UInt64 total, UInt64 completed)
|
||||
{
|
||||
NWindows::NSynchronization::CCriticalSectionLock lock(_criticalSection);
|
||||
_total = total;
|
||||
_completed = completed;
|
||||
}
|
||||
void SetPos(UINT64 completed)
|
||||
void SetPos(UInt64 completed)
|
||||
{
|
||||
NWindows::NSynchronization::CCriticalSectionLock lock(_criticalSection);
|
||||
_completed = completed;
|
||||
}
|
||||
void GetProgress(UINT64 &total, UINT64 &completed)
|
||||
HRESULT SetPosAndCheckPaused(UInt64 completed);
|
||||
void GetProgress(UInt64 &total, UInt64 &completed)
|
||||
{
|
||||
NWindows::NSynchronization::CCriticalSectionLock lock(_criticalSection);
|
||||
total = _total;
|
||||
completed = _completed;
|
||||
}
|
||||
void SetTitleFileName(const UString &fileName)
|
||||
{
|
||||
NWindows::NSynchronization::CCriticalSectionLock lock(_criticalSection);
|
||||
TitleFileName = fileName;
|
||||
}
|
||||
void GetTitleFileName(UString &fileName)
|
||||
{
|
||||
NWindows::NSynchronization::CCriticalSectionLock lock(_criticalSection);
|
||||
fileName = TitleFileName;
|
||||
}
|
||||
void SetCurrentFileName(const UString &fileName)
|
||||
{
|
||||
NWindows::NSynchronization::CCriticalSectionLock lock(_criticalSection);
|
||||
CurrentFileName = fileName;
|
||||
}
|
||||
void GetCurrentFileName(UString &fileName)
|
||||
{
|
||||
NWindows::NSynchronization::CCriticalSectionLock lock(_criticalSection);
|
||||
fileName = CurrentFileName;
|
||||
}
|
||||
};
|
||||
|
||||
class CU64ToI32Converter
|
||||
{
|
||||
UINT64 _numShiftBits;
|
||||
UInt64 _numShiftBits;
|
||||
public:
|
||||
void Init(UINT64 _range);
|
||||
int Count(UINT64 aValue);
|
||||
void Init(UInt64 _range);
|
||||
int Count(UInt64 aValue);
|
||||
};
|
||||
|
||||
// class CProgressDialog: public NWindows::NControl::CModelessDialog
|
||||
@@ -79,6 +102,8 @@ enum ESpeedMode
|
||||
|
||||
class CProgressDialog: public NWindows::NControl::CModalDialog
|
||||
{
|
||||
UString _prevFileName;
|
||||
UString _prevTitleName;
|
||||
private:
|
||||
UString backgroundString;
|
||||
UString backgroundedString;
|
||||
@@ -93,23 +118,23 @@ private:
|
||||
|
||||
UString _title;
|
||||
CU64ToI32Converter _converter;
|
||||
UINT64 _previousPos;
|
||||
UINT64 _range;
|
||||
UInt64 _previousPos;
|
||||
UInt64 _range;
|
||||
NWindows::NControl::CProgressBar m_ProgressBar;
|
||||
|
||||
UINT32 _prevPercentValue;
|
||||
UINT32 _pevTime;
|
||||
UINT32 _elapsedTime;
|
||||
UINT32 _prevElapsedSec;
|
||||
UINT64 _prevRemainingSec;
|
||||
UInt32 _prevPercentValue;
|
||||
UInt32 _prevTime;
|
||||
UInt32 _elapsedTime;
|
||||
UInt32 _prevElapsedSec;
|
||||
UInt64 _prevRemainingSec;
|
||||
ESpeedMode _prevMode;
|
||||
UINT64 _prevSpeed;
|
||||
UInt64 _prevSpeed;
|
||||
|
||||
bool _foreground;
|
||||
|
||||
bool OnTimer(WPARAM timerID, LPARAM callback);
|
||||
void SetRange(UINT64 range);
|
||||
void SetPos(UINT64 pos);
|
||||
void SetRange(UInt64 range);
|
||||
void SetPos(UInt64 pos);
|
||||
virtual bool OnInit();
|
||||
virtual void OnCancel();
|
||||
NWindows::NSynchronization::CManualResetEvent _dialogCreatedEvent;
|
||||
@@ -122,6 +147,8 @@ private:
|
||||
void OnPauseButton();
|
||||
void OnPriorityButton();
|
||||
bool OnButtonClicked(int buttonID, HWND buttonHWND);
|
||||
|
||||
void SetTitleText();
|
||||
public:
|
||||
CProgressSynch ProgressSynch;
|
||||
|
||||
@@ -134,7 +161,7 @@ public:
|
||||
|
||||
CProgressDialog(): _timer(0)
|
||||
#ifndef _SFX
|
||||
,MainWindow(0)
|
||||
,MainWindow(0)
|
||||
#endif
|
||||
{}
|
||||
|
||||
@@ -151,10 +178,7 @@ public:
|
||||
|
||||
virtual bool OnMessage(UINT message, WPARAM wParam, LPARAM lParam);
|
||||
|
||||
void MyClose()
|
||||
{
|
||||
PostMessage(kCloseMessage);
|
||||
};
|
||||
void MyClose() { PostMessage(kCloseMessage); };
|
||||
};
|
||||
|
||||
#endif
|
||||
|
||||
@@ -5,6 +5,10 @@
|
||||
#define IDC_BUTTON_PAUSE 3
|
||||
#define IDC_BUTTON_PROGRESS_PRIORITY 4
|
||||
#define IDD_DIALOG_PROGRESS 500
|
||||
#define IDS_PROGRESS_PAUSED 700
|
||||
#define IDS_PROGRESS_FOREGROUND 701
|
||||
#define IDS_PROGRESS_CONTINUE 702
|
||||
#define IDS_PROGRESS_ASK_CANCEL 703
|
||||
#define IDC_PROGRESS1 1000
|
||||
#define IDC_PROGRESS_ELAPSED 1002
|
||||
#define IDC_PROGRESS_ELAPSED_VALUE 1003
|
||||
@@ -14,11 +18,7 @@
|
||||
#define IDC_PROGRESS_SPEED_VALUE 1007
|
||||
#define IDC_PROGRESS_TOTAL 1008
|
||||
#define IDC_PROGRESS_SPEED_TOTAL_VALUE 1009
|
||||
|
||||
#define IDS_PROGRESS_PAUSED 700
|
||||
#define IDS_PROGRESS_FOREGROUND 701
|
||||
#define IDS_PROGRESS_CONTINUE 702
|
||||
#define IDS_PROGRESS_ASK_CANCEL 703
|
||||
#define IDC_PROGRESS_FILE_NAME 1010
|
||||
|
||||
// Next default values for new objects
|
||||
//
|
||||
|
||||
@@ -63,25 +63,26 @@ LANGUAGE LANG_ENGLISH, SUBLANG_ENGLISH_US
|
||||
// Dialog
|
||||
//
|
||||
|
||||
IDD_DIALOG_PROGRESS DIALOG DISCARDABLE 0, 0, 246, 78
|
||||
IDD_DIALOG_PROGRESS DIALOG DISCARDABLE 0, 0, 304, 90
|
||||
STYLE DS_MODALFRAME | DS_FIXEDSYS | DS_CENTER | WS_MINIMIZEBOX | WS_POPUP |
|
||||
WS_CAPTION | WS_SYSMENU
|
||||
CAPTION "Progress"
|
||||
FONT 8, "MS Shell Dlg"
|
||||
BEGIN
|
||||
PUSHBUTTON "&Background",IDC_BUTTON_PROGRESS_PRIORITY,7,57,72,14
|
||||
PUSHBUTTON "&Pause",IDC_BUTTON_PAUSE,92,57,72,14
|
||||
PUSHBUTTON "Cancel",IDCANCEL,175,57,64,14
|
||||
LTEXT "Elapsed time:",IDC_PROGRESS_ELAPSED,7,7,71,8
|
||||
RTEXT "00:00:00",IDC_PROGRESS_ELAPSED_VALUE,78,7,42,8
|
||||
LTEXT "Remaining time:",IDC_PROGRESS_REMAINING,7,18,71,8
|
||||
RTEXT "",IDC_PROGRESS_REMAINING_VALUE,78,18,42,8
|
||||
LTEXT "Size:",IDC_PROGRESS_TOTAL,149,7,48,8
|
||||
RTEXT "",IDC_PROGRESS_SPEED_TOTAL_VALUE,197,7,42,8
|
||||
LTEXT "Speed:",IDC_PROGRESS_SPEED,149,18,48,8
|
||||
RTEXT "",IDC_PROGRESS_SPEED_VALUE,197,18,42,8
|
||||
PUSHBUTTON "&Background",IDC_BUTTON_PROGRESS_PRIORITY,61,69,72,14
|
||||
PUSHBUTTON "&Pause",IDC_BUTTON_PAUSE,143,69,72,14
|
||||
PUSHBUTTON "Cancel",IDCANCEL,225,69,72,14
|
||||
LTEXT "Elapsed time:",IDC_PROGRESS_ELAPSED,7,7,91,8
|
||||
RTEXT "00:00:00",IDC_PROGRESS_ELAPSED_VALUE,98,7,42,8
|
||||
LTEXT "Remaining time:",IDC_PROGRESS_REMAINING,7,18,91,8
|
||||
RTEXT "",IDC_PROGRESS_REMAINING_VALUE,98,18,42,8
|
||||
LTEXT "Size:",IDC_PROGRESS_TOTAL,178,7,77,8
|
||||
RTEXT "",IDC_PROGRESS_SPEED_TOTAL_VALUE,255,7,42,8
|
||||
LTEXT "Speed:",IDC_PROGRESS_SPEED,178,18,77,8
|
||||
RTEXT "",IDC_PROGRESS_SPEED_VALUE,255,18,42,8
|
||||
CONTROL "Progress1",IDC_PROGRESS1,"msctls_progress32",PBS_SMOOTH |
|
||||
WS_BORDER,7,34,232,13
|
||||
WS_BORDER,7,49,290,13
|
||||
LTEXT "",IDC_PROGRESS_FILE_NAME,7,34,290,8
|
||||
END
|
||||
|
||||
|
||||
@@ -96,13 +97,13 @@ BEGIN
|
||||
IDD_DIALOG_PROGRESS, DIALOG
|
||||
BEGIN
|
||||
LEFTMARGIN, 7
|
||||
RIGHTMARGIN, 239
|
||||
VERTGUIDE, 78
|
||||
VERTGUIDE, 120
|
||||
VERTGUIDE, 149
|
||||
VERTGUIDE, 197
|
||||
RIGHTMARGIN, 297
|
||||
VERTGUIDE, 98
|
||||
VERTGUIDE, 140
|
||||
VERTGUIDE, 178
|
||||
VERTGUIDE, 255
|
||||
TOPMARGIN, 7
|
||||
BOTTOMMARGIN, 71
|
||||
BOTTOMMARGIN, 83
|
||||
END
|
||||
END
|
||||
#endif // APSTUDIO_INVOKED
|
||||
|
||||
@@ -28,6 +28,7 @@
|
||||
#define IDS_PROPERTY_GROUP 26
|
||||
#define IDS_PROPERTY_BLOCK 27
|
||||
#define IDS_PROPERTY_COMMENT 28
|
||||
#define IDS_PROPERTY_POSITION 29
|
||||
|
||||
// Next default values for new objects
|
||||
//
|
||||
|
||||
@@ -95,6 +95,7 @@ BEGIN
|
||||
IDS_PROPERTY_GROUP "Group"
|
||||
IDS_PROPERTY_BLOCK "Block"
|
||||
IDS_PROPERTY_COMMENT "Comment"
|
||||
IDS_PROPERTY_POSITION "Position"
|
||||
END
|
||||
|
||||
#endif // English (U.S.) resources
|
||||
|
||||
@@ -19,7 +19,11 @@ static CIDLangPair kIDLangPairs[] =
|
||||
{
|
||||
{ IDC_SETTINGS_SHOW_DOTS, 0x03010401},
|
||||
{ IDC_SETTINGS_SHOW_REAL_FILE_ICONS, 0x03010402},
|
||||
{ IDC_SETTINGS_SHOW_SYSTEM_MENU, 0x03010410}
|
||||
{ IDC_SETTINGS_SHOW_SYSTEM_MENU, 0x03010410},
|
||||
{ IDC_SETTINGS_FULL_ROW, 0x03010420},
|
||||
{ IDC_SETTINGS_SHOW_GRID, 0x03010421}
|
||||
// { IDC_SETTINGS_SINGLE_CLICK, 0x03010422},
|
||||
// { IDC_SETTINGS_UNDERLINE, 0x03010423}
|
||||
};
|
||||
|
||||
static LPCWSTR kEditTopic = L"FM/options.htm#settings";
|
||||
@@ -31,15 +35,36 @@ bool CSettingsPage::OnInit()
|
||||
CheckButton(IDC_SETTINGS_SHOW_DOTS, ReadShowDots());
|
||||
CheckButton(IDC_SETTINGS_SHOW_SYSTEM_MENU, ReadShowSystemMenu());
|
||||
CheckButton(IDC_SETTINGS_SHOW_REAL_FILE_ICONS, ReadShowRealFileIcons());
|
||||
|
||||
CheckButton(IDC_SETTINGS_FULL_ROW, ReadFullRow());
|
||||
CheckButton(IDC_SETTINGS_SHOW_GRID, ReadShowGrid());
|
||||
// CheckButton(IDC_SETTINGS_SINGLE_CLICK, ReadSingleClick());
|
||||
// CheckButton(IDC_SETTINGS_UNDERLINE, ReadUnderline());
|
||||
|
||||
// EnableSubItems();
|
||||
|
||||
return CPropertyPage::OnInit();
|
||||
}
|
||||
|
||||
/*
|
||||
void CSettingsPage::EnableSubItems()
|
||||
{
|
||||
EnableItem(IDC_SETTINGS_UNDERLINE, IsButtonCheckedBool(IDC_SETTINGS_SINGLE_CLICK));
|
||||
}
|
||||
*/
|
||||
|
||||
LONG CSettingsPage::OnApply()
|
||||
{
|
||||
SaveShowDots(IsButtonCheckedBool(IDC_SETTINGS_SHOW_DOTS));
|
||||
SaveShowSystemMenu(IsButtonCheckedBool(IDC_SETTINGS_SHOW_SYSTEM_MENU));
|
||||
SaveShowRealFileIcons(IsButtonCheckedBool(IDC_SETTINGS_SHOW_REAL_FILE_ICONS));
|
||||
|
||||
SaveFullRow(IsButtonCheckedBool(IDC_SETTINGS_FULL_ROW));
|
||||
SaveShowGrid(IsButtonCheckedBool(IDC_SETTINGS_SHOW_GRID));
|
||||
|
||||
// SaveSingleClick(IsButtonCheckedBool(IDC_SETTINGS_SINGLE_CLICK));
|
||||
// SaveUnderline(IsButtonCheckedBool(IDC_SETTINGS_UNDERLINE));
|
||||
|
||||
return PSNRET_NOERROR;
|
||||
}
|
||||
|
||||
@@ -48,21 +73,22 @@ void CSettingsPage::OnNotifyHelp()
|
||||
ShowHelpWindow(NULL, kEditTopic); // change it
|
||||
}
|
||||
|
||||
|
||||
bool CSettingsPage::OnCommand(int code, int itemID, LPARAM param)
|
||||
{
|
||||
if (code == EN_CHANGE &&
|
||||
(
|
||||
itemID == IDC_SETTINGS_SHOW_DOTS ||
|
||||
itemID == IDC_SETTINGS_SHOW_SYSTEM_MENU ||
|
||||
itemID == IDC_SETTINGS_SHOW_REAL_FILE_ICONS
|
||||
)
|
||||
)
|
||||
bool CSettingsPage::OnButtonClicked(int buttonID, HWND buttonHWND)
|
||||
{
|
||||
switch(buttonID)
|
||||
{
|
||||
Changed();
|
||||
return true;
|
||||
/*
|
||||
case IDC_SETTINGS_SINGLE_CLICK:
|
||||
EnableSubItems();
|
||||
break;
|
||||
*/
|
||||
case IDC_SETTINGS_SHOW_DOTS:
|
||||
case IDC_SETTINGS_SHOW_SYSTEM_MENU:
|
||||
case IDC_SETTINGS_SHOW_REAL_FILE_ICONS:
|
||||
case IDC_SETTINGS_FULL_ROW:
|
||||
case IDC_SETTINGS_SHOW_GRID:
|
||||
Changed();
|
||||
return true;
|
||||
}
|
||||
return CPropertyPage::OnCommand(code, itemID, param);
|
||||
return CPropertyPage::OnButtonClicked(buttonID, buttonHWND);
|
||||
}
|
||||
|
||||
|
||||
|
||||
@@ -1,7 +1,5 @@
|
||||
// SettingsPage.h
|
||||
|
||||
#pragma once
|
||||
|
||||
#ifndef __SETTINGSPAGE_H
|
||||
#define __SETTINGSPAGE_H
|
||||
|
||||
@@ -10,10 +8,11 @@
|
||||
|
||||
class CSettingsPage: public NWindows::NControl::CPropertyPage
|
||||
{
|
||||
// void EnableSubItems();
|
||||
bool OnButtonClicked(int buttonID, HWND buttonHWND);
|
||||
public:
|
||||
virtual bool OnInit();
|
||||
virtual void OnNotifyHelp();
|
||||
virtual bool OnCommand(int code, int itemID, LPARAM param);
|
||||
virtual LONG OnApply();
|
||||
};
|
||||
|
||||
|
||||
@@ -2,10 +2,14 @@
|
||||
// Microsoft Developer Studio generated include file.
|
||||
// Used by resource.rc
|
||||
//
|
||||
#define IDD_SETTINGS 904
|
||||
#define IDC_SETTINGS_SHOW_DOTS 1000
|
||||
#define IDD_SETTINGS 904
|
||||
#define IDC_SETTINGS_SHOW_DOTS 1000
|
||||
#define IDC_SETTINGS_SHOW_REAL_FILE_ICONS 1001
|
||||
#define IDC_SETTINGS_SHOW_SYSTEM_MENU 1010
|
||||
#define IDC_SETTINGS_SHOW_SYSTEM_MENU 1010
|
||||
#define IDC_SETTINGS_FULL_ROW 1011
|
||||
#define IDC_SETTINGS_SHOW_GRID 1013
|
||||
#define IDC_SETTINGS_SINGLE_CLICK 1014
|
||||
#define IDC_SETTINGS_UNDERLINE 1015
|
||||
|
||||
// Next default values for new objects
|
||||
//
|
||||
|
||||
@@ -70,10 +70,21 @@ FONT 8, "MS Shell Dlg"
|
||||
BEGIN
|
||||
CONTROL "Show "".."" item",IDC_SETTINGS_SHOW_DOTS,"Button",
|
||||
BS_AUTOCHECKBOX | WS_TABSTOP,7,7,196,10
|
||||
CONTROL "Show real file icons",IDC_SETTINGS_SHOW_REAL_FILE_ICONS,
|
||||
"Button",BS_AUTOCHECKBOX | WS_TABSTOP,7,21,196,10
|
||||
CONTROL "Show system menu",IDC_SETTINGS_SHOW_SYSTEM_MENU,"Button",
|
||||
CONTROL "Show real file &icons",
|
||||
IDC_SETTINGS_SHOW_REAL_FILE_ICONS,"Button",
|
||||
BS_AUTOCHECKBOX | WS_TABSTOP,7,21,196,10
|
||||
CONTROL "Show system &menu",IDC_SETTINGS_SHOW_SYSTEM_MENU,"Button",
|
||||
BS_AUTOCHECKBOX | WS_TABSTOP,7,35,196,10
|
||||
CONTROL "&Full row select",IDC_SETTINGS_FULL_ROW,"Button",
|
||||
BS_AUTOCHECKBOX | WS_TABSTOP,7,63,196,10
|
||||
CONTROL "Show &grid lines",IDC_SETTINGS_SHOW_GRID,"Button",
|
||||
BS_AUTOCHECKBOX | WS_TABSTOP,7,77,196,10
|
||||
CONTROL "&Single-click to open an item",
|
||||
IDC_SETTINGS_SINGLE_CLICK,"Button",BS_AUTOCHECKBOX | NOT
|
||||
WS_VISIBLE | WS_TABSTOP,7,91,196,10
|
||||
CONTROL "&Underline current name",IDC_SETTINGS_UNDERLINE,"Button",
|
||||
BS_AUTOCHECKBOX | NOT WS_VISIBLE | WS_TABSTOP,19,105,184,
|
||||
10
|
||||
END
|
||||
|
||||
|
||||
|
||||
85
7zip/FileManager/Resource/SplitDialog/SplitDialog.cpp
Executable file
85
7zip/FileManager/Resource/SplitDialog/SplitDialog.cpp
Executable file
@@ -0,0 +1,85 @@
|
||||
// SplitDialog.cpp
|
||||
|
||||
#include "StdAfx.h"
|
||||
#include "SplitDialog.h"
|
||||
|
||||
#include "Common/StringToInt.h"
|
||||
#include "Windows/Shell.h"
|
||||
#include "Windows/FileName.h"
|
||||
|
||||
#include "../../SplitUtils.h"
|
||||
#ifdef LANG
|
||||
#include "../../LangUtils.h"
|
||||
#endif
|
||||
|
||||
using namespace NWindows;
|
||||
|
||||
#ifdef LANG
|
||||
static CIDLangPair kIDLangPairs[] =
|
||||
{
|
||||
{ IDC_STATIC_SPLIT_PATH, 0x03020501 },
|
||||
{ IDC_STATIC_SPLIT_VOLUME, 0x02000D40 },
|
||||
};
|
||||
#endif
|
||||
|
||||
|
||||
bool CSplitDialog::OnInit()
|
||||
{
|
||||
#ifdef LANG
|
||||
LangSetWindowText(HWND(*this), 0x03020500);
|
||||
LangSetDlgItemsText(HWND(*this), kIDLangPairs, sizeof(kIDLangPairs) / sizeof(kIDLangPairs[0]));
|
||||
#endif
|
||||
_pathCombo.Attach(GetItem(IDC_COMBO_SPLIT_PATH));
|
||||
_volumeCombo.Attach(GetItem(IDC_COMBO_SPLIT_VOLUME));
|
||||
|
||||
if (!FilePath.IsEmpty())
|
||||
{
|
||||
UString title;
|
||||
GetText(title);
|
||||
title += ' ';
|
||||
title += FilePath;
|
||||
SetText(title);
|
||||
}
|
||||
_pathCombo.SetText(Path);
|
||||
AddVolumeItems(_volumeCombo);
|
||||
_volumeCombo.SetCurSel(0);
|
||||
return CModalDialog::OnInit();
|
||||
}
|
||||
|
||||
bool CSplitDialog::OnButtonClicked(int buttonID, HWND buttonHWND)
|
||||
{
|
||||
switch(buttonID)
|
||||
{
|
||||
case IDC_BUTTON_SPLIT_PATH:
|
||||
OnButtonSetPath();
|
||||
return true;
|
||||
}
|
||||
return CModalDialog::OnButtonClicked(buttonID, buttonHWND);
|
||||
}
|
||||
|
||||
void CSplitDialog::OnButtonSetPath()
|
||||
{
|
||||
CSysString currentPath;
|
||||
_pathCombo.GetText(currentPath);
|
||||
CSysString title = TEXT("Specify a location for output folder");
|
||||
CSysString resultPath;
|
||||
if (!NShell::BrowseForFolder(HWND(*this), title, currentPath, resultPath))
|
||||
return;
|
||||
NFile::NName::NormalizeDirPathPrefix(resultPath);
|
||||
_pathCombo.SetCurSel(-1);
|
||||
_pathCombo.SetText(resultPath);
|
||||
}
|
||||
|
||||
void CSplitDialog::OnOK()
|
||||
{
|
||||
_pathCombo.GetText(Path);
|
||||
UString volumeString;
|
||||
_volumeCombo.GetText(volumeString);
|
||||
volumeString.Trim();
|
||||
if (!ParseVolumeSizes(volumeString, VolumeSizes))
|
||||
{
|
||||
MessageBox((HWND)*this, TEXT("Incorrect volume size"), TEXT("7-Zip"), MB_ICONERROR);
|
||||
return;
|
||||
}
|
||||
CModalDialog::OnOK();
|
||||
}
|
||||
27
7zip/FileManager/Resource/SplitDialog/SplitDialog.h
Executable file
27
7zip/FileManager/Resource/SplitDialog/SplitDialog.h
Executable file
@@ -0,0 +1,27 @@
|
||||
// SplitDialog.h
|
||||
|
||||
#ifndef __SPLITDIALOG_H
|
||||
#define __SPLITDIALOG_H
|
||||
|
||||
#include "Common/Types.h"
|
||||
#include "Windows/Control/Dialog.h"
|
||||
#include "Windows/Control/ComboBox.h"
|
||||
#include "resource.h"
|
||||
|
||||
class CSplitDialog: public NWindows::NControl::CModalDialog
|
||||
{
|
||||
NWindows::NControl::CComboBox _pathCombo;
|
||||
NWindows::NControl::CComboBox _volumeCombo;
|
||||
virtual void OnOK();
|
||||
virtual bool OnInit();
|
||||
virtual bool OnButtonClicked(int buttonID, HWND buttonHWND);
|
||||
void OnButtonSetPath();
|
||||
public:
|
||||
UString FilePath;
|
||||
UString Path;
|
||||
CRecordVector<UInt64> VolumeSizes;
|
||||
INT_PTR Create(HWND parentWindow = 0)
|
||||
{ return CModalDialog::Create(MAKEINTRESOURCE(IDD_DIALOG_SPLIT), parentWindow); }
|
||||
};
|
||||
|
||||
#endif
|
||||
21
7zip/FileManager/Resource/SplitDialog/resource.h
Executable file
21
7zip/FileManager/Resource/SplitDialog/resource.h
Executable file
@@ -0,0 +1,21 @@
|
||||
//{{NO_DEPENDENCIES}}
|
||||
// Microsoft Developer Studio generated include file.
|
||||
// Used by resource.rc
|
||||
//
|
||||
#define IDD_DIALOG_SPLIT 504
|
||||
#define IDC_STATIC_SPLIT_PATH 1000
|
||||
#define IDC_COMBO_SPLIT_PATH 1001
|
||||
#define IDC_BUTTON_SPLIT_PATH 1002
|
||||
#define IDC_STATIC_SPLIT_VOLUME 1010
|
||||
#define IDC_COMBO_SPLIT_VOLUME 1011
|
||||
|
||||
// Next default values for new objects
|
||||
//
|
||||
#ifdef APSTUDIO_INVOKED
|
||||
#ifndef APSTUDIO_READONLY_SYMBOLS
|
||||
#define _APS_NEXT_RESOURCE_VALUE 157
|
||||
#define _APS_NEXT_COMMAND_VALUE 40001
|
||||
#define _APS_NEXT_CONTROL_VALUE 1004
|
||||
#define _APS_NEXT_SYMED_VALUE 101
|
||||
#endif
|
||||
#endif
|
||||
106
7zip/FileManager/Resource/SplitDialog/resource.rc
Executable file
106
7zip/FileManager/Resource/SplitDialog/resource.rc
Executable file
@@ -0,0 +1,106 @@
|
||||
//Microsoft Developer Studio generated resource script.
|
||||
//
|
||||
#include "resource.h"
|
||||
|
||||
#define APSTUDIO_READONLY_SYMBOLS
|
||||
/////////////////////////////////////////////////////////////////////////////
|
||||
//
|
||||
// Generated from the TEXTINCLUDE 2 resource.
|
||||
//
|
||||
#include "afxres.h"
|
||||
|
||||
/////////////////////////////////////////////////////////////////////////////
|
||||
#undef APSTUDIO_READONLY_SYMBOLS
|
||||
|
||||
/////////////////////////////////////////////////////////////////////////////
|
||||
// Russian resources
|
||||
|
||||
#if !defined(AFX_RESOURCE_DLL) || defined(AFX_TARG_RUS)
|
||||
#ifdef _WIN32
|
||||
LANGUAGE LANG_RUSSIAN, SUBLANG_DEFAULT
|
||||
#pragma code_page(1251)
|
||||
#endif //_WIN32
|
||||
|
||||
#ifdef APSTUDIO_INVOKED
|
||||
/////////////////////////////////////////////////////////////////////////////
|
||||
//
|
||||
// TEXTINCLUDE
|
||||
//
|
||||
|
||||
1 TEXTINCLUDE DISCARDABLE
|
||||
BEGIN
|
||||
"resource.h\0"
|
||||
END
|
||||
|
||||
2 TEXTINCLUDE DISCARDABLE
|
||||
BEGIN
|
||||
"#include ""afxres.h""\r\n"
|
||||
"\0"
|
||||
END
|
||||
|
||||
3 TEXTINCLUDE DISCARDABLE
|
||||
BEGIN
|
||||
"\0"
|
||||
END
|
||||
|
||||
#endif // APSTUDIO_INVOKED
|
||||
|
||||
#endif // Russian resources
|
||||
/////////////////////////////////////////////////////////////////////////////
|
||||
|
||||
|
||||
/////////////////////////////////////////////////////////////////////////////
|
||||
// English (U.S.) resources
|
||||
|
||||
#if !defined(AFX_RESOURCE_DLL) || defined(AFX_TARG_ENU)
|
||||
#ifdef _WIN32
|
||||
LANGUAGE LANG_ENGLISH, SUBLANG_ENGLISH_US
|
||||
#pragma code_page(1252)
|
||||
#endif //_WIN32
|
||||
|
||||
/////////////////////////////////////////////////////////////////////////////
|
||||
//
|
||||
// Dialog
|
||||
//
|
||||
|
||||
IDD_DIALOG_SPLIT DIALOG DISCARDABLE 0, 0, 237, 103
|
||||
STYLE DS_MODALFRAME | DS_FIXEDSYS | DS_CENTER | WS_POPUP | WS_CAPTION |
|
||||
WS_SYSMENU
|
||||
CAPTION "Split File"
|
||||
FONT 8, "MS Shell Dlg"
|
||||
BEGIN
|
||||
LTEXT "&Split to:",IDC_STATIC_SPLIT_PATH,7,7,223,8
|
||||
COMBOBOX IDC_COMBO_SPLIT_PATH,7,18,193,126,CBS_DROPDOWN |
|
||||
CBS_AUTOHSCROLL | WS_VSCROLL | WS_TABSTOP
|
||||
PUSHBUTTON "...",IDC_BUTTON_SPLIT_PATH,210,17,20,14,WS_GROUP
|
||||
LTEXT "Split to &volumes, bytes:",IDC_STATIC_SPLIT_VOLUME,7,38,
|
||||
223,8
|
||||
COMBOBOX IDC_COMBO_SPLIT_VOLUME,7,50,120,52,CBS_DROPDOWN |
|
||||
CBS_AUTOHSCROLL | WS_VSCROLL | WS_TABSTOP
|
||||
DEFPUSHBUTTON "OK",IDOK,91,82,64,14
|
||||
PUSHBUTTON "Cancel",IDCANCEL,166,82,64,14
|
||||
END
|
||||
|
||||
|
||||
/////////////////////////////////////////////////////////////////////////////
|
||||
//
|
||||
// DESIGNINFO
|
||||
//
|
||||
|
||||
#ifdef APSTUDIO_INVOKED
|
||||
GUIDELINES DESIGNINFO DISCARDABLE
|
||||
BEGIN
|
||||
IDD_DIALOG_SPLIT, DIALOG
|
||||
BEGIN
|
||||
LEFTMARGIN, 7
|
||||
RIGHTMARGIN, 230
|
||||
TOPMARGIN, 7
|
||||
BOTTOMMARGIN, 96
|
||||
END
|
||||
END
|
||||
#endif // APSTUDIO_INVOKED
|
||||
|
||||
#endif // English (U.S.) resources
|
||||
/////////////////////////////////////////////////////////////////////////////
|
||||
|
||||
|
||||
@@ -1,7 +1,5 @@
|
||||
// SystemPage.h
|
||||
|
||||
#pragma once
|
||||
|
||||
#ifndef __SYSTEMPAGE_H
|
||||
#define __SYSTEMPAGE_H
|
||||
|
||||
|
||||
Reference in New Issue
Block a user