|
게시물 2460번( 임프님 )의 답변을 참고하여 DeleteRow()를 잘 사용하고 있습니다.
그런데, MoveRow()도 사용 해야해서 아래와 같이 코딩 하였습니다.
하지만 컴파일에서는 에러가 안나는데, 링커할때
'[Linker Error] Unresolved external '__fastcall TMyGrid::MoveRow(int, int)'
referenced from E:\APP\메인\TALLY_SHOW.OBJ' 라는 에러가 나네요.
MoveRow()라는 함수가 없는건가요?
아니면 다르게 정의 해야 하는가요?
헤드화일에 다음과 같이 하였고,
class TMyGrid : public TStringGrid
{
public:
void __fastcall DeleteRow(int ARow);
void __fastcall MoveRow(int FromIndex, int ToIndex);
};
소스 부분은 다음과 같이..
//---------------------------------------------------------------------------
void __fastcall TForm_Tally_Show::Move_Row(int From_Row, int To_Row)
//---------------------------------------------------------------------------
{
TMyGrid *MyGrid = (TMyGrid *)StringGrid1;
MyGrid->MoveRow(From_Row, To_Row);
}
//---------------------------------------------------------------------------
void __fastcall TForm_Tally::Delete_Row(void)
//---------------------------------------------------------------------------
{
int i;
if (StringGrid1->RowCount == 2){
for (i=0;i<=10;i++){
StringGrid1->Cells[i][1] = "";
}
return;
}
TMyGrid *MyGrid = (TMyGrid *)StringGrid1;
MyGrid->DeleteRow(StringGrid1->Row);
StringGrid1_Row--;
}
아시는분 답변 부탁드립니다.
수고하세요.
|