The license file does not open the hyperlinks!!!
The license.rtf file does not open the hyperlinks....after it gets loaded in the installer ......any idea like wat might b the possible reason.....
23 posts
I'm guessing you mean that your custom page has an extra print and save button, rather than the license page. However, you could modify the actual license page using a resource editor, and then work with those buttons. The ButtonEvent plugin is an older example of doing something like that:Originally Posted by manasi1128 View Postactually the license page is customised to have print and save button also some other additional stuff goes on dat dialog so the the custom dialog feasible here
!addincludedir "."
!addplugindir "."
!include "nsDialogs.nsh"
!include "LogicLib.nsh"
!include "WinMessages.nsh"
!include "LoadRTF.nsh"
OutFile "$%temp%\temp.exe"
Section
SectionEnd
!define /math EM_AUTOURLDETECT ${WM_USER} + 91
!define /math EM_SETEVENTMASK ${WM_USER} + 69
!define /math EM_GETTEXTRANGE ${WM_USER} + 75
!define ENM_LINK 0x04000000
!define EN_LINK 0x070B
Page Custom customPage
Var dialog
Var hwnd
Var null
Var myRichEdit
Function customPage
nsDialogs::Create 1018
Pop $dialog
${If} $dialog == error
Abort
${EndIf}
nsDialogs::CreateControl "RichEdit20A" ${ES_READONLY}|${WS_VISIBLE}|${WS_CHILD}|${WS_TABSTOP}|${WS_VSCROLL}|${ES_MULTILINE}|${ES_WANTRETURN} ${WS_EX_STATICEDGE} 0 0 100% 100% ''
Pop $myRichEdit
/* Automatically turn tect with protocol handlers into links */
SendMessage $myRichEdit ${EM_AUTOURLDETECT} 1 0
/* Make the RichEdit control report events related to links */
SendMessage $myRichEdit ${EM_SETEVENTMASK} 0 ${ENM_LINK}
/* Set up a callback for WM_NOTIFY messages */
${NSD_OnNotify} $myRichEdit myNotify
/* Load an RTF file into the control */
${LoadRTF} "test.rtf" $myRichEdit
nsDialogs::Show
FunctionEnd
Function myNotify
Pop $hwnd /* Calling hwnd - should be our richedit. Check against if you use more than 1 on a page. */
Pop $1 /* The message being sent. There's several (mouse over richedit, mouse over link, etc.). We only care about one. */
Pop $2 /* Data within the message, for later parsing. */
/* We only care about events related to hyperlinks. */
${If} $1 = ${EN_LINK}
/* Get the data */
System::Call "*$2(i.r0, i.r1, i.r2, i.r3, i.r4, i.r5, i.r6, i.r7)"
/* For debugging and such, sets the 3 important message bits in the Branding text area
GetDlgItem $0 $HWNDPARENT 1028
SendMessage $0 ${WM_SETTEXT} 0 "STR:$3|$4|$5" */
${If} $3 = ${WM_LBUTTONUP}
/* Calculate number of characters from End - Start ranges */
IntOp $0 $7 - $6
/* Allocate a buffer for the text. No StrAlloc in the released System plugin... */
System::Call "*(&t$0) i.R0"
/* Create a new TEXTRANGE structure (chrg CHARRANGE, lpstrText LPSTR) */
System::Call "*(i$6, i$7, i$R0) i.r1"
/* Call EM_GETTEXTRANGE */
SendMessage $myRichEdit ${EM_GETTEXTRANGE} 0 $1 $2
/* Get text out of buffer.. */
System::Call "*$R0(&t$0.r2)"
MessageBox MB_OK "Link text: $2"
/* Free memory */
System::Free $1
System::Free $0
${EndIf}
${EndIf}
FunctionEnd Probably still doing a few things wrong, but it seems to work anyway. /* Calculate number of characters from End - Start ranges */
IntOp $0 $7 - $6
/* Allocate a buffer for the text. No StrAlloc in the released System plugin... */
System::Call "*(&t$0) i.R0" new /* Calculate number of characters from End - Start ranges */
IntOp $0 $7 - $6
/* Add one */
IntOp $0 $0 + 1
/* Allocate a buffer for the text. No StrAlloc in the released System plugin... */
System::Call "*(&t$0) i.R0" I... guess you could if you really wanted to. I'm starting to think (once again) that a Browser control would be more appropriate here.. then you can just stick HTML in there with all its inherent goodness.Originally Posted by manasi1128 View Postthe rtf file that i'm loading in the richtext control has table of contents in it......so is it possible to acheive that indexing after loading the file in installer??...as in 'go to Top' etc.....