void CCustomRendererView::OnLButtonDown(UINT nFlags, CPoint point) { if(g_sat_slider.in_rect(point.x, point.y)) { if(g_sat_slider.on_mouse_button_down(point.x, point.y)) { Invalidate(); } } else { RECT clrect; GetClientRect(&clrect); int width = clrect.right - clrect.left; int height = clrect.bottom - clrect.top; transform(width, height, point.x, point.y); Invalidate(); CView::OnLButtonDown(nFlags, point); } }
void CCustomRendererView::OnMouseMove(UINT nFlags, CPoint point) { if(nFlags & MK_LBUTTON) { if(g_sat_slider.on_mouse_move(point.x, point.y, true)) { Invalidate(); } else { if(!g_sat_slider.in_rect(point.x, point.y)) { RECT clrect; GetClientRect(&clrect); int width = clrect.right - clrect.left; int height = clrect.bottom - clrect.top; transform(width, height, point.x, point.y); Invalidate(); CView::OnMouseMove(nFlags, point); } } } CView::OnMouseMove(nFlags, point); }