View Single Post
Old 11th March 2008, 23:20   #16
bradharding
Member
 
Join Date: Sep 2003
Posts: 53
Fixed! It's always something simple that's causing the problem isn't it?

All you have to do is use EM_EXLIMITTEXT to set the size of the rich text control!

code:
; Show the License.
nsDialogs::CreateControl /NOUNLOAD "RichEdit20A" ${WS_VISIBLE}|${WS_CHILD}|${WS_TABSTOP}|${WS_VSCROLL}|${ES_MULTILINE}|\
${ES_WANTRETURN} ${WS_EX_STATICEDGE} 0 15u 100% 80u ""
Pop $CONTROL
File "/oname=$PLUGINSDIR\${GNU_GENERAL_PUBLIC_LICENSE}.rtf" "Resources\${GNU_GENERAL_PUBLIC_LICENSE}.rtf"
System::Call "kernel32::CreateFile(t '$PLUGINSDIR\${GNU_GENERAL_PUBLIC_LICENSE}.rtf', i ${GENERIC_READ}, \
i ${FILE_SHARE_READ}, i 0, i ${OPEN_EXISTING}, i 0, i 0) i .r0"
System::Call "kernel32::GetFileSize(i r0, i 0) i .r1"
IntOp $1 $1 + 1
System::Alloc $1
Pop $2
System::Call "kernel32::ReadFile(i r0, i r2, i r1, *i .r3, i 0)"
System::Call "kernel32::CloseHandle(i r0)"
SendMessage $CONTROL ${EM_EXLIMITTEXT} 0 $1
SendMessage $CONTROL ${WM_SETTEXT} 0 $2
System::Free $2

bradharding is offline   Reply With Quote