当前位置:网站首页>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 .
}
}
}
}
边栏推荐
- P1438 boring sequence line segment tree + difference
- sram、dram、sdram、ddr的区别和用途
- 结构型模式-装饰者模式
- 深度剖析 —— 动态内存管理
- [machine learning network] BP neural network and deep learning-6 deep neural networks (DNN)
- Ant JD Sina 10 architects 424 page masterpiece in-depth distributed cache from principle to practice pdf
- Overview of communication protocols
- [Code] sword finger offer 04 search in two-dimensional array
- 安全第四次课后练习
- Navicat exports Mysql to table structure and field description
猜你喜欢

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

The data in echart histogram is displayed at the top of the chart

2022-07-26:以下go语言代码输出什么?A:5;B:hello;C:编译错误;D:运行错误。 package main import ( “fmt“ ) type integer in

Unity:Resource Merging、Static Batching、Dynamic Batching、GPU Instancing
![[Code] sword finger offer 04 search in two-dimensional array](/img/7d/a6693bfd24af9d9587539dda458d27.png)
[Code] sword finger offer 04 search in two-dimensional array

Deep analysis - dynamic memory management

Rust:axum learning notes (1) Hello World

Elastic open source community: Developer Recruitment

一张图看懂KingbaseES V9

BSN IPFS(星际文件系统)专网简介、功能、架构及特性、接入说明
随机推荐
Unity:Resource Merging、Static Batching、Dynamic Batching、GPU Instancing
好用的shell快捷键
There are two solutions for the feign call header of microservices to be discarded (with source code)
[machine learning network] BP neural network and deep learning-6 deep neural networks (DNN)
华为入局商用市场:趋势使然,挑战颇多
VSCode开启Pull Request更新代码分支可视化新篇章
sed输出指定行
P1438 boring sequence line segment tree + difference
Eureka service registry
结构型模式-外观(Facade)模式
法解析的外部符号 “public: virtual __cdecl nvinfer1::YoloLayerPlugin::~YoloLayerPlugin(void)“ “public: virtua
[competition reference] pytorch common code snippet and operation collection
Word/Excel 固定表格大小,填写内容时,表格不随单元格内容变化
Influxdb basic understanding
【机器学习网络】BP神经网络与深度学习-6 深度神经网络(deep neural Networks DNN)
Brightcove appoints Dan Freund as chief revenue Officer
Standard C language 13
Ref Hook
People don't talk much, engineers don't talk much
【软件工程期末复习】知识点+大题详解(E-R图、数据流图、N-S盒图、状态图、活动图、用例图....)