上一页 1 ··· 7 8 9 10 11 12 13 14 15 ··· 20 下一页
摘要: 先获取控件的高、宽,然后获取图像的高、宽,测试需要调整高还是调整宽 void CImagePreviewStatic::DrawItem(LPDRAWITEMSTRUCT /*lpDrawItemStruct*/) { Unit units; CRect rect; if (m_img2 != NU 阅读全文
posted @ 2019-07-05 15:15 日月王 阅读(267) 评论(0) 推荐(0)
摘要: #include "crypto/encode/base64.h" static const std::string base64_chars = "ABCDEFGHIJKLMNOPQRSTUVWXYZ" "abcdefghijklmnopqrstuvwxyz" "0123456789+/"; st 阅读全文
posted @ 2019-07-04 09:32 日月王 阅读(890) 评论(1) 推荐(0)
摘要: GITHUB链接:https://github.com/brofield/simpleini 主体代码: /** @mainpage <table> <tr><th>Library <td>SimpleIni <tr><th>File <td>SimpleIni.h <tr><th>Author < 阅读全文
posted @ 2019-07-03 18:31 日月王 阅读(729) 评论(0) 推荐(0)
摘要: 最近遇到一个要求,将原来的OCX控件,替换成直接的DLL调用。 遇到OLE的事件回调,写了三个宏,用于简化代码 #define OLE_ENVENT_IN_CLASS_ONE(event_name, func_ret_type, param_type , param_name) \ public: 阅读全文
posted @ 2019-07-03 10:15 日月王 阅读(316) 评论(0) 推荐(0)
摘要: void base64_encode_s(const unsigned char *str, long inlen, std::string& outstr, long* lpBufLen) { long len; long str_len; //unsigned char *res; //std: 阅读全文
posted @ 2019-07-02 09:40 日月王 阅读(630) 评论(0) 推荐(0)
摘要: CString GetSuffix(CString strFileName) { return strFileName.Right(strFileName.GetLength()-strFileName.ReverseFind('.')-1); } std::string GetSuffix(con 阅读全文
posted @ 2019-07-02 09:35 日月王 阅读(400) 评论(0) 推荐(0)
摘要: BOOL GetFullTempFileName(const TCHAR* strPrefix, std::wstring& strFullName) { TCHAR strTempFolder[MAX_PATH]; TCHAR strTempFileName[MAX_PATH]; DWORD dw 阅读全文
posted @ 2019-07-02 09:34 日月王 阅读(550) 评论(0) 推荐(0)
摘要: std::string& str_toupper(std::string& s) { std::transform(s.begin(), s.end(), s.begin(), [](unsigned char c){ return ::toupper(c); } // correct ); ret 阅读全文
posted @ 2019-07-02 09:34 日月王 阅读(740) 评论(0) 推荐(0)
摘要: std::string& ltrim(std::string& str, const std::string& chars = "\t\n\v\f\r "); std::string& rtrim(std::string& str, const std::string& chars = "\t\n\ 阅读全文
posted @ 2019-07-02 09:33 日月王 阅读(403) 评论(0) 推荐(0)
摘要: unsigned char HEX2BYTE(unsigned char hex_ch) { if (hex_ch >= '0' && hex_ch <= '9') { return hex_ch - '0'; } if (hex_ch >= 'a' && hex_ch <= 'f') { retu 阅读全文
posted @ 2019-07-02 09:31 日月王 阅读(1580) 评论(0) 推荐(0)
上一页 1 ··· 7 8 9 10 11 12 13 14 15 ··· 20 下一页