Overview
Examples
Screenshots
Comparisons
Applications
Download
Documentation
Tutorials
Bazaar
Status & Roadmap
FAQ
Authors & License
Forums
Funding Ultimate++
Search on this site
Search in forums












SourceForge.net Logo
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 Go to previous message
BetoValle is currently offline  BetoValle
Messages: 203
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();
			
			...
			
		}
}		
 
Read Message
Read Message
Previous Topic: Multi monitor support
Goto Forum:
  


Current Time: Fri Apr 26 13:37:34 CEST 2024

Total time taken to generate the page: 0.03886 seconds