trichview.com

trichview.support




Re: How to check whether RichView is empty?


Return to index


Author

Message

Dmitry

Posted: 12/03/2002 19:09:06


"Sergey Tkachenko" <[email protected]> �������/�������� � ��������

���������: news:[email protected]...

> > > Empty := (rv.ItemCount=0) or  ((rv.ItemCount=1) and

> (rv.GetItemStyle(0)=0)

> > and (rv.GetItemText(0)=''));

> >

> > in your example rv.GetItemText(0) IMHO also can throw exception.

>

> No, because it will be executed only if (rv.ItemCount=1)


I dont understand Pascal. Forgive me. Please tell if it is ok on C++ if you

may:


bool _stdcall RVIsEmpty(TCustomRichView *p_RView)

{

  assert(p_RView);

  return p_RView->ItemCount == 0 ? false :

  ((p_RView->ItemCount == 1) && (p_RView->GetItemStyle(0) == 0)) &&

    p_RView->GetItemText(0).IsEmpty();

}








Powered by ABC Amber Outlook Express Converter