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 » Extra libraries, Code snippets, applications etc. » U++ users applications in progress and useful code snippets, including reference examples! » Just one instance of application running (SingleApp)
Re: Just one instance of application running (SingleApp) [message #24644 is a reply to message #24603] Tue, 26 January 2010 11:11 Go to previous messageGo to previous message
Sc0rch is currently offline  Sc0rch
Messages: 99
Registered: February 2008
Location: Russia, Rubtsovsk
Member

Eurika, Koldo! Function GetWindowIdFromCaption works only for visible windows! So your variant is better, thanks!

Code is clear, but I think this:
	bool IsSingleApp() {
		return GetWindowIdFromCaption(GetTitle().ToString()) <= 0;
	}

looks a little bit better than:

	bool IsSingleApp() {
		if(GetWindowIdFromCaption(GetTitle().ToString()) > 0) 
			return false;
		return true;
	}

or not? Rolling Eyes

Best regards,
Anton

[Updated on: Tue, 26 January 2010 11:11]

Report message to a moderator

 
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Previous Topic: Port giFT (a great but abandoned P2P project) to U++?
Next Topic: array vs. array's items.id sorting/searching
Goto Forum:
  


Current Time: Sun May 05 10:48:24 CEST 2024

Total time taken to generate the page: 0.01905 seconds