摘要: // 02 GDIDlg.cpp : 实现文件 // #include "stdafx.h" #include "02 GDI.h" #include "02 GDIDlg.h" #include "afxdialogex.h" #ifdef _DEBUG #define new DEBUG_NEW #endif // 用于应用程序“关于”菜单项的 CAboutDlg 对话框 clas... 阅读全文
posted @ 2016-03-24 21:13 天还是那么蓝 阅读(187) 评论(0) 推荐(0) 编辑
摘要: // wondows原理day002.cpp : 定义控制台应用程序的入口点。 // #include "stdafx.h" #include //3个全局事件对象句柄 HANDLE hEventA, hEventB, hEventC; //线程A DWORD WINAPI ThreadProc1(_In_ LPVOID lpParameter) { for (int i = ... 阅读全文
posted @ 2016-03-24 20:33 天还是那么蓝 阅读(155) 评论(0) 推荐(0) 编辑
摘要: #include #include BOOL APIENTRY DllMain(HMODULE hModule, // 模块句柄 DWORD ul_reason_for_call, // 调用原因 LPVOID lpReserved) // 保留 { s... 阅读全文
posted @ 2016-03-22 09:53 天还是那么蓝 阅读(169) 评论(0) 推荐(0) 编辑
摘要: // 09 Dll的显式链接.cpp : 定义控制台应用程序的入口点。 // #include "stdafx.h" #include typedef void(*PROC2)(); int _tmain(int argc, _TCHAR* argv[]) { //动态加载dll文件 HMODULE hModule= LoadLibrary(TEXT("... 阅读全文
posted @ 2016-03-22 09:52 天还是那么蓝 阅读(156) 评论(0) 推荐(0) 编辑
摘要: //checkbox getcheck() setcheck() //文本 void CMy03文本框Dlg::OnBnClickedButton1() { // TODO: 在此添加控件通知处理程序代码 m_ctrlEdit.SetWindowText(TEXT("asdhfadfajdfhj\r\nasdfasdf")); int n = m_ctrlEd... 阅读全文
posted @ 2016-03-22 09:50 天还是那么蓝 阅读(159) 评论(0) 推荐(0) 编辑
摘要: #include #include //变参函数 bool _trace(TCHAR *format, ...) { TCHAR buffer[1000]; va_list argptr; va_start(argptr, format); //将格式化信息写入指定的缓冲区 wvsprintf(buffer, format, argptr); ... 阅读全文
posted @ 2016-03-22 09:23 天还是那么蓝 阅读(96) 评论(0) 推荐(0) 编辑
摘要: // 07 邮槽-服务端.cpp : 定义控制台应用程序的入口点。 // #include "stdafx.h" #include int _tmain(int argc, _TCHAR* argv[]) { HANDLE hSlot = CreateMailslot(L"\\\\.\\mailslot\\mail", 0, MAI... 阅读全文
posted @ 2016-03-22 08:14 天还是那么蓝 阅读(264) 评论(0) 推荐(0) 编辑
摘要: LRESULT CALLBACK WndProc(HWND hWnd, UINT message, WPARAM wParam, LPARAM lParam) { int wmId, wmEvent; PAINTSTRUCT ps; HDC hdc; switch (message) { case WM_CREATE: ... 阅读全文
posted @ 2016-03-22 08:13 天还是那么蓝 阅读(272) 评论(0) 推荐(0) 编辑
摘要: // 03 结束一个进程Test.cpp : 定义控制台应用程序的入口点。 // #include "stdafx.h" int _tmain(int argc, _TCHAR* argv[]) { while (1) { printf("hehe"); } return 0; } // 03 结束一个进程.cpp : 定义控制台应用程序... 阅读全文
posted @ 2016-03-22 08:08 天还是那么蓝 阅读(186) 评论(0) 推荐(0) 编辑
摘要: // 01 错误处理.cpp : 定义控制台应用程序的入口点。 // #include "stdafx.h" #include #include void ShowErrorInfo(LPCTSTR lpErrInfo, UINT unErrCode, UINT unLine = __LINE__) // 示意,不能这么用 { LPTSTR lpMsgBuf = ... 阅读全文
posted @ 2016-03-22 08:06 天还是那么蓝 阅读(169) 评论(0) 推荐(0) 编辑