下面贴出的代码是用VC的向导生成的,《箴言》在消息循环一节中只给出了窗口处理函数的代码,可能是为了节约纸张,给大家省钱,网上嘛,我就多贴一点了,呵呵。 1 #include "stdafx.h" 2 #include "resource.h" 3 #include <stdio.h> 4 5 #define MAX_LOADSTRING 100 6 7 // Global Variables: 8 HINSTANCE hInst; // current instance 9 TCHAR szTitle[MAX_LOADSTRING]; // The title bar text 10 TCHAR szWindowClass[MAX_LOADSTRING]; // The title bar text 11 12 // Foward declarations of functions included in this code module: 13 ATOM MyRegisterClass(HINSTANCE hInstance); 14 BOOL InitInstance(HINSTANCE, int); 15 LRESULT CALLBACK WndProc(HWND, UINT, WPARAM, LPARAM); 16 LRESULT CALLBACK About(HWND, UINT, WPARAM, LPARAM); 17 18 int APIENTRY WinMain(HINSTANCE hInstance, 19 HINSTANCE hPrevInstance, 20 LPSTR lpCmdLine, 21 int nCmdShow) 22 { 23 // TODO: Place code here. 24 MSG msg; 25 HACCEL hAccelTable; 26 char str[256]; 27 static i = 0; 28 29 // Initialize global strings 30 LoadString(hInstance, IDS_APP_TITLE, szTitle, MAX_LOADSTRING); 31 LoadString(hInstance, IDC_TEST, szWindowClass, MAX_LOADSTRING); 32 MyRegisterClass(hInstance); 33 |
正在阅读:《编程高手箴言》读后感(3)《编程高手箴言》读后感(3)
2004-04-07 10:02
出处:CSDN
责任编辑:sdq
键盘也能翻页,试试“← →”键