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

C++빌더 Q&A
C++Builder Programming Q&A
[51187] 생성자네요. 간단하게 처리 되었습니다. ㅠㅠ
leo21c [leo21c] 1567 읽음    2007-11-09 20:24
이렇게 하면 되는군요.
ㅋㅋ
간단하네요. 혹시나 저 같은 분이 계실지도 모르니까 글 남깁니다.

  Result := TPositionedLayer.Create(ImgView.Layers);

-->    Result = new TPositionedLayer(ImgView->Layers);

글 봐 주신 분들 행복하세요.



leo21c 님이 쓰신 글 :
: TPositionedLayer.Craate(ImgView.Layers); 델파이 처리 부분을 어떻게 하면 될까요?(Graphics32)
:
: 델파이 부분
: function TMainForm.CreatePositionedLayer: TPositionedLayer;
: var
:   P: TPoint;
: begin
:   // get coordinates of the center of viewport
:   with ImgView.GetViewportRect do
:     P := ImgView.ControlToBitmap(Point((Right + Left) div 2, (Top + Bottom) div 2));
:
:   Result := TPositionedLayer.Create(ImgView.Layers);
:   Result.Location := FloatRect(P.X - 32, P.Y - 32, P.X + 32, P.Y + 32);
:   Result.Scaled := True;
:   Result.MouseEvents := True;
:   Result.OnMouseDown := LayerMouseDown;
: end;
:
:
: C++ Builder에서 처리
:
: TPositionedLayer* __fastcall TMainForm::CreatePositionedLayer()
: {
:   TPoint P;
:   TPositionedLayer* Result;
:   ImgView->ControlToBitmap(P);
:
: //  Result = ImgView->Layers;
: //  Result := TPositionedLayer.Create(ImgView.Layers); //이분을 어떻게 처리할지 모르겠다.
:
:   Result->Location = FloatRect(P.x - 32, P.y - 32, P.x + 32, P.y + 32);
:   Result->Scaled = true;
:   Result->MouseEvents = true;
:   Result->OnMouseDown = LayerMouseDown;
:
:   return Result;
: }
:
: 주석에 보이는 것과 같이 이 부분을 어떻게 처리해야 하는지 모르겠습니다.
: 사실 다른 부분도 맞는지는 모르겠습니다.
:
: TPositionedLayer 의 Method에 Create가 있다고 하는데 Result->.... 이렇게 해서 찾아봐도
: Create함수는 없더군요.
: 이부분을 어떻게 처리하면 될까요?

+ -

관련 글 리스트
51186 TPositionedLayer.Create(ImgView.Layers); 델파이 처리 부분을 어떻게 하면 될까요?(Graphics32) leo21c 1763 2007/11/09
51187     생성자네요. 간단하게 처리 되었습니다. ㅠㅠ leo21c 1567 2007/11/09
Google
Copyright © 1999-2015, borlandforum.com. All right reserved.