1,Win32 Console程序示例:

《深入浅出MFC》笔记(三)#include <windows.h>
《深入浅出MFC》笔记(三)#include 
<stdio.h>
《深入浅出MFC》笔记(三)#include 
<string.h>
《深入浅出MFC》笔记(三)#include 
<conio.h>
《深入浅出MFC》笔记(三)
《深入浅出MFC》笔记(三)
const int FILEMAX  = 300;  // allow max. 300 files in each directory
《深入浅出MFC》笔记(三)

《深入浅出MFC》笔记(三)typedef 
struct _DESTFILE

2String型转换为LPWSTR

TextOut中想直接输出一个string型不行,它参数非得是一个LPWSTR,解决的办法是MultiByteToWideCharMultiByteToWideChar 函数可以把普通字符串转换为一个宽字符字符串(Unicode

《深入浅出MFC》笔记(三)LONG OnPaint(HWND hWnd,UINT nMessage,WPARAM wParam,LPARAM lParam)

3,对上一节的代码进行修改,加入一个新的功能,使得能从菜单呼出系统中的记事本

首先修改命令映射表

《深入浅出MFC》笔记(三)MSGMAP_ENTRY _commandEntries[] = 

再添加一个处理函数,在函数中创建一个记事本进程:

《深入浅出MFC》笔记(三)LONG OnNoteBook(HWND hWnd,UINT nMessage,WPARAM wParam,LPARAM lParam)

4,新开一个线程获取系统时间

《深入浅出MFC》笔记(三)case IDM_GETSYSTIME:

相关文章: