I wanted to ask if a POINT structure is the only way to store mouse coordinates ? My problem with this way is that when you declare:
POINT ps[20];
you need to have a fixed size array. What if I need to store more points ? Is there a way to make it dynamic (to resize itself when it reaches the limit). I want to use this array to get mouse coordinates and then draw lines in WM_PAINT: message. thx
case WM_MOUSEMOVE:
{
pt[i].x=LOWORD(lparam);
pt[i++].y=HIWORD(lparam);
--------
}
You would use an array of POINT structures.