当前位置:网站首页>Aardio - 自己构造的getIconHandle的方法
Aardio - 自己构造的getIconHandle的方法
2022-07-01 07:50:00 【卢光庆】
getIconHandle = function(nIconWidth,nIconHeight){
nIconWidth := ::User32.GetSystemMetrics(0xB/*_SM_CXICON*/);
nIconHeight := ::User32.GetSystemMetrics(0xC/*_SM_CYICON*/);
var XorMask = ..gdip.bitmap(nIconWidth,nIconHeight);
var g1 = XorMask.getGraphics();
g1.drawImageStretch(_bitmap,::RECT(0,0,nIconWidth,nIconHeight));
g1.delete();
var _,h = ::Gdiplus.GdipCreateHICONFromBitmap(XorMask[["pBitmap"]],{ptr h});
XorMask.dispose();
return h[["h"]] ;
//以下是自己构造的方法
/**
nIconWidth := ::User32.GetSystemMetrics(0xB/*_SM_CXICON*/);
nIconHeight := ::User32.GetSystemMetrics(0xC/*_SM_CYICON*/);
var AndMask = ..gdip.bitmap(nIconWidth,nIconHeight);
var g = AndMask.getGraphics();
g.clear(0xFF000000);
g.delete();
var XorMask = ..gdip.bitmap(nIconWidth,nIconHeight);
var g1 = XorMask.getGraphics();
g1.drawImageStretch(_bitmap,::RECT(0,0,nIconWidth,nIconHeight));
g1.delete();
class TIconInfo {
bool fIcon = true;
INT xHotspot = 0;
INT yHotspot = 0;
ptr hbmMask;
ptr hbmColor;
};
var IconInfo = TIconInfo();
IconInfo.hbmMask = AndMask.copyHandle();
IconInfo.hbmColor = XorMask.copyHandle();
var h = ::User32.CreateIconIndirectP(IconInfo);
AndMask.dispose();
XorMask.dispose();
::DeleteObject(IconInfo.hbmMask);
::DeleteObject(IconInfo.hbmColor);
return h;
**/
}
边栏推荐
- What information does the supplier need to know about Audi EDI project?
- SharePoint - how to quickly check whether SharePoint is standard or enterprise edition?
- 【R语言】年龄性别频数匹配 挑选样本 病例对照研究,对年龄性别进行频数匹配
- redisson使用全解——redisson官方文档+注释(下篇)
- 三极管是一项伟大的发明
- 十大劵商如何开户?另外,手机开户安全么?
- Significance and measures of source code encryption
- Android screen adaptation (using constraintlayout), kotlin array sorting
- [chapter 72 of the flutter problem series] a solution to the problem that pictures taken in the flutter using the camera plug-in are stretched
- 2022 Guangdong Provincial Safety Officer a certificate third batch (main person in charge) special operation certificate examination question bank simulated examination platform operation
猜你喜欢

Thesis learning -- Analysis and Research on similarity query of hydrological time series

2022危险化学品经营单位主要负责人试题及模拟考试

TodoList经典案例①

2022 electrician (intermediate) recurrent training question bank and answers
![[batch dos-cmd command - summary and summary] - Common operators in the CMD window (<, < <, & <,>, > >, & >, & >, & &, ||, (),;, @)](/img/48/de19e8cc007b93a027a906d4d423b2.png)
[batch dos-cmd command - summary and summary] - Common operators in the CMD window (<, < <, & <,>, > >, & >, & >, & &, ||, (),;, @)

Redisson uses the complete solution - redisson official documents + Notes (Part 1)

2022 test questions and mock examinations for main principals of hazardous chemicals business units

redisson使用全解——redisson官方文档+注释(上篇)

LM08丨网格系列之网格反转(精)

Eigen矩阵运算库快速上手
随机推荐
Do securities account opening affect the security of account opening
Todolist classic case ①
C# Newtonsoft. Use of job in JSON
Li Kou daily question - Day 32 -1822 Symbol of array element product
AUTOSAR learning record (1) – ECUM_ Init
2022年流动式起重机司机考试练习题及在线模拟考试
【mysql学习笔记28】存储函数
Detailed explanation of weback5 basic configuration
How to use layui to display the data in the database in the form of tables
Eigen matrix operation Library
matlab保存DB4i深度相机图片
Redisson utilise la solution complète - redisson Documents officiels + commentaires (Partie 1)
Introduction to kubernetes resource objects and common commands (II)
2022 test question bank and simulation test of tea master (primary) operation certificate
Wang Yingqi, founder of ones, talks to fortune (Chinese version): is there any excellent software in China?
【mysql学习笔记27】存储过程
QT -- 1. QT connection database
Jax's deep learning and scientific computing
She is the "HR of others" | ones character
Download xshell and xftp