当前位置:网站首页>ELS square display principle
ELS square display principle
2022-07-27 04:32:00 【joker_ 0030】
#include"els_h.h"
// Background array
int g_arrBackGroud[20][10] = {0};
void OnPaint(HDC hDc)
{
// Create compatibility DC.
HDC hMemDC = CreateCompatibleDC(hDc);// Memory id by :HMemDc, window id hDc.
// Create compatibility bitmap .
HBITMAP hBitmapBack= CreateCompatibleBitmap(hDc, 500, 600);
// Connect .
SelectObject(hMemDC, hBitmapBack);
PaintSqare(hMemDC);
// Pass on :
// Return value : Failure to return 0, Successfully returned non-zero .
// Parameters 1: The goal is DC, window DC
// Parameters 2,3: The starting position of the target , Attention is based on our window .
// Parameters 4,5: The size of the area .
// Parameters 6: Source DC, That is, our memory DC.
// Parameters 7,8: The starting position of the memory picture .
// Parameters 9: delivery .
//
BitBlt(hDc, 0, 0, 300, 600, hMemDC, 0, 0, SRCCOPY);
// Release DC
DeleteObject(hBitmapBack);
DeleteDC(hMemDC);
}
void Oncreate()
{
}
void PaintSqare(HDC hMemDC)
{
int i = 0,
j = 0;
// Draw a big square .
Rectangle(hMemDC, 0, 0, 300, 600);// The coordinates of the starting position and the ending position of the rectangular box from the running window .
// Specify a square . test .
g_arrBackGroud[2][4] = 1;
g_arrBackGroud[3][3] = 1;
g_arrBackGroud[3][4] = 1;
g_arrBackGroud[3][5] = 1;
// Traverse
for (i =0; i < 20; i++)
{
for (j=0 ; j < 10; j++)
{
if (1 == g_arrBackGroud[i][j])
{
// Draw squares .
Rectangle(hMemDC, j*30, i*30, j * 30+30, i * 30+30);// The coordinates of the starting position and the ending position of the rectangular box from the running window .
}
}
}
}
边栏推荐
- Convolution neural network -- convolution of gray image
- 可视化领域 SVG
- shel自动设置目录权限
- Introduction to regular expressions of shell, general matching, special characters: ^, $,., * Character range (brackets): [], special characters: \, matching mobile phone number
- Ribbon load balancing strategy and configuration, lazy loading and hungry loading of ribbon
- timestamp列使用varchar类型和使用date类型有什么区别?
- Standard C language 11
- Ribbon load balancing principle and some source codes
- Brightcove任命Dan Freund为首席营收官
- Okaleido生态核心权益OKA,尽在聚变Mining模式
猜你喜欢

Database leader Wang Shan: strive for innovation and carefully Polish high-quality database products

Shel automatically sets directory permissions

微服务化解决文库下载业务问题实践
![Shell中的文本处理工具、cut [选项参数] filename 说明:默认分隔符是制表符、awk [选项参数] ‘/pattern1/{action1}filename 、awk 的内置变量](/img/ed/941276a15d1c4ab67d397fb3286022.png)
Shell中的文本处理工具、cut [选项参数] filename 说明:默认分隔符是制表符、awk [选项参数] ‘/pattern1/{action1}filename 、awk 的内置变量

spark练习案例(升级版)

JMeter learning notes 004-csv file line number control cycle times

一张图看懂KingbaseES V9

管理信息系统期末复习

无有线网络下安装并配置debian

Convolution neural network -- a detailed introduction to convolution of 24 bit color images
随机推荐
Learning route from junior programmer to architect + complete version of supporting learning resources
Do you know about wechat merchant billing?
DINO 论文精度,并解析其模型结构 & DETR 的变体
Which securities company has the lowest handling charge? Is it safe to open an account on your mobile phone
Plato farm has a new way of playing, and the arbitrage eplato has secured super high returns
第二轮Okaleido Tiger即将登录Binance NFT,或持续创造销售神绩
JS three methods of traversing arrays: map, foreach, filter
P1438 boring sequence line segment tree + difference
微服务的feign调用header头被丢弃两种解决方案(附源码)
Brightcove appoints Dan Freund as chief revenue Officer
xxx is not in the sudoers file. This incident will be reported
Playwright web crawler actual battle case sharing
Why does genericservlet have two init methods
ROS camera calibration sensor_ Msgs/camerainfo message data type and meaning
Wechat applet rotation map
BigDecimal pit summary & Best Practices
【小样本分割】MSANet: Multi-Similarity and Attention Guidance for Boosting Few-Shot Segmentation
Shell的正则表达式入门、常规匹配、特殊字符:^、$、.、*、字符区间(中括号):[ ]、特殊字符:\、匹配手机号
Word/excel has a fixed table size. When filling in the content, the table does not change with the cell content
The data in echart histogram is displayed at the top of the chart