摘要: 使用DIB部分可直接快速访问像素 例如,此测试将记事本中的所有白色像素替换为绿色像素 HDC hDCScreen = GetDC(NULL); HWND hWndDest = FindWindow(L"Notepad", NULL); if (hWndDest) { if (IsIconic(hWn 阅读全文
posted @ 2020-01-14 13:31 strive-sun 阅读(423) 评论(0) 推荐(0) 编辑
摘要: StretchDIBits用来打印图像,但是由于某种未知的原因,当图像达到特定尺寸时,它会失败。 图像数据从其他一些图像源以24位BGR格式加载到无符号int数组中。它可以在某些大小下工作,但根本无法工作。 正在测试的当前尺寸为638x1014。如果将高度更改为1013,则可以正常工作,但由于某种原 阅读全文
posted @ 2020-01-13 17:19 strive-sun 阅读(314) 评论(0) 推荐(0) 编辑
摘要: 每次到用的时候就各种查资料,我这人记性又不好,遂记录下来: 普通的编辑控件: 创建:HWND hText = CreateWindowW(L"EDIT", L"enter some text", WS_VISIBLE | WS_CHILD | ES_RIGHT, 500, 100, 200, 100 阅读全文
posted @ 2020-01-09 15:07 strive-sun 阅读(1349) 评论(0) 推荐(0) 编辑
摘要: #define UNICODE #define _UNICODE #include <windows.h> #include <objidl.h> #include <gdiplus.h> #include <tchar.h> using namespace Gdiplus; //控件库以及相关宏 阅读全文
posted @ 2020-01-08 16:31 strive-sun 阅读(505) 评论(0) 推荐(0) 编辑
摘要: string bind = "Hello"; for (int i = 0; i < bind.length(); i++) { short ch = VkKeyScanA(bind[i]); if (((ch & 0xff00) >> 8) & 0x1) { std::cout<<" This i 阅读全文
posted @ 2019-12-26 09:36 strive-sun 阅读(510) 评论(0) 推荐(0) 编辑
摘要: #include <windows.h> LRESULT CALLBACK WndProc(HWND hWnd, UINT message, WPARAM wParam, LPARAM lParam); HBITMAP g_bmp; HBITMAP g_bmpMask; HBITMAP create 阅读全文
posted @ 2019-12-23 18:01 strive-sun 阅读(385) 评论(0) 推荐(0) 编辑
摘要: 使用Remove-Module -Name Functions2 只是移除当前会话的模块 并且Import-Module -Name Functions2与 Remove-Module -Name Functions2是相对应的,只有先import才能remove,不然会提示找不到模块 使用get- 阅读全文
posted @ 2019-12-23 16:46 strive-sun 阅读(1116) 评论(0) 推荐(0) 编辑
摘要: 根据测试 int main() { int a = 4; void *p = (void*)malloc(sizeof(100)); char *p1 = (char*)malloc(sizeof(100)); int n1 = sizeof(a); int n2 = sizeof(p); // i 阅读全文
posted @ 2019-12-20 16:51 strive-sun 阅读(1210) 评论(0) 推荐(0) 编辑
摘要: #include <stdio.h> #include <stdint.h> #include <stdlib.h> void hexDump(void *ptr, char *buf) { static char hex[16] = { '0', '1', '2', '3', '4', '5', 阅读全文
posted @ 2019-12-20 16:41 strive-sun 阅读(756) 评论(0) 推荐(0) 编辑
摘要: 如果是使用virtualenv,请确保已激活运行环境 不知道怎么激活的,请按以下步骤来: 尝试使用终端通过更改目录(cd)命令导航到包含虚拟环境的文件夹。到达后,尝试输入: source ./venv/Scripts/activate 另外,尝试打开venv文件夹,并确保您的激活文件位于“脚本”文件 阅读全文
posted @ 2019-12-19 13:29 strive-sun 阅读(1537) 评论(0) 推荐(0) 编辑