There are currently 2 posts.
Font size: Small - 100% (Default)  Content converter: No conversion
 
Clicks Replies
1182 1
【证据】在调用DeleteDC删除内存DC前,无需将选入的Bitmap选出
巨大八爪鱼
武林盟主 二十一级
Reply
Floor 1 Posted at: 6/24/16 13:36
请看微软官方的代码:
https://msdn.microsoft.com/en-us/library/dd183402(v=vs.85).aspx
代码中只能搜索出一处SelectObject。

done:
DeleteObject(hbmScreen);
DeleteObject(hdcMemDC);
而且最后还是先删除位图,后删除DC。
巨大八爪鱼
武林盟主 二十一级
Reply
Floor 2 Posted at: 6/24/16 13:37
最主要注意的是GetDC和ReleaseDC搭配使用,CreateDC和DeleteDC搭配使用。
Reply the post
Content:
User: You are currently anonymous.
Captcha:
Unclear? Try another one.
(Shortcut key: Ctrl+Enter)
Post Information
Clicks: 1182 Replies: 1
Author: 巨大八爪鱼
Last reply: 巨大八爪鱼
Last reply time: 6/24/16 13:37
Bar Good Posts
Announcements