CodeGuru Home VC++ / MFC / C++ .NET / C# Visual Basic VB Forums Developer.com
Results 1 to 2 of 2

Thread: Mouse Click

  1. #1
    Guest

    Mouse Click

    Can we activate a window message artificialy e.g mouse click
    Niaz


  2. #2
    Join Date
    Jul 1999
    Location
    Israel
    Posts
    1,793

    Re: Mouse Click

    yes you can.
    try this:
    map the mouse event you wish in the h file:

    afx_msg void ON_LBUTTONDOWN();

    void CSomeClass::OnLButtonDown() //or some other mouse event like OnLButtonUp() or OnRButtonDown()
    eg.

    void CSomeClass::OnLButtonDown()
    {
    PostMessage(WM_ANY_MESSAGE,0,0);
    //or
    SendMessage(WM_ANY_MESSAGE,0,0);
    }

    it will work the same..
    reguards
    kishk91




Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  





Click Here to Expand Forum to Full Width

Featured