当前位置:网站首页>MFC picture control
MFC picture control
2022-07-26 10:51:00 【Forest_ one thousand and ten】
Picture control can display pictures , Its essence is CStatic class , Only need to create dwStyle Make style SS_BITMAP that will do .
First step : Define in the dialog class :
CStatic m_picture;
The second step : In the dialog class OnInitDialog Function :
m_picture.Create(L"XX",WS_CHILD|WS_VISIBLE|WS_BORDER|SS_BITMAP,
CRect(100,100,300,300),this,10000);// Create the picture control
// Parameters 1: Write casually , It won't show
// Parameters 2:dwStyle Make style SS_BITMAP
// Parameters 3: Picture display area Top left coordinates (100,100) The lower right corner (300,300)
// Parameters 4: The parent window ,this Refers to the dialog window
The third step : Add a bitmap resource
Step four : Load bitmap for picture control
HBITMAP hBmp=LoadBitmap(AfxGetInstanceHandle(),// Instance handle
MAKEINTRESOURCE(IDB_BITMAP1_ONE));// Load bitmap through resources
m_picture.SetBitmap(hBmp);
If the picture is too big , It cannot be completely displayed , have access to DC Drawing realizes the scaling of pictures .
边栏推荐
- Shell script fails to execute repeatedly automatically
- 解决:无法加载文件 C:\Users\user\AppData\Roaming\npm\npx.ps1,因为在此系统上禁止运行脚本 。
- 面试知识点
- 使用float实现左中右布局,中间内容自适应
- [leetcode daily question 2021/2/14]765. Lovers hold hands
- Sword finger offer (8): jump the steps
- [machine learning notes] [face recognition] deeplearning ai course4 4th week programming
- 在神州IV开发板上为STemWin 5.22加入触屏驱动
- MFC中0x003b66c3 处有未经处理的异常: 0xC000041D: 用户回调期间遇到未经处理的异常
- 公司项目中的biz层和manager层是干啥的
猜你喜欢

Wechat official account message notice "errCode": 40164, "errmsg": "invalid IP

Flutter编译报错 version of NDK matched the requested version 21.0.6113669. Versions available locally: 2

The problem of formatting IAR sprintf floating point to 0.0 in UCOS assembly

344.反转字符串

按二进制数中1的个数分类

在altium designer中禁用USBJATG
![[leetcode daily question 2021/4/23]368. Maximum divisible subset](/img/0b/32ca862963c842a93f79eaac94fb98.png)
[leetcode daily question 2021/4/23]368. Maximum divisible subset
![[machine learning notes] [face recognition] deeplearning ai course4 4th week programming](/img/7e/9c0e88097b90c0c24ebf86f090805b.png)
[machine learning notes] [face recognition] deeplearning ai course4 4th week programming

0x00007FFD977C04A8 (Qt5Sqld.dll)处(位于 a.exe 中)引发的异常: 0xC0000005: 读取位置 0x0000000000000010 时发生访问冲突

Sql Server 数据库之数据类型
随机推荐
list升序和降序
During the interview, how did the interviewer evaluate the level of rust engineers?
Software Testing Overview: the background, essence and process of software testing
Sql Server 数据库之初学体验
很多人都不清楚自己找的是Kanban软件还是看板软件
flutter dart生成N个区间范围内不重复随机数List
Add touch screen driver for stemwin 5.22 on Shenzhou IV development board
RT thread learning notes (VIII) -- start the elmfat file system based on SPI flash (Part 2)
Analysis of C # delegation and anonymous method
toolstrip 去边框
Bash shell学习笔记(四)
Pengge C language sixth class
Bash shell学习笔记(六)
IAR sprintf 浮点 在UCOS 总格式化成0.0的问题
The assignment of member pointer defined in C structure and the use of structure pointer as member function parameter
Tutorial of putty
Wechat official account message notice "errCode": 40164, "errmsg": "invalid IP
MFC中0x003b66c3 处有未经处理的异常: 0xC000041D: 用户回调期间遇到未经处理的异常
企鹅龙(DRBL)无盘启动+再生龙(clonezilla)网络备份与还原系统
Sword finger offer (V): queue with two stacks