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
[23236] 답변감사드립니다.(냉무)
chickensoup [tpdkd] 1393 읽음    2002-12-16 15:08
유영인.Chris 님이 쓰신 글 :
: TApplication에는, 힌트에 관한 메소드가 많고, THintWindow에는 힌트 객체의 정보를 가지고 있습니다.
:
: 예를 들어서, 힌트가 바뀌지 않는 경우에는, Application->HideHint, Application->ShowHint를 하시면, 바뀐 힌트로 출력됩니다.
:
: 아래 루틴은, 제가 사용하는 힌트 루틴인데, 5개의 아바타가 있고, 그 아바타에 가만히 마우스를 올려두면, 아이디 등급등이 출력되는 기능입니다.
:
: //---------------------------------------------------------------------------
:
: void __fastcall TPiece_Room::_imAvatarMouseMove(TObject *Sender, TShiftState Shift, int X, int Y)
: {
:
:  int               itCount, itCursor = crDefault, itStartX;
:  bool              blVisible = false;
:  String            stHint;
:  TPoint            tpPosition;
:
:
:  if(Y >= 8 && Y <= 8 + 30) {
:    for(itCount = 0; itCount < (MaxUser > MAX_USER_ROOM ? MAX_USER_ROOM : MaxUser); itCount ++) {
:      itStartX = 23 + (41 * itCount);
:
:      if(X >= itStartX && X <= itStartX + 35) {
:        if(User[itCount] < 0 || User[itCount] >= MAX_USER) continue;
:
:        stHint = Format("%-s\n[%-s]", ARRAYOFCONST((
:          (String)Main->USER[User[itCount]].ID,
:          (String)ClassIndexToClassString(Main->USER[User[itCount]].Class)
:        )));
:
:        if(stHint != _imAvatar->Hint) {
:          _imAvatar->Hint = stHint;
:          GetCursorPos(&tpPosition);
:          Application->ActivateHint(tpPosition);
:        }
:
:        blVisible = true;
:        itCursor  = crHandPoint;
:      }
:    }
:  }
:
:
:  if(!blVisible) {
:    _imAvatar->Hint = "";
:    Application->HideHint();
:  }
:
:  if(_imAvatar->Cursor != itCursor)
:    _imAvatar->Cursor = (TCursor)itCursor;
:
: }
:
: //---------------------------------------------------------------------------
:
:
:
: chickensoup 님이 쓰신 글 :
: : 챠트에서 좌표값을 구해서 힌트로 보여주려고 합니다.
: : 좌표값은 구했는데, 한번만 보여지고 마우스를 무브할때마다 보여지지는 않습니다.
: : 마우스 움직이면 바로바로 힌트가 바뀌었으면 합니다.
: : 소스를 첨부하오니, 조언 부탁드립니다.
: :
: : void __fastcall TForm1::Chart1MouseMove(TObject *Sender, TShiftState Shift,
: :       int X, int Y)
: : {
: :         double xx,yy;
: :         Chart1->Series[0]->GetCursorValues(xx,yy);
: :
: :         AnsiString xxx,yyy;
: :         xxx = IntToStr(int(xx));
: :         yyy = IntToStr(int(yy));
: :
: :         Chart1->Hint = xxx + "," + yyy;
: :
: : }

+ -

관련 글 리스트
23217 힌트를 빠른 속도로 업데이트하고 싶습니다. chickensoup 2333 2002/12/16
23228     Re:힌트를 빠른 속도로 업데이트하고 싶습니다. 유영인.Chris 1903 2002/12/16
23236         답변감사드립니다.(냉무) chickensoup 1393 2002/12/16
23221     [참조]:힌트를 빠른 속도로 업데이트하고 싶습니다. 하느리 1640 2002/12/16
Google
Copyright © 1999-2015, borlandforum.com. All right reserved.