Okey dokey I'm having some problems with GetCursorPos, it's giving me really bad coordinates... or maybe it's something else I'm unsure.
sPos is defined at the top to keep it in scope for WM_LBUTTONUP.Code:case WM_LBUTTONDOWN: { if(sel[0] == 1) { SetCapture(hwnd); GetCursorPos(&sPos); break; } } case WM_LBUTTONUP: { if(sel[0] == 1) { POINT pos; GetCursorPos(&pos); ScreenToClient(hwnd,&pos); ScreenToClient(hwnd,&sPos); DrawControl(sel[1],sPos,pos); ReleaseCapture(); sel[0] = sel[1] = 0; } }