CodeGuru Home VC++ / MFC / C++ .NET / C# Visual Basic VB Forums Developer.com
Results 1 to 2 of 2
  1. #1
    Join Date
    Apr 2004
    Location
    Bangalore, INDIA
    Posts
    20

    Mouse Event Capturing in Dialog Box in WinCE

    Hai Friends,

    In my application, i am displaying some bitmap buttons on a modal dialog box.

    I have to capture the mouse left click and mouse move on these buttons.

    The mouse event capturing is not working with WinCE (eVC++ 4.0).

    How can it be done?

    Help me,


    With thanks,
    Arun

  2. #2
    Join Date
    Jul 2004
    Location
    Seoul,Korea
    Posts
    6

    Common control

    So, you might created ur own CBitmap button class, right?
    then what you have to do now is

    first, override CButton class and make it ur way.
    if you want to capture mouse event on your button class,
    you need to override OnLButtonDown() and OnMouseMove(), OnLButtonUp().

    void CMyBitmapButton::OnLButtonDown(UINT nFlags, CPoint point)
    {
    SetCapture(); // from now, you can capture mouse event on your button class.
    }

    void CMyBitmapButton::OnLButtonDown(UINT nFlags, CPoint point)
    {
    ReleaseCapture(); // Be sure to release capture.
    }

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