News:

MASM32 SDK Description, downloads and other helpful links
MASM32.com New Forum Link
masmforum WebSite

Background image for RichText

Started by lamer, November 15, 2007, 04:34:02 AM

Previous topic - Next topic

lamer

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...

ramguru

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.

lamer

Hmmm...  :eek
Anyway, it's better than nothing. I'll try.
Thank you.

lamer

It seems to work!
As usual with your answers.
:U :U :U

ramguru

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

lamer

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:

lamer

Alas and alack! It just seems to work :(
See attached image and traces of caret

[attachment deleted by admin]

ramguru

I have a test like this:

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

lamer

There is a static window behind the richedit with SS_BITMAP style and subsequent call to SendMessage with STM_SETIMAGE and IMAGE_BITMAP.  :(

ramguru


BasilYercin


lamer

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

ramguru

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

ramguru


lamer

 :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