|
-
July 3rd, 2004, 03:33 AM
#1
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
-
July 25th, 2004, 08:53 PM
#2
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
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|