⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 menubar.h

📁 《Windows CE 6.0开发者参考》(《Programming Windows Embedded CE 6.0 Developer Reference》)第四版书中的源代码
💻 H
字号:
//======================================================================
// Header file
//
// Written for the book Programming Windows CE
// Copyright (C) 2007 Douglas Boling
//================================================================
// Returns number of elements
#define dim(x) (sizeof(x) / sizeof(x[0])) 

//----------------------------------------------------------------------
// Generic defines and data types
//
struct decodeUINT {                            // Structure associates
    UINT Code;                                 // messages 
                                               // with a function. 
    LRESULT (*Fxn)(HWND, UINT, WPARAM, LPARAM);
}; 
struct decodeCMD {                             // Structure associates
    UINT Code;                                 // menu IDs with a 
    LRESULT (*Fxn)(HWND, WORD, HWND, WORD);    // function.
};

//----------------------------------------------------------------------
// Generic defines used by application
#define  ID_ACCEL          1                   // Accelerator table ID
#define  ID_TOOLBMPS       2
#define  ID_ICON           3
#define  ID_TOOLBAR1       100                   
#define  ID_TOOLBAR2       101                 
#define  ID_MENU           102                 
#define  IDC_RPTLIST       103
#define  ID_VIEWMENU       50                   
#define  ID_TOOLMENU       51 
#define  ID_MENU3          52                   

#define  IDM_EXIT          200
#define  IDM_BARONE        201
#define  IDM_BARTWO        202

#define  IDM_ITEM1         220
#define  IDM_ITEM2         221
#define  IDM_ITEM3         222
#define  IDM_ITEM4         223
#define  IDM_ITEM5         224
#define  IDM_ITEM6         225

#define  IDM_CUT           230
#define  IDM_COPY          231
#define  IDM_PASTE         232

#define  IDS_VIEWMENUNAME  256                 // String table IDs
#define  IDS_TOOLMENUNAME  257 
#define  IDS_BTNTOOLTT     258
#define  IDS_BTNCUTTT      259
#define  IDS_BTNCOPYTT     260
#define  IDS_BTNPASTETT    261

//----------------------------------------------------------------------
// Function prototypes
//
HWND InitInstance (HINSTANCE, LPWSTR, int);
int TermInstance (HINSTANCE, int);
HWND MyCreateMenuBar (HWND hWnd, int idToolbar);
void MyCheckMenu (int idMenu);
void Add2List (HWND hWnd, LPTSTR lpszFormat, ...);

// Window procedures
LRESULT CALLBACK MainWndProc (HWND, UINT, WPARAM, LPARAM);

// Message handlers
LRESULT DoCreateMain (HWND, UINT, WPARAM, LPARAM);
LRESULT DoSizeMain (HWND, UINT, WPARAM, LPARAM);
LRESULT DoNotifyMain (HWND, UINT, WPARAM, LPARAM);
LRESULT DoCommandMain (HWND, UINT, WPARAM, LPARAM);
LRESULT DoSettingChangeMain (HWND, UINT, WPARAM, LPARAM);
LRESULT DoActivateMain (HWND, UINT, WPARAM, LPARAM);
LRESULT DoDestroyMain (HWND, UINT, WPARAM, LPARAM);

// WM_COMMAND message handlers
LPARAM DoMainCommandExit (HWND, WORD, HWND, WORD);
LPARAM DoMainCommandCreateBar1 (HWND, WORD, HWND, WORD);
LPARAM DoMainCommandCreateBar2 (HWND, WORD, HWND, WORD);

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -