开发者

Need a way to display image and draw on the image in Visual C++

The current way that I found was to make a bitmap and paint it into a picturebox, but there it is very slow when trying to scroll the panel (t开发者_JS百科he picturebox is inside a scrollable panel).

Is there a better way to achieve this functionality?


Load the bitmap only when your picture box is created, then leave it in memory until the picture box is destroyed. Loading the bitmap every time OnPaint is called will destroy performance.

Also make sure you aren't re-painting your bitmap if you receive a WM_PAINT message and nothing has changed.


That image size, 1500x2000 will be slow. How about resizing it to 25% to show a preview and if a user wishes to see the whole image give them an alert it may take some time.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜