Something for a child window analogous to `this`
问题 I am a newcomer to programming. I am writing a dialog based application which has a static control on it. Using Using void CMy1stDlg::OnMouseMove(UINT nFlags, CPoint point) { if (this == GetCapture()) { CClientDC aDC(this); aDC.SetPixel(point, RGB(255,0,0)); } } I can create results like However what I want is that the locus of mouse is only drawn within the static window. I can't find the reference to this in MSDN and I don't know why the following method fails. void CMy1stDlg::OnMouseMove