随笔分类 -  window核心

摘要:BOOL C守护者1号Dlg::OnInitDialog() { CDialogEx::OnInitDialog(); // 将“关于...”菜单项添加到系统菜单中。 // IDM_ABOUTBOX 必须在系统命令范围内。 ASSERT((IDM_ABOUTBOX & 0xFFF0) == IDM_ABOUTBOX); ASSERT(IDM_ABOUT... 阅读全文
posted @ 2016-03-24 21:25 天还是那么蓝 阅读(426) 评论(0) 推荐(0)
摘要:#pragma once #include "afxcmn.h" #include using std::vector; // CDlgModule 对话框 class CDlgModule : public CDialogEx { DECLARE_DYNAMIC(CDlgModule) public: CDlgModule(CWnd* pParent = NULL); ... 阅读全文
posted @ 2016-03-24 21:22 天还是那么蓝 阅读(241) 评论(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 天还是那么蓝 阅读(162) 评论(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 天还是那么蓝 阅读(106) 评论(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 天还是那么蓝 阅读(278) 评论(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 天还是那么蓝 阅读(283) 评论(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 天还是那么蓝 阅读(193) 评论(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 天还是那么蓝 阅读(183) 评论(0) 推荐(0)
摘要:#pragma once // CMyListCtrll class CMyListCtrll : public CListCtrl { DECLARE_DYNAMIC(CMyListCtrll) public: CMyListCtrll(); virtual ~CMyListCtrll(); void InsertCol(DWORD dwCount, .... 阅读全文
posted @ 2016-03-22 08:04 天还是那么蓝 阅读(337) 评论(0) 推荐(0)
摘要:// 遍历进程Dlg.cpp : 实现文件 // #include "stdafx.h" #include "遍历进程.h" #include "遍历进程Dlg.h" #include "afxdialogex.h" #include #include #include #include "MyListCtrll.h" #ifdef _DEBUG #define new DEBUG_N... 阅读全文
posted @ 2016-03-22 08:03 天还是那么蓝 阅读(1902) 评论(0) 推荐(0)
摘要:// windows原理001.cpp : 定义控制台应用程序的入口点。 // #include "stdafx.h" #include //宽字符转为多字符(Unicode-->ASCⅡ) #define WCHAR_TO_CHAR(lpW_Char,lpChar) WideCharToMultiByte(CP_ACP,NULL,lpW_Char,-1,lpChar,_countof(lpC... 阅读全文
posted @ 2016-03-21 19:21 天还是那么蓝 阅读(187) 评论(0) 推荐(0)