当前位置:网站首页>Aardio - Method of self constructed geticonhandle
Aardio - Method of self constructed geticonhandle
2022-07-01 07:56:00 【Luguangqing】
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"]] ;
// The following is a self constructed method
/**
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;
**/
}
边栏推荐
- postgresql源码学习(26)—— Windows vscode远程调试Linux上的postgresql
- [MySQL learning notes 26] view
- Long way to go with technology
- Thesis learning -- Analysis and Research on similarity query of hydrological time series
- [R language] age sex frequency matching select samples for case-control study, and perform frequency matching on age and sex
- 力扣每日一题-第31天-202.快乐数
- getInputStream() has already been called for this request
- Vhost kick & call principle
- 2022茶艺师(初级)操作证考试题库及模拟考试
- Caesar
猜你喜欢

Latex table

The H5 page has set the font thickness style, but the wechat access style in Huawei mobile phone doesn't take effect?

Vhost kick & call principle
![[recommendation system] breakthrough and imagination of deep location interactive network dpin for meituan takeout recommendation scenario](/img/10/ed857892d2e0ea72e100a4008e6d69.png)
[recommendation system] breakthrough and imagination of deep location interactive network dpin for meituan takeout recommendation scenario

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

Custom events of components ①

PostgreSQL source code learning (26) -- windows vscode remote debugging PostgreSQL on Linux

Redisson uses the complete solution - redisson official documents + Notes (Part 1)
![[kv260] generate chip temperature curve with xadc](/img/fc/e5e4648b09b1123b2d494b75a9f8f7.png)
[kv260] generate chip temperature curve with xadc

How to check ad user information?
随机推荐
力扣每日一题-第31天-1790.仅执行一次字符串交换能否使两个字符串相等
H5 页面设置了字体的粗细样式,但是在华为手机里微信打开访问样式不生效?
[software] phantomjs screenshot
Introduction to kubernetes resource objects and common commands (II)
Aardio - 阴影渐变文字
Download xshell and xftp
Latex table
postgresql源码学习(26)—— Windows vscode远程调试Linux上的postgresql
【R语言】年龄性别频数匹配 挑选样本 病例对照研究,对年龄性别进行频数匹配
力扣每日一题-第31天-1502.判断能否形成等差数列
She is the "HR of others" | ones character
How to make the two financial transactions faster
php laravel微信支付
2022 Guangdong Provincial Safety Officer a certificate third batch (main person in charge) special operation certificate examination question bank simulated examination platform operation
源代码加密的意义和措施
Source code analysis of open source API gateway APIs IX
Oracle创建自增id
Atguigu---- scaffold --02- use scaffold (2)
如何让两融交易更极速
go通用动态重试机制解决方案的实现与封装