Error message

Access denied. You may need to login below or register to access this page.

Access Denied / User log in

Please let our ADS show!

This sites offers only FREE software and it's supported by a few advertisement boxes (no intrusive popups).
Please:

  • disable your AdBlocker by adding CoolSoft website to whitelist
  • give the proper cookie consent
  • enable JavaScript for this website

This seconds wait is to let you update your browser configuration...

Ok, I've done the required changes... now show me your content!
!!! Please enable JavaScript !!!

Quick login

Use your existing social account to login without registration: no confirmation mail to wait for, no new password to remember, quick, easy, safe.

...or use your CoolSoft account

Enter your CoolSoft username.
Enter the password that accompanies your username.
Add reply | CoolSoft

Add reply

Please let our ADS show!

This sites offers only FREE software and it's supported by a few advertisement boxes (no intrusive popups).
Please:

  • disable your AdBlocker by adding CoolSoft website to whitelist
  • give the proper cookie consent
  • enable JavaScript for this website

This seconds wait is to let you update your browser configuration...

Ok, I've done the required changes... now show me your content!
!!! Please enable JavaScript !!!
(If you're a human, don't change the following field)
Your first name.
(If you're a human, don't change the following field)
Your first name.

Warning!

You're posting your message as anonymous user.

By registering you'll be allowed to receive notifications of post replies and new threads.
Registration is really quick and only requires you to choose an username and provide a valid email address.

Click here to to register.

A confirmation mail will be sent to this address.
Your email address won't be published.

More information about text formats

Filtered HTML

  • Allowed HTML tags: <a> <blockquote> <br> <cite> <code> <dd> <del> <dl> <dt> <em> <img> <li> <ol> <p> <pre> <s> <span> <strike> <strong> <ul>
    Allowed Style properties: background-color, color, font-size, font-style, height, text-align, text-decoration, text-transform, width
  • You can enable syntax highlighting of source code with the following tags: <code>, <blockcode>, <pre>, <c>, <cpp>, <csharp>, <drupal5>, <drupal6>, <javascript>, <php>. The supported tag styles are: <foo>, [foo].
  • Web page addresses and e-mail addresses turn into links automatically.
  • Lines and paragraphs break automatically.

Plain text

  • No HTML tags allowed.
  • Web page addresses and e-mail addresses turn into links automatically.
  • Lines and paragraphs break automatically.
CAPTCHA
This question is for testing whether or not you are a human visitor and to prevent automated spam submissions.
Cancel
Posts: 1972
Joined: March 25, 2012 - 01:19
You're calling fnc

You're calling fnc_displayerrors_Show, but this function won't return till the dialog is shown (modal).
So your next 2 calls to SendMessage will be too late.

NSISDialogDesigner allows you to only create the dialog, customize it and then show it to the user.
Your function should be like this:

Function DisplayErrors_creator
 
  ${If} giMSI_EXEC_ERRORS != 0
    ${AndIf} $giREGSVR32_ERRORS != 0
        Abort
    ${EndIf}
 
    ; create the dialog and customize it
    Call fnc_displayerrors_Create
    SendMessage $hCtl_displayerrors_txtErrors ${WM_SETTEXT} 0 "STR:Hello!"
    SendMessage $hCtl_displayerrors_txtCount ${WM_SETTEXT} 0 "STR:(2 errors)"
 
    ; dialog show (modal)
    nsDialogs::Show $hCtl_displayerrors
 
FunctionEnd

I suppose your customization is more complex than this and you're not going to add static text to your controls, so I suggest you to take a look at ControlCustomScript property of Textbox control and also to CreateFunctionCustomScript property of dialog.
These properties allows you to customize the generated script as you like (changes appear immediately into script preview): you could move your SendMessage calls over there and clean up your script.

Anonymous user
How to fill content of textbox dynamically

I tried your designer, and generate texbox on custom page. I am able dynamically show or hide custom page, but no content is in textobjects shown.

Can you help me?

Thanks, Mark

Page custom DisplayErrors_creator
 
; handle variables
Var hCtl_displayerrors
Var hCtl_displayerrors_lblInfo
Var hCtl_displayerrors_txtErrors
Var hCtl_displayerrors_txtCount
Var hCtl_displayerrors_Font1
 
; dialog create function
Function fnc_displayerrors_Create
 
  ; custom font definitions
  CreateFont $hCtl_displayerrors_Font1 "Microsoft Sans Serif" "9.75" "400"
 
  ; === displayerrors (type: Dialog) ===
  nsDialogs::Create 1018
  Pop $hCtl_displayerrors
  ${If} $hCtl_displayerrors == error
    Abort
  ${EndIf}
 
  ; === lblInfo (type: Label) ===
  ${NSD_CreateLabel} 8u 13u 148u 11u "During installation was found such errors :"
  Pop $hCtl_displayerrors_lblInfo
  SendMessage $hCtl_displayerrors_lblInfo ${WM_SETFONT} $hCtl_displayerrors_Font1 0
 
  ; === txtErrors (type: TextMultiline) ===
  nsDialogs::CreateControl EDIT ${DEFAULT_STYLES}|${ES_AUTOHSCROLL}|${ES_AUTOVSCROLL}|${ES_MULTILINE}|${ES_WANTRETURN}|${WS_HSCROLL}|${WS_VSCROLL} ${WS_EX_WINDOWEDGE}|${WS_EX_CLIENTEDGE} 8u 26u 280u 95u ""
  Pop $hCtl_displayerrors_txtErrors
  SendMessage $hCtl_displayerrors_txtErrors ${ES_MULTILINE} 0 0
 
  ; === txtCount (type: Text) ===
  ${NSD_CreateText} 160u 13u 127u 11u ""
  Pop $hCtl_displayerrors_txtCount
 
FunctionEnd
 
Function fnc_displayerrors_Show
  Call fnc_displayerrors_Create
  nsDialogs::Show $hCtl_displayerrors
FunctionEnd
 
Function DisplayErrors_creator
; ============================
    ${If} giMSI_EXEC_ERRORS != 0
    ${AndIf} $giREGSVR32_ERRORS != 0
        Abort
    ${EndIf}
 
;
    Call fnc_displayerrors_Show
;
    SendMessage $hCtl_displayerrors_txtErrors ${WM_SETTEXT} 0 "STR:Hello!"
    SendMessage $hCtl_displayerrors_txtCount ${WM_SETTEXT} 0 "STR:(2 errors)"
FunctionEnd