|
임펠리테리입니다.
코드를 그대로 옮겨쓰시는 중에, '|'(파이프라인 문자)를 ':'(세미콜론 문자)로 잘못 쓰셨군요.
여기서 파이프라인은 비트 or 연산입니다.
파이프라인 문자는 \ 키와 시프트 키를 누르면 입력됩니다.
그럼 참고하시길...
이대현 님이 쓰신 글 :
: 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);
:
: }
|