11 2022 档案
摘要:遇到个需要将两个std::tuple对应元素分别求平均值的需求 实现 #include <iostream> #include <tuple> template <typename T, size_t S = 0, size_t E = std::tuple_size<T>::value> void
阅读全文
摘要:uchar *bits = nullptr; void initBuff(size_t size) { if (bits == nullptr) { bits = new uchar[size]; } } void releaseBuff() { if (bits != nullptr) { del
阅读全文
摘要:https://blog.csdn.net/qq_44575789/article/details/127935697像素处理太慢,这里换种方式 #pragma once #include <QDebug> #include <QImage> #include <QTimer> #include <
阅读全文
摘要:创建并获取窗口句柄 view->show(); view->createWinId(); auto wid = view->winId(); 获取图片 // 三秒钟之后 QTimer::singleShot(3000, [wid]() { auto&& image = GetGDIBitmap((H
阅读全文
摘要:代码示例 https://download.csdn.net/download/qq_44575789/86993010 CToolBar类 实现 加载位图的成员变量 CToolBar m_ToolBar; CBitmap m_bitmapEmpty; CBitmap m_bitmap1; CBit
阅读全文
摘要:解决方法 将单例对象初始化放入.cpp文件 示例 Fun.h #ifdef FUN_EXPORTS #define FUN_API __declspec(dllexport) #else #define FUN_API __declspec(dllimport) #endif #include <i
阅读全文