|
|
#1 |
|
Moderator
Join Date: Nov 2002
Location: Birmingham, England
Posts: 8,202
|
nsRichEdit plug-in
* Load a file into a rich edit control (using EM_STREAMIN).
* Provides formatted printing of a rich edit control. * Allows oneself to add a print button to the NSIS license pages. http://nsis.sourceforge.net/File:NsRichEdit.zip Note to JasonFriday13 for CustomLicense plug-in: There are a number of errors in your code (which is one reason why I added my own function to this plug-in). 29: Should be TCHAR* FileName. 42: !FileHandle is not a valid test for an invalid handle (only use INVALID_HANDLE_VALUE). 46, 56, 60: You're not closing the file handle. 87, 88: The amount of memory to allocate should be sizeof(TCHAR) * string_size (because Unicode characters are 2 bytes). 105: You are casting the return value from GetLastError to (const TCHAR*) and pushing it onto the stack. This will (in most cases) cause a crash. To convert an integer to a string, use wsprintf. Besides, I'm not sure why you are using GetLastError because GlobalAlloc does not set it. I'd recommend using EM_STREAMIN too as right now you are reading the entire license file into memory before setting it. Stu Need an installer? http://www.afrowsoft.co.uk |
|
|
|
|
|
#2 |
|
Senior Member
|
Nice, your control replaces original License rich edit or it is only on new page [nsDialogs]?
Create cool looking Graphical Installers in NSIS: www.graphical-installer.com -see below I offer NSIS scripting, C/C++/C#/Delphi programming: www.unsigned-softworks.sk Develop NSIS projects directly in Visual Studio 2005-2012: www.unsigned-softworks.sk/visual-installer/ |
|
|
|
|
|
#3 |
|
Moderator
Join Date: Nov 2002
Location: Birmingham, England
Posts: 8,202
|
It can be used for any existing rich edit control as all it needs is a control handle (it does not create the control itself). It can be one you've added to a nsDialogs page or the existing license page rich edit control (use AddPrintButton for this). The example scripts demonstrate all functions.
Stu Need an installer? http://www.afrowsoft.co.uk |
|
|
|
|
|
#4 |
|
Senior Member
Join Date: May 2005
Location: Taranaki, New Zealand
Posts: 400
|
Cool, well it's nice to know a better piece of software has come up. My code was written way back when I was first understanding coding in C (initially to fix one of my installer problems). Some of the errors are obvious while others aren't. In fact, it's probably not worth keeping it on the wiki anymore as your plugin is clearly superior.
|
|
|
|
|
|
#5 |
|
Moderator
Join Date: Nov 2002
Location: Birmingham, England
Posts: 8,202
|
I have made a note on the wiki page.
Stu Need an installer? http://www.afrowsoft.co.uk |
|
|
|
![]() |
|
|||||||
| Thread Tools | Search this Thread |
| Display Modes | |
|
|