Archive: license page - license display


license page - license display
hello ;)


there are some things I don't like in the display box of my license.rtf ;)


1) the default background should be the white in the next nsis version, it's better (in my opinion)


2) there is a mouse cursor in this page...
I wanted to know if it is possible to disable it
it would be more beautiful


3) I did'nt manage to center some lines (like the title) in the box... is it possible ?
and how ?




thx for your answers, guys ;)


  1. It's never a good idea to enforce just background or foreground color without enforcing the other one. What if the default text color is white too?
  2. Why disable the mouse cursor? How will you be able to click the "I Agree" button?
  3. Open your RTF in Word or Write and center the line. You should do that from the Paragraph menu option.

thx for your answers kichik !


2. no, you didn't understand me ;)
look in the text box of the licence...
there is a flickering cursor... like the cursor when you're writing in a text which shows where you're writing... not this from the mouse... do you understand ? (it's not easy in english :p )


3. the command center does not work in a rtf, just try it ;)


The text cursor is nice to have. You can copy parts of the license with it.

Centering in a RTF works fine for me. See the attached file for an example.


well sorry, it does work with wordpad, not with ms word

thx for your example and the attached file :D

I don't want this text cursor...
do you know any way to deactivate it ?
I couldn't find it with winspy++... :L


I can't think of a way to disable the text cursor.


http://msdn.microsoft.com/library/de.../hidecaret.asp and a bit of system plugin use i think will sort it (don't know 100% though and i can't test myself at the moment)

-daz


this is a bit too hard for me...

if somebody could give me a few explanation :)

thx ;)


Get the HWND of the license text box in the show function of the license page and use:

# assuming $0 holds the HWND
System::Call "user32::HideCaret(i $0)"

waoh thank you for this line of code :)

but I still don't manage to get the hwnd :L

this working script doesn't disable the text cursor :


!include "MUI.nsh"

Name "test page de licence"

OutFile "test.exe"

LicenseBkColor FFFFFF



!define MUI_PAGE_CUSTOMFUNCTION_show "license_show"
!insertmacro MUI_PAGE_LICENSE "gpl.rtf"

!insertmacro MUI_PAGE_INSTFILES


!insertmacro MUI_LANGUAGE "French"

Section
SectionEnd



Function license_show


FindWindow $R0 "#32770" "" $HWNDPARENT
System::Call "user32::HideCaret(i $R0)"


FunctionEnd

You need to use GetDlgItem after FindWindow. FindWindow only finds the inner dialog. The text control is in that inner dialog, so you must use GetDlgItem to get its HWND. Use Resource Hacker on an installer to get the id of the text control. You can also take a look at the source (namely resource.h and Ui.c).


ok ok

thx

I'll have a look at it tomorrow, I'm too tired this evening

but this is nice of you :)
thank you encore une fois :)


this code :


!include "MUI.nsh"

Name "test page de licence"

OutFile "test.exe"

LicenseBkColor FFFFFF



!define MUI_PAGE_CUSTOMFUNCTION_show "license_show"
!insertmacro MUI_PAGE_LICENSE "gpl.rtf"

!insertmacro MUI_PAGE_INSTFILES


!insertmacro MUI_LANGUAGE "French"

Section
SectionEnd



Function license_show



FindWindow $R0 "#32770" "" $HWNDPARENT
GetDlgItem $R1 $R0 1000


System::Call "user32::HideCaret(i $R1)"


FunctionEnd

doesn't work :L

I'm sur the command getdlgitem is good

with winspy++, I found the window containing the text of the licence, and its control id is in decimal "1000"

where am I wrong ?

Verify you've got the right HWND using something like ShowWindow with ${SW_HIDE}. If the text control hides, you can be sure you've got the right HWND. You can also be sure HideCaret doesn't do what you want in this case :(