随笔分类 -  C++

1 2 3 下一页
2017年感想
摘要:经历过三年的工作洗礼。发现到一个新环境,还是避免不了会和之前的老东家做对比。总在纠结自己是获得多呢,还是失去多。在Amap快一百天的感觉比较强烈。原来,真的有人用一年工作经验写了十年代码,原来工作对大部分人来说真的就是工作而已,永远在鼠目寸光中解决现有问题。原来在大公司里面,这些人压根不会影响项目进 阅读全文
posted @ 2017-06-04 16:18 叶城宇 阅读(513) 评论(0) 推荐(0)
chVsprintf
摘要:#if LINUX_SYSTEM int chVsprintf(LPSTR buffer, int nCount, LPCSTR format, va_list argptr) { return vsnprintf(buffer, nCount, format, argptr); } int chV 阅读全文
posted @ 2016-10-18 19:39 叶城宇 阅读(216) 评论(0) 推荐(0)
富文本测试
摘要:#include <string>using namespace std;string UTF8ToGBK(const std::string& strUTF8){ int len = MultiByteToWideChar(CP_UTF8, 0, strUTF8.c_str(), -1, NULL 阅读全文
posted @ 2016-10-09 15:32 叶城宇 阅读(1775) 评论(0) 推荐(0)
getWinSystemIcon
摘要:#include <QtGui/QImage>#include <QtGui/QPixmap>void getSystemIcon(const chConstStringA& fileType, xPixmap& dst){ if (fileType.empty()) { return; } CoI 阅读全文
posted @ 2016-09-28 15:30 叶城宇 阅读(235) 评论(0) 推荐(0)
alphaRGB 转 RGB、16位
摘要:struct xColor { BYTE b, g, r, a; }; struct RGBColor { BYTE b, g, r; }; //void operator <<(RGBColor& rgb, xColor& color) //{ // rgb.r = color.a * 1.0 / 阅读全文
posted @ 2016-06-22 17:17 叶城宇 阅读(349) 评论(0) 推荐(0)
图片缩放应用(nearest / bilinear / three-order interpolate)
摘要:typedef xPixel PIXELCOLORRGB; double Sinxx(double value){ if (value < 0) value = -value; if (value < 1.0) { float temp = value * value; return 0.5 * t 阅读全文
posted @ 2016-02-24 16:42 叶城宇 阅读(891) 评论(0) 推荐(0)
wini -- FileSubmitByFTP
摘要:// winFtpPutFiles.cpp : Defines the entry point for the console application.//#include "stdafx.h"#include using namespace std;#include#include#pragma ... 阅读全文
posted @ 2015-12-17 14:30 叶城宇 阅读(208) 评论(0) 推荐(0)
alphaBlend
摘要:// Alpha = srcAlpha + dstAlpha - srcAlpha * dstAlpha / 0xFF;// R = (srcR * srcAlpha + dstR * dstAlpha - dstR * dstAlpha * srcAlpha / 0xFF) / Alpha// G... 阅读全文
posted @ 2015-11-25 16:02 叶城宇 阅读(211) 评论(0) 推荐(0)
winAPI 检查系统设备拔插使用 WM_DEVICECHANGE 消息
摘要:if(message->message == WM_DEVICECHANGE) { /*if (message->wParam == DBT_DEVICEARRIVAL || message->wParam == DBT_DEVICEREMOVECOMPLETE) { PDEV_BROADC... 阅读全文
posted @ 2015-09-23 14:57 叶城宇 阅读(1713) 评论(0) 推荐(0)
windowsAPI popup trace tip(toolTip)
摘要:class UIHELPER_EXPORT ToolTipWindow : public chMessageHandler{ DECLARE_PROCESS_OBJECT(ToolTipWindow);public: bool updateTipText(const chConstStringA t... 阅读全文
posted @ 2015-08-18 11:14 叶城宇 阅读(493) 评论(0) 推荐(0)
解除win7系统静音
摘要:#ifdef SPEAKERDEVMUTECONTROL# define SPEAKERDEVMUTECONTROL_EXPORT __declspec(dllexport)#else# define SPEAKERDEVMUTECONTROL_EXPORT __declspec(dllimport... 阅读全文
posted @ 2015-07-27 10:13 叶城宇 阅读(614) 评论(0) 推荐(0)
temp--test audio micphone
摘要:DWORD CALLBACK waveInProc(HWAVEIN hWaveIn, UINT uMsg, DWORD dwInstance, DWORD dwParam1, DWORD dwParam2){ SYZ_TRACE("waveInProc:: hWaveIn: point[%p] u... 阅读全文
posted @ 2015-07-20 11:34 叶城宇 阅读(277) 评论(0) 推荐(0)
通过对象成员地址求对象本身地址
摘要:#include "stdafx.h"#include using namespace std;class Polygon{public: Polygon() {Draw();} void Draw() {}//coutmenber) + (unsigned int)pMenber))#define... 阅读全文
posted @ 2015-06-10 09:35 叶城宇 阅读(297) 评论(0) 推荐(0)
管理全局对象
摘要://manage exit ==>delete process objectclass chExitMethodList;typedef void (*msgExitMethod)();class ETLLIB_DLL_DECLARRE chExitMethodWrap{ friend class ... 阅读全文
posted @ 2015-05-28 09:00 叶城宇 阅读(185) 评论(0) 推荐(0)
UTF-8 <==> unicode(WCHAR)
摘要:1 static int fetchWordFromUTF8(const chConstStringA& strText, WCHAR& result) 2 { 3 int nLength = strText.length(); 4 if(nLength > 7) == 0x00)... 阅读全文
posted @ 2015-05-14 09:52 叶城宇 阅读(413) 评论(0) 推荐(0)
windows目录create、isExsit、remove
摘要:RemoveDirectoryA( __in LPCSTR lpPathName );PathFileExistsA(LPCSTR pszPath);CreateDirectoryA(strDirectoryName.c_str(), NULL);example://wPathMkdir... 阅读全文
posted @ 2015-03-12 10:31 叶城宇 阅读(370) 评论(0) 推荐(0)
验证reg注册表的操作
摘要:// wRegKeyclass wRegKey{ // Operationspublic: BOOL Create(HKEY hKeyParent, LPCTSTR lpszKeyName , LPTSTR lpszClass = REG_NONE , DWORD dwOptions = REG... 阅读全文
posted @ 2015-03-12 10:07 叶城宇 阅读(360) 评论(0) 推荐(0)
音频播放和录制检测
摘要:#ifndef __WWAVEHELPER_H__#define __WWAVEHELPER_H__#if !WINDOWS_SYSTEM#error only windows system supported#endif#include #pragma comment(lib, "winmm.li... 阅读全文
posted @ 2015-03-05 15:23 叶城宇 阅读(349) 评论(0) 推荐(0)
音频播放(小文件循环播放)
摘要://utility 读取内存可以是用该方法static LPSTR loadAudioBlock(char* filename, DWORD* blockSize){ HANDLE hFile= INVALID_HANDLE_VALUE; DWORD size = 0; DWORD readByt... 阅读全文
posted @ 2015-03-03 09:39 叶城宇 阅读(253) 评论(0) 推荐(0)
windows 里面waveOut*接口应用
摘要:#include #include #include /** some good values for block size and count*/#define BLOCK_SIZE 8192#define BLOCK_COUNT 20/** function prototypes*/ stati... 阅读全文
posted @ 2015-02-06 13:30 叶城宇 阅读(472) 评论(0) 推荐(0)

1 2 3 下一页