WINAMP.COM | Forums > Developer Center > NSIS Discussion > RichEdit with nsDialogs? |
Last Thread
Next Thread
|
| Author |
|
|
Anders Major Dude
Registered: Jun 2002 |
RICHEDIT_CLASS is not the real name, try "RICHEDIT" or "RichEdit20A" __________________ |
||
|
|
|
vbguy Junior Member
Registered: Jul 2006 |
Thanks, RichEdit20A worked. |
||
|
|
|
bradharding Member
Registered: Sep 2003 |
Hi! |
||
|
|
|
Anders Major Dude
Registered: Jun 2002 |
http://forums.winamp.com/showthread...482#post1812482 __________________ |
||
|
|
|
bradharding Member
Registered: Sep 2003 |
Thanks for your response, Anders. |
||
|
|
|
Anders Major Dude
Registered: Jun 2002 |
its the same message (http://msdn2.microsoft.com/en-us/li...302(VS.85).aspx ) __________________ |
||
|
|
|
bradharding Member
Registered: Sep 2003 |
Thanks again! I'll give it a go.... |
||
|
|
|
vbguy Junior Member
Registered: Jul 2006 |
I just use this to load the RTF data. The article states '.txt' files, but RTF are just text files with funky formatting.
Last edited by vbguy on 03-11-2008 at 02:15 PM |
||
|
|
|
bradharding Member
Registered: Sep 2003 |
Thanks for your help, vbguy! Here's my code: code: Unfortunately, it doesn't display all of the RTF file. I'm guessing this is because of the value that GetFileSize returns, and the additional bytes used for the formatting of the RTF file. I tried using EM_STREAMIN as Anders suggested, but I'm completely lost with that bit of code.... Any further ideas? Brad. |
||
|
|
|
vbguy Junior Member
Registered: Jul 2006 |
You need to replace the hwnd to point to your added text box (or rich text box): Then, deallocate the memory when the installer closes:
|
||
|
|
|
Anders Major Dude
Registered: Jun 2002 |
vbguy: you can't use WM_SETTEXT, it seems to work for some simple rtf files, but not everything __________________ |
||
|
|
|
bradharding Member
Registered: Sep 2003 |
Thanks for your help guys. |
||
|
|
|
Anders Major Dude
Registered: Jun 2002 |
no, can't make it work, I end up with the same problem as WM_SETTEXT, the file will not load 100% __________________ |
||
|
|
|
vbguy Junior Member
Registered: Jul 2006 |
Last edited by vbguy on 03-11-2008 at 11:15 PM |
||
|
|
|
bradharding Member
Registered: Sep 2003 |
Fixed! It's always something simple that's causing the problem isn't it? code: |
||
|
|
|
Anders Major Dude
Registered: Jun 2002 |
that changes nothing, thats only the length, even a rtf file less than 300bytes will not load, atleast not for me
__________________ |
||
|
|
|
bradharding Member
Registered: Sep 2003 |
That's strange. The RTF file I'm using is about 58Kb. Without sending that EM_EXLIMITTEXT message, it wouldn't display the last quarter of the file. With the message, it displays it fine. |
||
|
|
|
vbguy Junior Member
Registered: Jul 2006 |
|
||
|
|
|
Anders Major Dude
Registered: Jun 2002 |
alright, I think this works code: the code is a little bit longer than the WM_SETTEXT code, but it does not alloc the whole file at once, and does not know or care about the filesize at all __________________ |
||
|
|
|
vbguy Junior Member
Registered: Jul 2006 |
|
||
|
|
|
kichik M.I.A. [NSIS Dev, Mod]
Registered: Oct 2001 |
You should. __________________ |
||
|
|
|
vbguy Junior Member
Registered: Jul 2006 |
|
||
|
|
|
kichik M.I.A. [NSIS Dev, Mod]
Registered: Oct 2001 |
I misread it as "maybe I should submit it for inclusion" and wanted to encourage you to do so by letting you know I will include it in the next version. __________________ |
||
|
|
|
grundic Junior Member
Registered: May 2009 |
I made a test file: But nothing was shown in RichEdit. What am I doing wrong? Also, anybody say how can I show custom text in RichEdit without using RTF file? Thanks in advance! |
||
|
|
|
grundic Junior Member
Registered: May 2009 |
Okay, I find a way to display RTF with aforementioned code. But now I got another problem: if I go back to page with custom RTF, then nothing is shown is RichEdit. I've found, that Pop $0 returns 0 Can anybody help me to solve this issue? |
||
|
|
|
grundic Junior Member
Registered: May 2009 |
I've found an other way to solve my problem Hope, it'll help someone. Here is link to the plugin: URL submitted by user.
|
||
|
|
|
Animaether Major Dude
Registered: Jun 2001 |
for what it's worth - I think the actual problem is that callback1 rolls over to callback2 the next time your page is generated. code: Usage is pretty simple. Presuming you have the above saved in "LoadRTF.nsh": code: *crosses fingers* |
||
|
|
|
grundic Junior Member
Registered: May 2009 |
I've found more easy way (see my next post) to fix probkem with RTF. |
||
|
|
|
Animaether Major Dude
Registered: Jun 2001 |
I know - it's just there for completeness sake and for those who can't, or don't want to, rely on plugins |
||
|
|
|
Last Thread Next Thread
|
WINAMP.COM | Forums > Developer Center > NSIS Discussion > RichEdit with nsDialogs? |
Forum Rules:
|