|
Hi,
You can find the window handle of the previous instance then when you execute your second instance call the SetWindowPos Function[^] and assign HWND_BOTTOM.
If all of the dialog windows are children/siblings you may want to use the DeferWindowPos Function[^] instead.
Best Wishes,
-David Delaune
|
|
|
|
|
Wouldn't it make more sense to just limit it to a single instance?
"One man's wage rise is another man's price increase." - Harold Wilson
"Fireproof doesn't mean the fire will never come. It means when the fire comes that you will be able to withstand it." - Michael Simmons
"Man who follows car will be exhausted." - Confucius
|
|
|
|
|
In Windows, you can do it using the WIN32API function SetForegroundWindow().
|
|
|
|
|
We need to create better installers for various products. We build professional products in Visual Studio using C++ and MFC, and we need to create installers for installation and upgrading, and for patches, and the installer needs to integrate well with the Fortress/Vault version control so that we can create patches for old releases. Some of our products require third party products to be installed, such as SQL Server/Express. Which are the current recommended products? InstallShield is the one I know. Any other professional grade products worth looking at? Thanks.
|
|
|
|
|
I know InnoSetup[^]. Never usede it myself but it is apparently very good.
|
|
|
|
|
|
Well I tried both the setups. The learning curve is long for them. If you want a quick solution then I will suggest InstallJammer. I like it.
http://installjammer.com/[^]
|
|
|
|
|
I strongly recommend Inno Setup[^]. It offers nice support for both simple, conventional installations (copy files, set registry values, register COM servers, etc.) and highly custom install tasks. It includes built-in scripting support, and you can easily call functions in external DLL's from script.
You mentioned SQL Server Express. I have an installer that loads SQL Server Express and its prerequisites (Windows Installer 3.1, MSXML 6, and .NET 2.0), creates an initial data base, and so on. I use Microsoft's redistributables in each case, and it takes about a dozen lines of script to install the whole mess.
The only disadvantage with Inno Setup, if you want to look at it that way, is that it does not create a Windows Installer MSI package. Enterprise users like MSI because it support installs pushed to client machines over a corporate network. My applications don't require this support, so it's a non-issue for me.
My experience with InstallShield has been poor. Before we went with Inno Setup, we bought a copy of InstallShield, which supposedly included support for localized installers. We spent just under $1,000 for this package. It took me two weeks to get a basic installer working, and at that it didn't reliably install our device drivers. I spent a significant portion of my time manually editing the MSI tables to fix bugs in InstallShield's crap. I then started looking at localizing the installer. It turns out the package we purchased required additional 'language packs' at $500 each to support translated installs. This was the last straw, as I needed a completed, working install, translated into several languages, Like Right Now. Based on a recommendation I saw here on CP, I tried Inno Setup. I replaced my InstallShield installer with an Inno Setup-based one in a single day.
|
|
|
|
|
When installing Inno however, McAffee detects and removes a trojan.. making it unusable.
|
|
|
|
|
Then either McAfee is wrong (most likely; they're crap), or you obtained Inno Setup from a corrupted source.
|
|
|
|
|
Thanks for the informative post.
We may need to run SQL Express scripts, and we will need to force the user to configure some control panel applets, then reboot the system. I'll see if Inno Setup can handle these tasks.
|
|
|
|
|
Thanks for the replies. It looks like we are restricted to these ones, as the rest do not have required features:
1. Install Shield
2. Tarma Software Installer
3. Advanced Installer
4. Inno Setup
5. InstallAnywhere
6. InstallAware
It's now a case of ticking off the required features. Integration with source code control seems to reduce the list down to Install Shield, though it remains unclear what integration means in this context.
|
|
|
|
|
In case anyone is interested, we have pretty much reached a conclusion after evaluating numerous installers. My brief impressions follow:
Inno Setup: Restricted features.
Tarma Installer: Unable to create merge modules. Nice interface, and cheap.
Install Shield: Feature rich but expensive.
WiX: Complex, and not easy to learn, but very powerful and flexible. And free.
InstallAware: Claims to be powerful, but the unprofessional feel scared us away, and it looks to be developed by one person who engages in online slanging matches with critics. It appears to b a copy of Install Shield by an ex-IS employee.
There are other products, but they all lacked essential features such as custom dialogs, or creation of merge modules.
I am fairly sure we will go with WiX. Commercial install products such as Tarma and InstallShield are easier to use for simple projects, but anything more complex is no easier than WiX.
|
|
|
|
|
Can any body tell What is the best approach by which I can capture the URL change event in IE and Firefox. I read about API hook. Is it the best approach or any other alternative is there.Thanks in advance
Regards
Rajmohan
|
|
|
|
|
I would think a Browser Helper Object (BHO) would be a more suitable choice.
"One man's wage rise is another man's price increase." - Harold Wilson
"Fireproof doesn't mean the fire will never come. It means when the fire comes that you will be able to withstand it." - Michael Simmons
"Man who follows car will be exhausted." - Confucius
|
|
|
|
|
I think it is a good way,I hope you can do it and show the source code to us
|
|
|
|
|
As David said, it is best to write a browser extension so that you capture such events.
But using this approach, each browser will need a different extension.
A Browser Helper Object (BHO) will only work for IE.
Firefox uses an XML/Javascript/XPCom based extension.
Other browsers may be different.
|
|
|
|
|
Thank you so much for your replies. I will try this and let you know
Regards
Rajmohan
|
|
|
|
|
Rajmohan SK wrote: Can any body tell What is the best approach by which I can capture the URL change event in IE and Firefox. I read about API hook. Is it the best approach or any other alternative is there.Thanks in advance
Regards
Mozilla has his own API, which can easily used by any programmer.. but mind it, it's pretty difficult to register with FireFox client, until and unless user want to install in.
In case of BHO, it can be intalled without user permission.
"Opinions are neither right nor wrong. I cannot change your opinion. I can, however, change what influences your opinion." - David Crow Never mind - my own stupidity is the source of every "problem" - Mixture
cheers,
Alok Gupta
VC Forum Q&A :- I/ IV
Support CRY- Child Relief and You
|
|
|
|
|
Hi
I am looking for work from projects for developing any engineering software CAD/CAM/CAE/FEA/CFD, I am an expert in CC++, VC++,MFC,OPENGL,QT,QWT...in CAD/CAM/CAE/CFD atc... if anyone interested please call me @919900839788
|
|
|
|
|
This board is for asking questions on C/C++/MFC. If you want to search and apply for jobs, look at the jobs board or use one of those job search sites.
“Follow your bliss.” – Joseph Campbell
|
|
|
|
|
Rajesh R Subramanian wrote: This board is for asking questions on C/C++/MFC. If you want to search and apply for jobs, look at the jobs board or use one of those job search sites.
Buddy, I think he is despretly looking for job, thats why posting on every place he find
"Opinions are neither right nor wrong. I cannot change your opinion. I can, however, change what influences your opinion." - David Crow Never mind - my own stupidity is the source of every "problem" - Mixture
cheers,
Alok Gupta
VC Forum Q&A :- I/ IV
Support CRY- Child Relief and You
|
|
|
|
|
Hi all!
C++, WinAPI
Is there any way to catch when process is being terminated (i.e. terminated by user from Task Manager, or ended in normal case) and do some code there.
In other words I need to execute some code, in any cases when program is ending execution.
Thanks
|
|
|
|
|
You can of course first register the standard C function atexit, but this will only get called on normal program termination. Otherwise register a signal handler and wait for SIGABRT and SIGTERM, just like in UNIX.
http://msdn.microsoft.com/en-us/library/xdkz3x12.aspx[^]
Now I'm not sure HOW the task manager terminates the process, so your mileage may vary...
|
|
|
|
|
Yes, that's what I need, thanks!
|
|
|
|