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
[6766] api mouse_event()를 사용해서 마우스를 계속 움직이게 하고 싶은데요?
이대현 [dhyuni] 2435 읽음    2001-04-12 18:43
void __fastcall TForm1::Button1Click(TObject *Sender)
{
ShowMessage("Button 1 clicked");

}
//---------------------------------------------------------------------------

void __fastcall TForm1::Button2Click(TObject *Sender)
{
Application->ProcessMessages();
    // Get the point in the center of button 1
    TPoint Pt;
    Pt.x = Button1->Left + Button1->Width / 2;
    Pt.y = Button1->Top + Button1->Height / 2;
    // Convert Pt to screen coordinates
    Pt = ClientToScreen(Pt);

    // Convert Pt to mickeys
    Pt.x = Pt.x * 65535. / Screen->Width;
    Pt.y = Pt.y * 65535. / Screen->Height;
    // Move the mouse
    mouse_event(MOUSEEVENTF_ABSOLUTE : MOUSEEVENTF_MOVE, Pt.x, Pt.y, 0, 0);<<======여기서
                                                                             function call error
    // Simulate the left mouse button down
    mouse_event(MOUSEEVENTF_ABSOLUTE : MOUSEEVENTF_LEFTDOWN, Pt.x, Pt.y, 0, 0);
    // Simulate the left mouse button up
    mouse_event(MOUSEEVENTF_ABSOLUTE : MOUSEEVENTF_LEFTUP, Pt.x, Pt.y, 0, 0);

}

+ -

관련 글 리스트
6766 api mouse_event()를 사용해서 마우스를 계속 움직이게 하고 싶은데요? 이대현 2435 2001/04/12
6780     Re:api mouse_event()를 사용해서 마우스를 계속 움직이게 하고 싶은데요? 박지훈.임프 2852 2001/04/12
Google
Copyright © 1999-2015, borlandforum.com. All right reserved.