The MASM Forum Archive 2004 to 2012

General Forums => The Workshop => Topic started by: lamer on November 15, 2007, 04:34:02 AM

Title: Background image for RichText
Post by: lamer on November 15, 2007, 04:34:02 AM
Hi all!
Does anybody knows a way to add background image to RichText? It is so easy with regular edit  box, but for RichText I didn't find any clue...
Title: Re: Background image for RichText
Post by: ramguru on November 15, 2007, 09:07:56 AM
It seems that the only way is to set WS_EX_TRANSPARENT style to your richedit control, create static(SS_BITMAP) control behind the richedit and that's it. Some drawbacks: the image must be the same size or larger as the richedit-control, also richedit flickers more then.
Title: Re: Background image for RichText
Post by: lamer on November 15, 2007, 01:58:54 PM
Hmmm...  :eek
Anyway, it's better than nothing. I'll try.
Thank you.
Title: Re: Background image for RichText
Post by: lamer on November 15, 2007, 03:22:43 PM
It seems to work!
As usual with your answers.
:U :U :U
Title: Re: Background image for RichText
Post by: ramguru on November 15, 2007, 04:06:48 PM
So I assume it's for your PNotes project, you want to change current edit control into richedit which may let to customize THE NOTES more (fonts, colors).  Sad that you decided you pick easier way (PellesC) not the most enjoyable  - asm  :lol . Anyway good luck with your project, as I can see it's quite popular in softpedia  :U
Title: Re: Background image for RichText
Post by: lamer on November 15, 2007, 06:39:05 PM
Indeed!
Actually many users asked me to add hyperlinks ability to notes, otherwise I were never go through the hassle of RichText  :(
BTW, the most enjoyable is .NET  :green2, while asm is most powerful and C is most... "programmatical".
Well, I got mixed up :dazzled:
Title: Re: Background image for RichText
Post by: lamer on November 21, 2007, 09:40:57 PM
Alas and alack! It just seems to work :(
See attached image and traces of caret

[attachment deleted by admin]
Title: Re: Background image for RichText
Post by: ramguru on November 21, 2007, 09:54:12 PM
I have a test like this:
(http://img259.imageshack.us/img259/3011/testgp0.png)
I've mentioned that if whole richedit control is not covered by an image ... bad things happen
So I can guess that in your case behind the richedit control there is no image...maybe brush...or else I'm lost
Title: Re: Background image for RichText
Post by: lamer on November 22, 2007, 07:48:34 AM
There is a static window behind the richedit with SS_BITMAP style and subsequent call to SendMessage with STM_SETIMAGE and IMAGE_BITMAP.  :(
Title: Re: Background image for RichText
Post by: ramguru on November 22, 2007, 08:32:11 AM
Please upload your problematic EXE
Title: Re: Background image for RichText
Post by: BasilYercin on November 22, 2007, 09:19:25 AM
Hi

i dont know if this may help

http://tortoisesvn.net/listcontrol_watermark

Title: Re: Background image for RichText
Post by: lamer on November 22, 2007, 09:48:06 AM
BasilYercin,
very interesting page, but I'm afraid it cannot be used with richedit - there are nothing in richedit associated with background image, instead of listview. However I didn't go into detail.
ramguru,
let me prepare something in RadAsm - after all it's ASM forum  :wink
Title: Re: Background image for RichText
Post by: ramguru on November 22, 2007, 09:57:34 AM
Quote from: lamer on November 22, 2007, 09:48:06 AM
let me prepare something in RadAsm - after all it's ASM forum  :wink
I will make my edition of PNotes in a while :lol
Title: Re: Background image for RichText
Post by: ramguru on November 22, 2007, 10:51:17 AM
seems to work quite well

(http://img519.imageshack.us/img519/5653/leafve2.png)

pnotes_xxl (http://www.stud.ktu.lt/~ramcvir/pnotes_xxl.zip)

Title: Re: Background image for RichText
Post by: lamer on November 22, 2007, 11:43:31 AM
 :cheekygreen: :cheekygreen: :cheekygreen:
OMG, I just had unnecessary call to RedrawWindow!
What a geek!
There is truly no limits for stupidity...
P.S.
Nice skin :green2