mfc dialog based:

void CImageView::OnMouseMove(UINT nFlags, CPoint point)
    CPoint ptImg = GetScrollPosition() + point;
    sprintf(buffer,"%d %d %d", ptImg.x, ptImg.y, 100);
    CScrollView::OnMouseMove(nFlags, point);
//this is suppsed to update a static text with buffer
void CImageDlg::OnUpdateCStatic()
	SetDlgItemText(IDC_STATIC_COORDSXY, buffer);  <-this is not working.

When I move the curosr over the image display area, I do not see the static text getting updated. When I step through, buffer has right value.