上一页 1 ··· 22 23 24 25 26 27 28 29 30 ··· 36 下一页
摘要: #include <string> #include <sstream> #include <iostream> int main() { std::wstring keyname = L"HKEY_LOCAL_MACHINE\\SOFTWARE\\Mozilla\\Firefox"; std::w 阅读全文
posted @ 2020-06-12 10:06 strive-sun 阅读(229) 评论(0) 推荐(0) 编辑
摘要: 滑动鼠标滚轮可以改变图像大小 #include <windows.h> #include <tchar.h> #include <Urlmon.h> // URLDownloadToCacheFile #pragma comment (lib, "Urlmon") #include <shlwapi 阅读全文
posted @ 2020-06-10 11:01 strive-sun 阅读(703) 评论(0) 推荐(0) 编辑
摘要: #include <string> void makebox(LPCSTR name) { std::string res(name); res += " is X"; ::MessageBoxA(nullptr, res.c_str(), res.c_str(), MB_OK); } 阅读全文
posted @ 2020-06-10 09:43 strive-sun 阅读(208) 评论(0) 推荐(0) 编辑
摘要: 创建半透明的窗口,以及在窗口上绘制不透明的文本 方法: 创建Bitmap具有PixelFormat32bppPARGB像素格式的GDI + 对象。 创建一个Graphics对象以绘制该Bitmap对象。 使用GDI +将所有图形绘制到该对象中。 销毁Graphics在步骤2中创建的对象。 GetHB 阅读全文
posted @ 2020-06-09 15:37 strive-sun 阅读(1617) 评论(0) 推荐(0) 编辑
摘要: 使用CreateDIBSection 可以创建一个设备无关位图 #include <windows.h> using namespace std; int main() { HDC hdc = GetDC(HWND_DESKTOP); HDC MemDC = CreateCompatibleDC(h 阅读全文
posted @ 2020-06-03 15:46 strive-sun 阅读(1057) 评论(0) 推荐(0) 编辑
摘要: 使用StretchDIBits将位图数据传输到printer的dc中 #include <Windows.h> #include <algorithm> int main() { int nWidth = 16, nHeight = 16; BYTE byteBitmap[768]; std::fi 阅读全文
posted @ 2020-06-03 14:52 strive-sun 阅读(428) 评论(0) 推荐(0) 编辑
摘要: 模拟键盘CTRL+S 的输入 using System; using System.Collections.Generic; using System.Diagnostics; using System.ComponentModel; using System.Runtime.InteropServ 阅读全文
posted @ 2020-05-28 13:51 strive-sun 阅读(817) 评论(0) 推荐(0) 编辑
摘要: 按下鼠标左键, 连击 按下鼠标右键, 停止 import win32api import time from pynput.mouse import Button, Controller mouse = Controller() while True: if (win32api.GetAsyncKe 阅读全文
posted @ 2020-05-26 17:47 strive-sun 阅读(1261) 评论(0) 推荐(0) 编辑
摘要: 主要用于日常的win32窗口的测试 #include <Windows.h> #include <stdio.h> #include <iostream> using namespace std; LRESULT CALLBACK WndProc(HWND hwnd, UINT message, W 阅读全文
posted @ 2020-05-26 10:30 strive-sun 阅读(239) 评论(0) 推荐(0) 编辑
摘要: BOOL bRet; while( (bRet = GetMessage( &msg, hWnd, 0, 0 )) != 0) { if (bRet == -1) { // handle the error and possibly exit } else { TranslateMessage(&m 阅读全文
posted @ 2020-05-21 17:23 strive-sun 阅读(665) 评论(0) 推荐(0) 编辑
上一页 1 ··· 22 23 24 25 26 27 28 29 30 ··· 36 下一页