Home > Software engineering > Who help to take a look at, where is the problem! About CPaintDC and OnPain
Who help to take a look at, where is the problem! About CPaintDC and OnPain
Time:09-25
Steel began to learn MFC programming To achieve a renju boards!
In OnLButtonDown, click left key of mouse, can realize
Change to the OnPaint, failed to achieve, after the operation, the board of line for a moment, direct window hang!!!
CPaintDC classes, in OnPain, should how to implement, who can give me about, thank you
CodePudding user response:
You modify the value of the tag in the OnLButtonDown response function (for example, record the coordinates of points), and then call the refresh function InvalidateRect/Invalidate () () to refresh, OnPaint draw
CodePudding user response:
1, based on the CView class reloading ontouch , in which the map Draw a line 2 should be elected to the appropriate brush before