?? menubar.h
字號:
//======================================================================
// Header file
//
// Written for the book Programming Windows CE
// Copyright (C) 2003 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_DOSHAREDNEW 201
#define IDM_DOSIMPLENEW 202
#define IDM_ABOUT 210
#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 IDM_MYNEWMENUITEM (IDM_NEWMENUMAX+1) // New Menu custom item
#define IDS_VIEWMENUNAME 256 // String table IDs
#define IDS_TOOLMENUNAME 257
#define IDS_SNEWTT 258
#define IDS_NEWTT 259
#define IDS_BTNTOOLTT 260
#define IDS_BTN3TEXT 261
#define IDS_BTNCUTTT 262
#define IDS_BTNCOPYTT 263
#define IDS_BTNPASTETT 264
//----------------------------------------------------------------------
// 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 DoMainCommandSharedNew (HWND, WORD, HWND, WORD);
LPARAM DoMainCommandSimpleNew (HWND, WORD, HWND, WORD);
LPARAM DoMainCommandAbout (HWND, WORD, HWND, WORD);
// Dialog procedures
BOOL CALLBACK AboutDlgProc (HWND, UINT, WPARAM, LPARAM);
?? 快捷鍵說明
復制代碼
Ctrl + C
搜索代碼
Ctrl + F
全屏模式
F11
切換主題
Ctrl + Shift + D
顯示快捷鍵
?
增大字號
Ctrl + =
減小字號
Ctrl + -