Delphi Programming Forum
C++Builder  |  Delphi  |  FireMonkey  |  C/C++  |  Free Pascal  |  Firebird
볼랜드포럼 BorlandForum
 경고! 게시물 작성자의 사전 허락없는 메일주소 추출행위 절대 금지
델파이 포럼
Q & A
FAQ
팁&트릭
강좌/문서
자료실
컴포넌트/라이브러리
FreePascal/Lazarus
볼랜드포럼 홈
헤드라인 뉴스
IT 뉴스
공지사항
자유게시판
해피 브레이크
공동 프로젝트
구인/구직
회원 장터
건의사항
운영진 게시판
회원 메뉴
북마크
델마당
볼랜드포럼 광고 모집

델파이 Q&A
Delphi Programming Q&A
[13610] TMS diagram에서 GPDrawer.GPCanvas.DrawLine 사용시 access violation이 자꾸떨어져요..
희망찬 [] 1561 읽음    2011-02-21 13:13
TMS diagram에서 GPDrawer.GPCanvas.DrawLine 사용시 access violation이 자꾸떨어져요.. ㅜㅜ

보통 DrawBlock내에서 이 함수를 사용하면 정상으로 그려지는데요

프로퍼티내에서 이 함수를 사용시에 access violation이 자꾸 떨어져서 미칠꺼같습니다. 도와주세요..


  TMockupTooltip = class(TMockupControl)
  private
    tooltipCanvas: TCanvas;
    tooltipR:  TRect;
    tooltipT:  Integer;
  public
    procedure DrawBlock(Canvas: TCanvas; Rect: TRect); override;
    function GetDirection : TMockupTooltipDirection;
    procedure SetDirection (Value: TMockupTooltipDirection);
  published
    property TextAlignment: TMockupTextAlignment read GetTextAlignment write SetTextAlignment;
    property Direction: TMockupTooltipDirection read GetDirection write SetDirection;

......
  이런식으로 프로퍼티를  SetDirection으로 선언하고
 아래와 같이
....

procedure TMockupTooltip.SetDirection(Value: TMockupTooltipDirection);
// 바뀐 값을 체크하여 반영
begin
  SiMain.ClearLog;
  if (tooltipR.Left <> 0) and (tooltipR.Right <> 0) and (tooltipR.Top <> 0) and (tooltipR.Bottom <> 0) then
  begin
    if Value = 'LeftTop' then
     begin
    GPDrawer.GPCanvas.DrawLine (0,0,1,1);

.....
SetDirection에 GPDrawer.GPCanvas.DrawLine (0,0,1,1);을 하면 access violation이 발생합니다. 유독 프로퍼티로
사용할때만 에러가 나느거 같은데 해결방법이 없을까요? 이것때문에 진행이 안되서 죽겠네요 ㅜㅜ

+ -

관련 글 리스트
13610 TMS diagram에서 GPDrawer.GPCanvas.DrawLine 사용시 access violation이 자꾸떨어져요.. 희망찬 1561 2011/02/21
Google
Copyright © 1999-2015, borlandforum.com. All right reserved.