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
[13540] [질문]Black magic 이 뭐지요?
[만해] [] 759 읽음    2001-12-11 09:50
안녕하세요 만해 입니다.

제가 야후의 Cpp Buidler 뉴스 그룹에 얼마전에 가입 했었는데요

저한테 오는 기사 중에 Black Magic 이란 제목의 기사가 와서요

이게 뭔지 궁금해서

혹 아시는분은 좀 알려 주세요

밑의 내용은 제한테 온 기사 전문입니다.

Now, the "black magic" code I use:

bool HelpBtn = false;

void __fastcall TfrmMainMenu::ImgHelpMouseMove(TObject *Sender,
            TShiftState Shift, int x, int y)
{
   if(HelpBtn)
   {
      ImgHelp->Picture->LoadFromFile(HelpPicOn);
      HelpBtn = false;
   }
}

void __fastcall TfrmMainMenu::FormMouseMove(TObject *Sender,
            TShiftState Shift, int x, int y)
{

   if(!HelpBtn)
   {
      ImgHelp->Picture->LoadFromFile(HelpPicOff);
      HelpBtn = true;
   }
}

The way it works is that all of my images on the form are dark, until I move the mouse over them and they highlight.  When I move the mouse back over the form the image goes dark again.  The only problems is that sometimes after a modal window has popped up, and you have clicked the mouse somewhere in it that is not over the image that brought it up, when you close this window your mouse can end up on top of another image in the menu and since you didn't move over the form, both the original selection and the one the mouse ends up on are highlighted.  It can be confusing to the user.  If you move the mouse back over the form, both images go back to normal.  See what I mean about 'hoaky'.  It does work though, and pretty well.  It would just be nice if they(Borland) provided us with an ON and OFF mouse event like some of the other languages do.

+ -

관련 글 리스트
13540 [질문]Black magic 이 뭐지요? [만해] 759 2001/12/11
13542     별뜻 없는것 같은데요.... 아마 이글 쓴사람이 임의로 지은 말 같습니다 withsun 710 2001/12/11
Google
Copyright © 1999-2015, borlandforum.com. All right reserved.