Home > Software engineering >  Beginners turn MFC dialog-based mouse drawing program how to write the code in the onmousemove in on
Beginners turn MFC dialog-based mouse drawing program how to write the code in the onmousemove in on

Time:04-09


Void CMyDrawDlg: : onm ouseMove (UINT nFlags, CPoint point)
{
//TODO: Add your message handler code here and/or call the default
The CDC * pDC=GetDC ();
If (m_bLButtonDown==true) {CClientDC dc (this); CPen pen (m_style m_width, m_color); Dc. SelectObject (pen); Dc. MoveTo (m_point); Dc. LineTo (point); M_point=point;
} CDialogEx: onm ouseMove (nFlags, point);
}
This is the code in the onm ousemove teacher said to write in onpaint or shaking will disappear but I write is not draw anything in the onpaint [face] monkey2:025 PNG [/face], every brother please help me [face] monkey2:018 PNG [/face] [face] monkey2:018 PNG [/face] [face] monkey2:018 PNG [/face]

CodePudding user response:

Hold the left mouse button to move and record the mouse trajectory, onpaint map path

CodePudding user response:

reference 1st floor mmcanyu response:
hold the left mouse button to move and record the mouse trajectory, onpaint map path
I draw in the onpaint it how to become a fan
  • Related