trichview.com

trichview.support




Re: Recognize images with the mouse


Return to index


Author

Message

Pieter E.

Posted: 09/10/2004 14:39:56


Sorry, but it doesn't recognize images in a table. I've got the following

code:


void __fastcall TTekstFrame2::rveRVMouseDown(TCustomRichView *Sender,

      TMouseButton Button, TShiftState Shift, int ItemNo, int X, int Y)

{

  TCustomRVFormattedData *LRVData;

  int LItemNo, LOffs;

  Types::TPoint pt;


  pt = rve->ClientToDocument(pt);

  rve->GetItemAt(pt.x, pt.y, LRVData, LItemNo, LOffs, True);

  if(ItemNo<0) return;


  if(LRVData->GetItemStyle(ItemNo) == rvsTable)

        {

          Caption = "table";

        }

  else if(LRVData->GetItemStyle(ItemNo) == rvsPicture)

        {

          Caption = "image";

        }

  else if(LRVData->GetItemStyle(ItemNo) == rvsNormal)

        {

         Caption = "tekst";

        }

  else  {

          Caption = "nothing";

        }

}

//---------------------------------------------------------------------------


"Sergey Tkachenko" <[email protected]> wrote:

>It must recognize images in tables.

>This is the maiin reason why to use GetItemAt and then

>LRVData->GetItemStyle(LItemNo) instead of Sender->GetItemStyle(ItemNo)

>

>>

>> Dear Sergey,

>>

>> Thank you for your support. It works great. The only thing which doesn't

>> work is when an images is nested into a table. It recognizes the table

but

>> not the selected image. Do you have a solution for this problem?

>

>





Powered by ABC Amber Outlook Express Converter