This commit is contained in:
Igor Pavlov
2023-12-22 17:17:05 +00:00
committed by Kornel
parent ec44a8a070
commit a36c48cece
954 changed files with 42199 additions and 25482 deletions

View File

@@ -1,7 +1,7 @@
// ProgressDialog.h
#ifndef __PROGRESS_DIALOG_H
#define __PROGRESS_DIALOG_H
#ifndef ZIP7_INC_PROGRESS_DIALOG_H
#define ZIP7_INC_PROGRESS_DIALOG_H
#include "../../../Windows/Synchronization.h"
#include "../../../Windows/Thread.h"
@@ -85,24 +85,27 @@ private:
UInt64 _range;
NWindows::NControl::CProgressBar m_ProgressBar;
int _prevPercentValue;
UInt64 _prevPercentValue;
bool _wasCreated;
bool _needClose;
bool _inCancelMessageBox;
bool _externalCloseMessageWasReceived;
bool OnTimer(WPARAM timerID, LPARAM callback);
virtual bool OnButtonClicked(unsigned buttonID, HWND buttonHWND) Z7_override;
virtual bool OnTimer(WPARAM timerID, LPARAM callback) Z7_override;
virtual bool OnInit() Z7_override;
virtual void OnCancel() Z7_override;
virtual void OnOK() Z7_override;
virtual bool OnMessage(UINT message, WPARAM wParam, LPARAM lParam) Z7_override;
void SetRange(UInt64 range);
void SetPos(UInt64 pos);
virtual bool OnInit();
virtual void OnCancel();
virtual void OnOK();
NWindows::NSynchronization::CManualResetEvent _dialogCreatedEvent;
#ifndef _SFX
#ifndef Z7_SFX
void AddToTitle(LPCWSTR string);
#endif
bool OnButtonClicked(int buttonID, HWND buttonHWND);
void WaitCreating() { _dialogCreatedEvent.Lock(); }
void CheckNeedClose();
@@ -111,7 +114,7 @@ public:
CProgressSync Sync;
int IconID;
#ifndef _SFX
#ifndef Z7_SFX
HWND MainWindow;
UString MainTitle;
UString MainAddTitle;
@@ -119,8 +122,8 @@ public:
#endif
CProgressDialog(): _timer(0)
#ifndef _SFX
,MainWindow(0)
#ifndef Z7_SFX
,MainWindow(NULL)
#endif
{
IconID = -1;
@@ -133,7 +136,7 @@ public:
throw 1334987;
}
INT_PTR Create(const UString &title, NWindows::CThread &thread, HWND wndParent = 0)
INT_PTR Create(const UString &title, NWindows::CThread &thread, HWND wndParent = NULL)
{
_title = title;
INT_PTR res = CModalDialog::Create(IDD_PROGRESS, wndParent);
@@ -146,8 +149,6 @@ public:
kCloseMessage = WM_APP + 1
};
virtual bool OnMessage(UINT message, WPARAM wParam, LPARAM lParam);
void ProcessWasFinished()
{
WaitCreating();
@@ -155,7 +156,7 @@ public:
PostMsg(kCloseMessage);
else
_needClose = true;
};
}
};