Old 19th October 2005, 20:51   #1
neil.benn
Junior Member
 
Join Date: May 2005
Posts: 8
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
neil.benn is offline   Reply With Quote
Old 20th October 2005, 00:29   #2
iceman_k
NSIS Dev
 
iceman_k's Avatar
 
Join Date: Feb 2003
Location: Boston, MA, U.S.A.
Posts: 455
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.

Cheers,
Iceman_K

EclipseNSIS - An NSIS IDE for the Eclipse Platform | My contributions to the wiki
iceman_k is offline   Reply With Quote
Old 20th October 2005, 10:16   #3
neil.benn
Junior Member
 
Join Date: May 2005
Posts: 8
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
neil.benn is offline   Reply With Quote
Old 20th October 2005, 11:58   #4
Takhir
Major Dude
 
Join Date: Feb 2004
Location: Moscow, Russia
Posts: 1,222
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
Attached Files
File Type: nsi dynlabel.nsi (435 Bytes, 220 views)
Takhir is offline   Reply With Quote
Old 20th October 2005, 15:21   #5
iceman_k
NSIS Dev
 
iceman_k's Avatar
 
Join Date: Feb 2003
Location: Boston, MA, U.S.A.
Posts: 455
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.

Cheers,
Iceman_K

EclipseNSIS - An NSIS IDE for the Eclipse Platform | My contributions to the wiki
iceman_k is offline   Reply With Quote
Reply
Go Back   Winamp & Shoutcast Forums > Developer Center > NSIS Discussion

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump