neil.benn
19th October 2005 21:51 UTC
Dynamically update label text in an InstalOptions Page
Hello,
I'm trying to dynamically update a label in an installoptions page so I can have something similar to the DetailPrint in an install dialog. I can#t force the dialog to redraw by calling abort because that would be a pain. I'm aware of SendMessage but I'm not quite sure how to getthe hwnd of a control using InstallOPtion and a the ModernUI.
Is ther an example of how to do this anywhere?
Cheers,
Neil
iceman_k
20th October 2005 01:29 UTC
You can't change the label while the dialog is visible.
You can only do it before it has been displayed either by modifying the INI file or by getting the HWND between the InstallOptions::initDialog and InstallOptions::show functions and then calling SendMessage to change the label.
A similar problem was discussed in detail some time ago.
Can you explain exactly what you want to do? Maybe there is another solution.
neil.benn
20th October 2005 11:16 UTC
InstallOptions
Hello,
Thanks for the reply. I have a licence page using InsallOptions, it goes through the following steps in the leavefunction of the Page:
* Prompts the user for the licence key and checks to see if it is well formed (ie matches the licence key pattern we have chosen)
* Chcek to see if the handheld is connected to the PC
* Downloads an application to an iPaq
* Excutes the applicaiton on the iPaq
* Retrieves the output of that which contains the processor ID of the handheld
* Reads the local PC file and gets this information into a variable in NSIS
* Deletes those files from the handheld
* Checks for internet connection
* Gets the licence key and procssorID and sends this off to a JSP servlet running somewhere
* Receives a file which is the licence file to be installed on the handheld in the instlal page
If any of these fails, it shows a message bos to the user and calls abort, thereby leaving me on this page until they either fix the problem or click abort. This is working nice but the problem is that the above steps take ~1 minute to process and I have no feedback to the user that something is happening and they may start giving the thing three fingered salutes (this is shipping to scientists who are notorioulsy impatient!!).
So that's it really give them feedback when this is happening to let them know that it hasn;t simply hung.
All help greatly appreciated.
Cheers,
Neil
Takhir
20th October 2005 12:58 UTC
Attached code works on the INSTFILES page, so this may work on InstallOptions as well, finally you can add RedrawWindow call to update label. I saw a lot of samples for text/color manipulations in wiki. But Marquee may be even better ;)
iceman_k
20th October 2005 16:21 UTC
neil.benn:
Actually, what you want to do should be possible using SendMessage and RedrawWindow calls.
IMHO, it would be easier to just use the Banner plugin.
You can update the text in the plugin between operations so that the user knows what is happening.
If something fails, close the plugin, show your MessageBox and Abort and you will still be on the IO page.