c++
JasonRight
这个作者很懒,什么都没留下…
展开
-
截取中文输入法输入的字符串,更改编码为ANSI
在全英文的XP中,在非unicode的程序中输入的中文会转为“??”。 通过截获WM_IME_COMPOSITION消息得到输入的字符串 ImmGetCompositionStringW得到Unicode WideCharToMultiByte转换为ANSI [code="c++"] BOOL CchartestDlg::PreTranslateMessage(MSG* pMsg...2008-04-29 12:23:24 · 590 阅读 · 0 评论 -
boost库的常用用法
class Shape class Triangle : public Shape 1.shared_ptr 定义类: [code="c++"] typedef boost::shared_ptr ShapeSharedPtr; [/code] 实例化: [code="c++"] ShapeSharedPtr shapeSP = ShapeSharedPtr(new Sh...2008-05-07 23:00:53 · 372 阅读 · 0 评论 -
回调函数的用法
在要调用回调函数的类中声明: [code="c++"] CallFun.h //返回类型为void, 参数类型为std::string typedef void(*PCALLBACKFunc) (std::string ); class CallFun{ private: PCALLBACKFunc m_pCallBack; public: voi...2008-05-08 10:54:13 · 319 阅读 · 0 评论