2013年11月7日

SHBrowseForFolder指定初始化显示的目录

摘要: int BrowseCallbackProc(HWND hwnd, UINT msg, LPARAM lp, LPARAM pData) { // m_strInitDir为初始化目录 if (!m_strInitDir.empty()) { if (msg == BFFM_INITIALIZED) { ::SendMessage(hwnd,BFFM_SETEXPANDED,TRUE,(LPARAM)m_strInitDir.c_str()); } else if (msg == BFFM_... 阅读全文

posted @ 2013-11-07 14:00 夜曲2005 阅读(725) 评论(0) 推荐(0) 编辑

2013年10月24日

多线程任务队列的实现

摘要: 1 #include 2 #include 3 #include 4 #include 5 6 7 struct Task 8 { 9 std::string str;10 };11 12 class QueueTest13 {14 public:15 QueueTest(void)16 {17 }18 ~QueueTest(void)19 {20 }21 22 public:23 void Put(const Task& item)24 {25 boost::mutex::scoped_lo... 阅读全文

posted @ 2013-10-24 13:30 夜曲2005 阅读(264) 评论(0) 推荐(0) 编辑

2013年9月25日

写注册表实现应用程序关联指定的后缀文件

只有注册用户登录后才能阅读该文。 阅读全文

posted @ 2013-09-25 16:10 夜曲2005 阅读(23) 评论(0) 推荐(0) 编辑

2013年9月24日

C++与lua之间的双向表交互

摘要: C++创建表结构代码: 1 std::map mapInfo; 2 lua_newtable(pLua); 3 for(std::map::iterator pos=mapInfo.begin(); pos!=mapInfo.end(); ++pos) 4 { 5 std::string keyUTF8 = TString::fromUtf16(pos->first).ToUtf8(); 6 std::string valueUTF8 = TString::fromUtf16(pos->second).ToUtf8(); 7 lua_pushstring(pLua, k... 阅读全文

posted @ 2013-09-24 11:31 夜曲2005 阅读(430) 评论(0) 推荐(0) 编辑

导航