Picture control After receiving the m_pic in CRect form, click the mouse in the coordinates, update the coordinates of the m_pic during Mouse Move, and draw it again using RedrawWindow(); but it doesn't move and only moves the coordinates where it can't be seen Is there any way to move Picture Control? I'd appreciate it if you could give me an answer.
mfc c++
Try implementing it in the mouse click event as below
void OnLButtonDown(UINT nFlags, CPoint point)
{
CRect rc;
m_Pic.GetClientRect(&rc);
rc.MoveToXY(point);
m_Pic.MoveWindow(rc);
}
To move when dragging, change bDragFlag to true in LButtonDown Event MouseMoveIn the event, when the bDragFlag value is true, you can change the position of the m_Pic to the code above, and implement bDragFlag to set the bDragFlag to false in LButtonUp
574 rails db:create error: Could not find mysql2-0.5.4 in any of the sources
577 Who developed the "avformat-59.dll" that comes with FFmpeg?
925 When building Fast API+Uvicorn environment with PyInstaller, console=False results in an error
618 GDB gets version error when attempting to debug with the Presense SDK (IDE)
© 2024 OneMinuteCode. All rights reserved.