• 博客园logo
  • 会员
  • 众包
  • 新闻
  • 博问
  • 闪存
  • 赞助商
  • HarmonyOS
  • Chat2DB
    • 搜索
      所有博客
    • 搜索
      当前博客
  • 写随笔 我的博客 短消息 简洁模式
    用户头像
    我的博客 我的园子 账号设置 会员中心 简洁模式 ... 退出登录
    注册 登录
cwbcwb505
博客园    首页    新随笔    联系   管理    订阅  订阅
2008年12月8日
VC中进程与进程之间共享内存
摘要: 进程A写数据,进程B读数据; 进程A: #include "stdafx.h" #include #include using namespace std; int _tmain(int argc, _TCHAR* argv[]) { HANDLE lhShareMemory; char* lpBuffer = NULL; lhShareMemory = CreateFileMapp... 阅读全文
posted @ 2008-12-08 16:49 代码之路 阅读(5332) 评论(1) 推荐(1)
2008年12月3日
让程序只有一个实例运行
摘要: 现在只知道两种方法; 1利用mutex对像: #include "stdafx.h" #include #include using namespace std; int _tmain(int argc, _TCHAR* argv[]) { HANDLE lhMutex; lhMutex = CreateMutex(NULL, false, "myInstance"); if (... 阅读全文
posted @ 2008-12-03 12:14 代码之路 阅读(327) 评论(0) 推荐(0)
Edit Control中追加文字
摘要: ((CEdit*)GetDlgItem(IDC_EDIT1))->SetSel(GetDlgItem(IDC_EDIT1)->GetWindowTextLength(), GetDlgItem(IDC_EDIT1)->GetWindowTextLength()); ((CEdit*)GetDlgItem(IDC_EDIT1))->ReplaceSel("追加文字\n"); //(IDC_E... 阅读全文
posted @ 2008-12-03 11:20 代码之路 阅读(1323) 评论(0) 推荐(0)
2008年11月26日
经典SQL语句使用范例
摘要: 1、说明:复制表(只复制结构,源表名:a 新表名:b) (Access可用) 法一:select * into b from a where 11 //a必须是已经存在的表,但是b可以不存在,当b不存在时,系统会自己创建表b,该方法只会复制表的结构,而不会复制表的数据 法二:select top 0 * into b from a //a必须是已经存在的表,但是b可以不存在... 阅读全文
posted @ 2008-11-26 14:38 代码之路 阅读(354) 评论(0) 推荐(1)
string和wstring相互转换
摘要: 第一种方法:调用WideCharToMultiByte()和MultiByteToWideChar(),代码如下(关于详细的解释,可以参考《windows核心编程》): #include #include using namespace std; //Converting a WChar string to a Ansi string std::string WChar2Ansi(LPCWST... 阅读全文
posted @ 2008-11-26 14:09 代码之路 阅读(9736) 评论(3) 推荐(1)
博客园  ©  2004-2025
浙公网安备 33010602011771号 浙ICP备2021040463号-3