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
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