Old 22nd September 2008, 17:22   #1
nsnb
Senior Member
 
Join Date: Jul 2008
Posts: 157
Question !define MUI_WELCOMEPAGE_TEXT in .onInit ?

I would like to customize the MUI_WELCOMEPAGE_TEXT based on a function that I call in .onInit and which initializes some variables.

Every example that I saw so far, has the
Quote:
!define MUI_WELCOMEPAGE_TEXT
(and any other !define MUI_) appear before .onInit.

I tried ignoring this fact by including such a variable (that is declared before !define MUI_WELCOMEPAGE_TEXT but initialized in .onInit) in the !define MUI_WELCOMEPAGE_TEXT but - not surprisingly, I receive the following compilation warning:
Quote:
unknown variable/constant "{oninit_var}" detected, ignoring (macro:MUI_FUNCTION_WELCOMEPAGE:42
Is it possible at all to customize MUI_WELCOMEPAGE_TEXT with non-static text?

If so, how do I do this?

Thanks!
nsnb is offline   Reply With Quote
Old 22nd September 2008, 17:26   #2
Animaether
Major Dude
 
Join Date: Jun 2001
Posts: 1,173
nope - but you can always use WM_SETTEXT to change the text of the control if you must
Animaether is offline   Reply With Quote
Old 22nd September 2008, 17:28   #3
kichik
M.I.A.
[NSIS Dev, Mod]
 
kichik's Avatar
 
Join Date: Oct 2001
Location: Israel
Posts: 11,343
Simply set it to a variable and set that variable in .onInit.

NSIS FAQ | NSIS Home Page | Donate $
"I hear and I forget. I see and I remember. I do and I understand." -- Confucius
kichik is offline   Reply With Quote
Old 22nd September 2008, 18:00   #4
nsnb
Senior Member
 
Join Date: Jul 2008
Posts: 157
Thank you Animaethe and kichik.

I ended up using the following approach and it works beautifully:
Quote:
Originally posted by kichik
Simply set it to a variable and set that variable in .onInit.
nsnb 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