Home > Software engineering >  MFC based on the dialog box procedure, how to draw rectangular and the rectangular move according to
MFC based on the dialog box procedure, how to draw rectangular and the rectangular move according to

Time:09-24

MFC based on the dialog box procedure, how to draw rectangular and the rectangular mobile according to the given coordinates, is to draw a rectangle, and let him move

CodePudding user response:

The SetTimer/OnTimer () + OnPaint ()?

CodePudding user response:

Use CRectTracker Class Members

CodePudding user response:

I is based on the dialog box class interface is not the view class

CodePudding user response:

Use the SetTimer and OnPaint change after coordinate mobile graphics also can't delete before. Is there any way can be according to the data make it similar to the effect of the animation

CodePudding user response:

Creates a memory DC and store the initial paintdc, again have a temporary DC, every time first bitblt memory DC to DC temporarily, rectangle in the picture on the temporary DC again, again to use temporary DC bitblt to paintdc, these actions are completed in onpaint, timer timing ivalid inside

CodePudding user response:

Remember the last place,
The timer every time to erase the last first, draw a new location

CodePudding user response:

Refer to the "desktop ball. Zip
"https://download.csdn.net/download/schlafenhamster/4362660
Contains three projects,
1, DeskBallBmp a round bitmap moving on the surface of the table, but the circle is flashing,
A circle is 2, DeskBallCli bitmap with the background of customers in the area to move, circle flicker-free,
3, DeskBallWin move a circular window on the desktop, circle flicker-free,
  • Related