摘要: // #include <vcl.h> #pragma hdrstop #include "Unit1.h" // #pragma package(smart_init) #pragma resource "*.dfm" TForm1 *Form1; class CAppleDemo { publi 阅读全文
posted @ 2020-10-21 15:36 leochan007 阅读(184) 评论(0) 推荐(0)
摘要: void CaptureWindow(HWND hWnd, CString strFilePath) { CRect rect; ::GetWindowRect(hWnd, &rect); // 获取窗口位置和大小(包括边框) HDC hWindowDC = GetWindowDC(hWnd); H 阅读全文
posted @ 2026-05-13 14:03 leochan007 阅读(4) 评论(0) 推荐(0)
摘要: #include <iostream> #include <cstdarg> #include <cstdio> #include <memory> // LogImpl 只负责输出最终字符串(不再处理 format + va_list) void LogImpl(const char* messa 阅读全文
posted @ 2026-05-12 17:02 leochan007 阅读(2) 评论(0) 推荐(0)
摘要: #include <iostream> // 定义标志位 #define FLAG_A (1 << 0) // 0000 0001 #define FLAG_B (1 << 1) // 0000 0010 #define FLAG_C (1 << 2) // 0000 0100 #define FL 阅读全文
posted @ 2026-04-24 17:46 leochan007 阅读(3) 评论(0) 推荐(0)
摘要: #include <iostream> #include <map> int main() { std::map<int, int> myMap = { {1, 100}, {2, 200}, {3, 300} }; void* ptr = &myMap; // 安全转换 + 检查 if (!ptr 阅读全文
posted @ 2025-05-26 11:17 leochan007 阅读(27) 评论(0) 推荐(0)
摘要: #include <iostream> #include <chrono> #include <ctime> #include <iomanip> #include <sstream> int main() { // 获取当前时间点 auto now = std::chrono::system_cl 阅读全文
posted @ 2025-01-23 16:36 leochan007 阅读(32) 评论(0) 推荐(0)
摘要: #define STRINGIFY(x) #x int someVariable = 10; std::cout << STRINGIFY(someVariable) << " = " << someVariable << std::endl; 阅读全文
posted @ 2024-12-27 11:37 leochan007 阅读(16) 评论(0) 推荐(0)
摘要: #include <iostream> #include <sstream> #include <iomanip> #include <ctime> bool compareTimeStrings(const std::string& timeStr1, const std::string& tim 阅读全文
posted @ 2024-12-24 15:47 leochan007 阅读(51) 评论(0) 推荐(0)
摘要: #include <stdio.h> void print_binary(unsigned int n) { for (int i = sizeof(n) * 8 - 1; i >= 0; i--) { printf("%d", (n >> i) & 1); } printf("\n"); } vo 阅读全文
posted @ 2024-12-12 17:51 leochan007 阅读(21) 评论(0) 推荐(0)
摘要: // 获取某个进程ID DWORD GetTaskManagerProcessId() { DWORD taskManagerProcessId = 0; PROCESSENTRY32 pe32; pe32.dwSize = sizeof(PROCESSENTRY32); HANDLE hProce 阅读全文
posted @ 2024-03-20 17:48 leochan007 阅读(34) 评论(0) 推荐(0)
摘要: Computed properties are unique data types that will reactively update only when the source data used within the property is updated. By defining a dat 阅读全文
posted @ 2024-02-18 08:57 leochan007 阅读(68) 评论(0) 推荐(0)