Package WinApp

xiaoxiao2021-03-06  75

/ * Name: WinApp.h Copyright: (C) Huyoo, Changsha, Hunan Province, China Author: huyoo date: 10-10-04 01:28 Description: Package Application * /

// 07-10-04 11: 39 # if! Defined app_h # define app_h

#include #include "resource.h"

class WinApp {public: WinApp (); int InitInstance (HINSTANCE appInstance, HINSTANCE hPrevInst, char * cmdParam, int cmdShow); public: static LRESULT CALLBACK MainWndProc (HWND hwnd, UINT message, WPARAM wParam, LPARAM lParam);}; # endif / / -------------------------------------------------------------------------------------------- ----------- / * name: WinApp.cpp Copyright: (C) Huyoo, Changsha, Hunan Province, China Author: huyoo date: 10-10-04 01:28 Description: Package Application * / #include "winapp.h" #include WinApp :: winapp () {}

int WinApp :: InitInstance (HINSTANCE appInstance, HINSTANCE hPrevInst, char * cmdParam, int cmdShow) {return 0;} LRESULT CALLBACK WinApp :: MainWndProc (HWND hwnd, UINT message, WPARAM wParam, LPARAM lParam) {

Switch (message) {case wm_create: return 0; case wm_size: return 0; case wm_paint: return 0; Case WM_Command: return 0;} Return :: DefWindowProc (hwnd, message, wparam, lparam);} // --- -------------------------------------------------- -------------------------- //main.cpp#include "WinApp.h" int WinMain (Hinstance AppInstance, Hinstance Hprevinst, Char * CMDParam, int cmdshow) {WinApp THEAPP; RETURN THEAPP.INITINSTANCE (AppInstance, Hprevinst, cmdparam, cmdshow);} // Never go to debug operation, there is no result .// only as a throwing brick 引 玉 !!! ^ _ *

转载请注明原文地址:https://www.9cbs.com/read-108743.html

New Post(0)