首页 诗词 字典 板报 句子 名言 友答 励志 学校 网站地图
当前位置: 首页 > 教程频道 > .NET > .NET >

局部刷新的有关问题

2012-03-01 
局部刷新的问题比如在Image中如何只update一部分,手头没有资料和帮助,朋友们告诉下,位置很好取,只是刷新的

局部刷新的问题
比如在Image   中如何只update   一部分,   手头没有资料和帮助,   朋友们告诉下,   位置很好取,只是刷新的问题

[解决办法]
直接把新内容复制上去不就结了
Image1.Canvas.CopyRect
[解决办法]
InvalidateRect API函数可以解决问题,帮助中说明如下:

The InvalidateRect function adds a rectangle to the specified window's update region. The update region represents the portion of the window's client area that must be redrawn. 

BOOL InvalidateRect(
HWND hWnd,// handle of window with changed update region
CONST RECT *lpRect,// address of rectangle coordinates 
BOOL bErase// erase-background flag 
);

热点排行