Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Mike Lewis on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

not wnought move messages

Status
Not open for further replies.

bubak

Programmer
Jun 25, 2001
208
SK
Hi
I have this function, that calculates the number of WM_MOUSEMOVE messages , after WM_LBUTTONDOWN until WM_LBUTTONUP:

void CGfx1::run(void)
{
BOOL bBreak=FALSE;
GetParent()->SetCapture();
int i=0,i1=0;
for(;;)
{
i1++;
MSG aMsg;
PeekMessage(&aMsg, NULL, 0, 0,PM_REMOVE);
switch (aMsg.message) {
case WM_LBUTTONUP:bBreak=TRUE;break;
case WM_MOUSEMOVE:i++;break;
}
if(bBreak) break;
}
ReleaseCapture();
}

CGfx1 is derived from cwnd. When I try it, I get eg i1=350000 and i=20. really small. But when I do the same in a Dialog window, I get i1=350000 and i=300000, (dragging same aproximately same time and same area)

Where could that be?
Thx
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top