|
메소드 EditDrawItem 를 수정하세요
*.h 와 *.cpp 에...
void __fastcall TForm1::EditDrawItem (TWinControl *Control, int Index, TRect &Rect, TOwnerDrawState State)
위에서 TRect 앞에 const 만 추가하세요
void __fastcall TForm1::EditDrawItem (TWinControl *Control, int Index, const TRect &Rect, TOwnerDrawState State)
그럼..
정종호 님이 쓰신 글 :
: FEdit = new TComboBox((void*)NULL);
: FEdit->Parent = Tree;
: ((TComboBox*)FEdit)->OnDrawItem = &EditDrawItem; // <-여기서 에러
:
: 이렇게 했는데
:
: E2034 Cannot convert 'void (_fastcall * (_closure )(TWinControl *,int,TRect &,TOwnerDrawState))(TWinControl *,int,TRect &,TOwnerDrawState)' to 'void (_fastcall * (_closure )(TWinControl *,int,const TRect &,TOwnerDrawState))(TWinControl *,int,const TRect &,TOwnerDrawState)'
:
: 이런 에러가 납니다. 알려주세요~~
:
: EditDrawItem함수는 미리 만들어 놨습니다.
|