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

📄 numpanel.h

📁 windows ce 程序设计书 的源代码
💻 H
字号:
//======================================================================
// NPWnd.h - An include file
//
// Written for the book Programming Windows CE
// Copyright (C) 2003 Douglas Boling
//======================================================================

#ifdef __cplusplus
extern "C"{
#endif 

// Returns number of elements
#define dim(x) (sizeof(x) / sizeof(x[0]))   

struct decodeUINT {                            // Structure associates
    UINT Code;                                 // messages 
                                               // with a function. 
    LRESULT (*Fxn)(HWND, UINT, WPARAM, LPARAM);
}; 

#define MYSIPCLS       TEXT ("MyNumPanelWndCls")
#define MYMSG_METHCALL (WM_USER+100)           // Used to pass info
#define MSGCODE_REGCALLBACK   0                // Notification codes for
#define MSGCODE_GETINFO       1                // MYMSG_METHCALL
#define MSGCODE_SETINFO       2
#define MSGCODE_REGCALLBACK2  3

#define GRIPWIDTH      9                       // Width of the gripper
#define FLOATWIDTH     200                     // Width of floating wnd
#define FLOATHEIGHT    100                     // Height of floating wnd

#define CXBTNS         5                       // Num columns of buttons
#define CYBTNS         3                       // Num rows of buttons

//
// Local data structure for keypad IM window
//
typedef struct {
    DWORD dwBtnDnFlags;
    IIMCallback *pIMCallback;
    IIMCallback2 *pIMCallback2;
    RECT rectDocked;
    BOOL fMoving;
    POINT ptMovBasis;
    POINT ptMovStart;
    IMINFO imi;
    RECT rectLast;
} SIPWNDSTRUCT, *LPSIPWNDSTRUCT;
INT DrawButton (HDC hdc, RECT *prect, LPTSTR pChar, BOOL fPressed);

//
// Prototypes for functions implemented by custom IM code
//
HWND CreateIMWindow (HWND hwndParent);
int DestroyIMWindow (HWND hwnd);

LRESULT CALLBACK NPWndProc (HWND, UINT, WPARAM, LPARAM);

LRESULT CALLBACK DoCreateSip (HWND, UINT, WPARAM, LPARAM);
LRESULT CALLBACK DoSetSipInfo (HWND, UINT, WPARAM, LPARAM);
LRESULT CALLBACK DoPaintSip (HWND, UINT, WPARAM, LPARAM);
LRESULT CALLBACK DoMouseSip (HWND, UINT, WPARAM, LPARAM);
LRESULT CALLBACK DoDestroySip (HWND, UINT, WPARAM, LPARAM);

#ifdef __cplusplus
}
#endif

⌨️ 快捷键说明

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