惯性聚合 高效追踪和阅读你感兴趣的博客、新闻、科技资讯
阅读原文 在惯性聚合中打开

推荐订阅源

freeCodeCamp Programming Tutorials: Python, JavaScript, Git & More
腾讯CDC
cs.AI updates on arXiv.org
cs.AI updates on arXiv.org
L
LINUX DO - 热门话题
D
Darknet – Hacking Tools, Hacker News & Cyber Security
Project Zero
Project Zero
V
Vulnerabilities – Threatpost
Cisco Talos Blog
Cisco Talos Blog
P
Palo Alto Networks Blog
C
Cisco Blogs
A
Arctic Wolf
月光博客
月光博客
The GitHub Blog
The GitHub Blog
T
The Blog of Author Tim Ferriss
量子位
小众软件
小众软件
Latest news
Latest news
OSCHINA 社区最新新闻
OSCHINA 社区最新新闻
Microsoft Security Blog
Microsoft Security Blog
T
The Exploit Database - CXSecurity.com
Security Latest
Security Latest
N
Netflix TechBlog - Medium
K
Kaspersky official blog
人人都是产品经理
人人都是产品经理
Cyber Security Advisories - MS-ISAC
Cyber Security Advisories - MS-ISAC
博客园_首页
Y
Y Combinator Blog
P
Proofpoint News Feed
H
Hackread – Cybersecurity News, Data Breaches, AI and More
M
MIT News - Artificial intelligence
T
Threat Research - Cisco Blogs
S
Schneier on Security
D
Docker
Scott Helme
Scott Helme
MyScale Blog
MyScale Blog
Spread Privacy
Spread Privacy
cs.CL updates on arXiv.org
cs.CL updates on arXiv.org
Threat Intelligence Blog | Flashpoint
Threat Intelligence Blog | Flashpoint
GbyAI
GbyAI
有赞技术团队
有赞技术团队
Google DeepMind News
Google DeepMind News
The Hacker News
The Hacker News
H
Help Net Security
Simon Willison's Weblog
Simon Willison's Weblog
J
Java Code Geeks
C
Cyber Attacks, Cyber Crime and Cyber Security
T
Tenable Blog
B
Blog
Know Your Adversary
Know Your Adversary
IT之家
IT之家

博客园 - 晨光静默

centos 命令 curl用到的一些命令 nginx记录 html select qq作文 mfc开启控制台打印日记 mfc右键菜单(包括系统托盘菜单)弹窗后如何消失 angular单页应用点击button自动刷新页面 setTimeout中调用angular的作用域生效 mfc模态对话框和非模态对话框注意点 c/c++元转分的bug c/c++中的崩溃代码片段 查看网络端口连接情况 win7x64安装python运行报错:api-ms-win-crt-runtime-|1-1-0.dll SyntaxError: (unicode error) 'unicodeescape' codec can't decode bytes qt导入头文件报错 python记录 (转)Curl命令详解 开箱即用的clogger 异步重叠IO linux xshell 命令上传下载文件
png转CBitmap
晨光静默 · 2022-10-21 · via 博客园 - 晨光静默

网络是个坑人的地方,需要实践!

// 加载bmp文件到CBitmap
bool LoadBmpPic(CString strBmpPath, CBitmap&bmp) { HBITMAP bitmap; try { bmp.Detach(); //从文件路径加载图片 bitmap = (HBITMAP)::LoadImage(NULL, strBmpPath, IMAGE_BITMAP, 0, 0, LR_CREATEDIBSECTION | LR_LOADFROMFILE | LR_DEFAULTSIZE); if (bmp.Attach(bitmap)) { return true; } } catch (...) { AfxMessageBox("LoadBmpPic catch!"); return false; } return true; }
png转CBitmap:
void LoadPngImageToBmp(CString& path, CBitmap* bm) { CImage img; img.Load(path); #if 0 HBITMAP hbmp = (HBITMAP)img.operator HBITMAP(); bm->DeleteObject(); bm->Attach(hbmp); #elif 1 bm->Attach(img.Detach()); #else HBITMAP hBitmap; hBitmap = img.Detach(); bm->Attach(hBitmap); #endif }