[TRichView bug?] Problem with white font and AddPicture

General TRichView support forum. Please post your questions here
Post Reply
Jacek Puczynski
Posts: 27
Joined: Tue Jun 20, 2006 7:34 pm
Location: Europe

[TRichView bug?] Problem with white font and AddPicture

Post by Jacek Puczynski »

Hello. I foud some problems with inserting some text AFTER i call AddPictureEx, AddHotPicture or other method.

Code: Select all

RichView->AddPictureEx(img, insertimg, -1, rvvaBaseline);
This problem affects only TRichView working at systems Windows 98 and Windows ME. At Windows XP TRichView works fine.

Problem description: When I insert some colored text in TRichView before Picture (TGIFImage) then text is in color from ParaStyle but when I insert text AFTER picture then text always change color to white (in ParaStyle is other color for this text).

Some screenshots from the same program working on Windows 98 and Windows XP:

Windows XP (text after image):
Image

Windows 98 (text after image):
Image

Windows XP (text before image):
Image

Windows 98 (text before image):
Image

More about this error: while I select some text and image on Windows 98, text in some cases is visible in right color:
Screens from Windows 98:
Image

Image

I will be thankful for any help with this.
Greetings, Jacek.
Jacek Puczynski
Posts: 27
Joined: Tue Jun 20, 2006 7:34 pm
Location: Europe

Post by Jacek Puczynski »

I've noticed this problem affects only for some GIFs (i think : non animated and transparent)
this is GIF I use on screens:
http://img480.imageshack.us/img480/7353/haha9xj.gif
Jacek Puczynski
Posts: 27
Joined: Tue Jun 20, 2006 7:34 pm
Location: Europe

Post by Jacek Puczynski »

More if I call:

Code: Select all

GifImage->DrawOptions >> goTransparent;
before i insert it to TRichView it non transparment but font has right color.
Sergey Tkachenko
Site Admin
Posts: 17310
Joined: Sat Aug 27, 2005 10:28 am
Contact:

Post by Sergey Tkachenko »

Does this problem persist if you include RVGifAnimate.pas in the project, and change RV->AnimationMode to rvaniOnFormat?
Jacek Puczynski
Posts: 27
Joined: Tue Jun 20, 2006 7:34 pm
Location: Europe

Post by Jacek Puczynski »

Sergey Tkachenko wrote:Does this problem persist if you include RVGifAnimate.pas in the project, and change RV->AnimationMode to rvaniOnFormat?
Yes, it is. Screens are from program which has added RVGifAnimate.pas to project and AnimationMode sets to rvaniOnFormat.

Greetings, Jacek.
Sergey Tkachenko
Site Admin
Posts: 17310
Joined: Sat Aug 27, 2005 10:28 am
Contact:

Post by Sergey Tkachenko »

Please send me this document saved as RVF file.
Jacek Puczynski
Posts: 27
Joined: Tue Jun 20, 2006 7:34 pm
Location: Europe

Post by Jacek Puczynski »

Jacek Puczynski
Posts: 27
Joined: Tue Jun 20, 2006 7:34 pm
Location: Europe

Post by Jacek Puczynski »

Some news about this bug? :?
Sergey Tkachenko
Site Admin
Posts: 17310
Joined: Sat Aug 27, 2005 10:28 am
Contact:

Post by Sergey Tkachenko »

Please send this file me by e-mail ( [email protected] ).
Rapidshare is almost useless for me, because I have a common external IP with many users of my local network, so Rapidshare usually says me that my download limit is exceeded.
Jacek Puczynski
Posts: 27
Joined: Tue Jun 20, 2006 7:34 pm
Location: Europe

Post by Jacek Puczynski »

Sergey Tkachenko
Site Admin
Posts: 17310
Joined: Sat Aug 27, 2005 10:28 am
Contact:

Post by Sergey Tkachenko »

Confirmed.
Fix: in RVItem.pas, add the following lines

Code: Select all

      if not RVNT then
        Canvas.Refresh;
in TRVGraphicItemInfo.Paint, after the lines

Code: Select all

      if DCState<>0 then
        RestoreDC(Canvas.Handle, DCState);
Post Reply