www.pudn.com > NumPanel.rar > NumPanel.h


 
 
#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