Quantcast
Channel: CodeGuru Forums - Visual C++ Programming
Viewing all articles
Browse latest Browse all 3021

update Dlg CStatic

$
0
0
mfc dialog based:

Code:

//CImageView.cpp:
void CImageView::OnMouseMove(UINT nFlags, CPoint point)
{
    CPoint ptImg = GetScrollPosition() + point;
    sprintf(buffer,"%d %d %d", ptImg.x, ptImg.y, 100);
    ((CImageDlg*)GetParent())->OnUpdateCStatic();
    CScrollView::OnMouseMove(nFlags, point);
}
//CImageDlg.cpp:
//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.

Viewing all articles
Browse latest Browse all 3021

Trending Articles