Home » U++ Library support » TopWindow&PopUp, TrayIcon » Zip file compression in a TopWindow and building progress bar (adapting the gate in the progressive control structure)
Zip file compression in a TopWindow and building progress bar [message #59295] |
Mon, 12 December 2022 21:03  |
BetoValle
Messages: 204 Registered: September 2020 Location: Brasil Valinhos SP
|
Experienced Member |
|
|
Hi,
How do I build a progress bar control ( ProgressIndicator ) into the "ab" function below? Do you have any suggestions?
I've tried several times, but ide won't accept putting it inside the function!
on first compilation it requires a static control. If I create this control, ide reports an error
(): lld-link: error: undefined symbol: pBack::ti
Thanks!
class pBack : public WithpBackLayout<TopWindow> {
public:
typedef pBack CLASSNAME;
pBack();
~pBack();
void FazBackup();
String salvaRegsNoZipFile()
}
Gate2<int, int> WhenProgress; //tipo definido
int ab(int a,int b){
float f= static_cast<double>(a) / b * 100;
//--> here if i put an ProgressIndicator i can't compile !
return WhenProgress(a,b); //função tem que retornar este tipo
}
String pBack::salvaRegsNoZipFile()
{
FileZip zip(fnZip_);
FindFile fff(rrTP[i].nArquivo);
zip.WriteFile(LoadFile(fff.GetPath()), fff.GetName(),ab );
zip.Finish();
}
void pBack::FazBackup()
{
Thread thr;
thr.Run ( [=]
{
...
salvaRegsNoZipFile();
...
}
}
|
|
|
Goto Forum:
Current Time: Tue May 13 01:33:15 CEST 2025
Total time taken to generate the page: 0.02243 seconds
|