程序中要#include"resouce.h"static TCHAR szMenuName[] = TEXT ("MainMenu") ;
int WINAPI WinMain (HINSTANCE hInstance, HINSTANCE hPrevInstance,
PSTR szCmdLine, int iCmdShow)
{
static TCHAR szMenuName[] = TEXT ("MainMenu") ;
HWND         hwnd ;
MSG          msg ;
WNDCLASS     wndclass ;

// save the application's HINSTANCE
hInst = hInstance ; wndclass.style         = CS_HREDRAW | CS_VREDRAW ;
wndclass.lpfnWndProc   = WndProc ; // WndProc !!! here
wndclass.cbClsExtra    = 0 ;
wndclass.cbWndExtra    = 0 ;
wndclass.hInstance     = hInstance ;
wndclass.hIcon         = LoadIcon (hInstance, "myiocn") ; // how to load self-cus icon
wndclass.hCursor       = NULL ;
wndclass.hbrBackground = NULL ;
wndclass.lpszMenuName  = szMenuName ;
wndclass.lpszClassName = szAppName ;