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

📄 cmdbar.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  IDC_CMDBAR          1                  // Command band ID
#define  ID_ICON             10                 // Icon resource ID
#define  ID_MENU             11                 // Main menu resource ID
#define  IDC_COMBO           12                 // Combo box on cmd bar ID

// Menu item IDs
#define  IDM_EXIT            101                // File menu
#define  IDM_STDBAR          111                // View menu
#define  IDM_VIEWBAR         112
#define  IDM_COMBOBAR        113
#define  IDM_ABOUT           120                // Help menu
// Command bar button IDs
#define  IDC_NEW             201
#define  IDC_OPEN            202
#define  IDC_SAVE            203
#define  IDC_CUT             204
#define  IDC_COPY            205
#define  IDC_PASTE           206
#define  IDC_PROP            207

#define  IDC_LICON           301
#define  IDC_SICON           302
#define  IDC_LIST            303
#define  IDC_RPT             304
#define  IDC_SNAME           305
#define  IDC_STYPE           306
#define  IDC_SSIZE           307
#define  IDC_SDATE           308
#define  IDC_DPSORT          350

#define  STD_BMPS            (STD_PRINT+1)      // Number of bmps in
                                                // std imglist
#define  VIEW_BMPS           (VIEW_NEWFOLDER+1) // Number of bmps in
                                                // view imglist
//----------------------------------------------------------------------
// Function prototypes
//
HWND InitInstance (HINSTANCE, LPWSTR, int);
int TermInstance (HINSTANCE, int);

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

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

// Command functions
LPARAM DoMainCommandExit (HWND, WORD, HWND, WORD);
LPARAM DoMainCommandVStd (HWND, WORD, HWND, WORD);
LPARAM DoMainCommandVView (HWND, WORD, HWND, WORD);
LPARAM DoMainCommandVCombo (HWND, WORD, HWND, WORD);

⌨️ 快捷键说明

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