|
|
От: |
Mr.ToNik
|
http://sinstr.ru |
| Дата: | 23.05.05 14:14 | ||
| Оценка: | |||
3) Код лучше всётаки форматировать соответствующими тегами.char *strncpy( char *strDest, const char *strSource, size_t count );
Parameters:
strDest — Destination string.
strSource — Source string. или, что то же самое, указатель на символ, откуда надо начинать копировать
count — Number of characters to be copied
B>void __fastcall TFMain::LB_FDestinationDrawItem(TWinControl *Control, int Index, TRect &Rect, TOwnerDrawState State)
B>{
B> for (int i=0; i<LB_FDestination->Items->Count; i++)
B> {
B> if (i<=CntFDestination-1) //проверяю - новая строка или нет
B> {
B> LB_FDestination->Canvas->FillRect(Rect);
B> LB_FDestination->Canvas->Font->Color = clBlue;
B> LB_FDestination->Canvas->TextOut(Rect.Left, Rect.Top, LB_FDestination->Items->Strings[i]);
B> }
B> else
B> {
B> Rect = LB_FDestination->ItemRect(i);
B> LB_FDestination->Canvas->Font->Color = clRed;
B> LB_FDestination->Canvas->Font->Style = TFontStyles()<< fsBold;
B> LB_FDestination->Canvas->TextOut(Rect.Left, Rect.Top, LB_FDestination->Items->Strings[i]);
B> }
B> }
B>}