|
Don't use refresh, the rectangle is just a simple figure, you can completely redraw it with pmxor to erase the original picture, that is to say, in onmove you should write the original rectangle rect with pmxor once, erase, and then in pmcopy It seems to be this, you look at the help, the default) to draw new coordinates, if you design a complex figure, you can use double buffering for simplicity, first draw it in memory, and then display it, the display part is directly in onpaint Just call the corresponding function like copyrect. |
|