04 2012 档案

win32里玩事件-转
摘要:#include "stdafx.h"#include <stdio.h>#include <windows.h>#include <iostream>#include <process.h>#define UM_MSG1 WM_USER+1#define UM_MSG2 WM_USER+2DWORD WINAPI Thread1(LPVOID para){ DWORD dwThreadId = *(DWORD *)para; DWORD i=0; TCHAR *p; char strTmp[100]; while(TRUE) 阅读全文

posted @ 2012-04-07 22:06 chuncn 阅读(664) 评论(0) 推荐(0) 编辑

c++中捕捉内存泄露、异常
摘要://在Watch面板加上可以观察当前断点处最后一条异常信息:@err,hr#include "stdafx.h"#include <iostream>using namespace std;#ifdef _DEBUG#define DEBUG_CLIENTBLOCK new( _CLIENT_BLOCK, __FILE__, __LINE__)#else#define DEBUG_CLIENTBLOCK#endif#define _CRTDBG_MAP_ALLOC#include <stdlib.h>#include <crtdbg.h> 阅读全文

posted @ 2012-04-01 20:21 chuncn 编辑

导航