77范文网 - 专业文章范例文档资料分享平台

MINIGUI输入模块代码文件分析(3)

来源:网络收集 时间:2019-04-09 下载这篇文档 手机版
说明:文章内容仅供预览,部分内容可能不全,需要完整文档或者需要复制内容,请下载word后使用。下载word有问题请添加微信号:或QQ: 处理(尽可能给您提供完整文档),感谢您的支持与谅解。点击这里给我发消息

#define QS_POSTMSG 0x40000000 #define QS_QUIT 0x80000000 #define QS_INPUT 0x01000000 #define QS_PAINT 0x02000000 #define QS_TIMER 0x0000FFFF #define QS_EMPTY 0x00000000

(4)获得消息时用到的宏定义

#define PM_NOREMOVE 0x0000 #define PM_REMOVE 0x0001 #define PM_NOYIELD 0x0002

(5)声明各种消息处理函数,如获得消息、等待消息等 (6)宏定义键盘分布的相关参数和键盘信息处理函数

#define KBD_LAYOUT_DEFAULT \ #define KBD_LAYOUT_FRPC \ #define KBD_LAYOUT_FR \ #define KBD_LAYOUT_DE \ #define KBD_LAYOUT_DELATIN1 \ #define KBD_LAYOUT_IT \ #define KBD_LAYOUT_ES \ #define KBD_LAYOUT_ESCP850 \

(7)宏定义hook相关的参数和函数 (8)宏定义窗口相关参数 (9)定义主窗口数据结构

typedef struct _MAINWINCREATE {

/** The style of the main window */ DWORD dwStyle;

/** The extended style of the main window */ DWORD dwExStyle;

/** The caption of the main window */ const char* spCaption;

/** The handle to the menu of the main window */ HMENU hMenu;

/** The handle to the cursor of the main window */ HCURSOR hCursor;

/** The handle to the icon of the main window */ HICON hIcon;

/** The hosting main window */ HWND hHosting;

/** The window callback procedure */

int (*MainWindowProc)(HWND, int, WPARAM, LPARAM);

/** The position of the main window in the screen coordinates */ int lx, ty, rx, by;

/** The pixel value of background color of the main window */ int iBkColor;

/** The first private data associated with the main window */ DWORD dwAddData;

/** Reserved, do not use */ DWORD dwReserved; }MAINWINCREATE;

typedef MAINWINCREATE* PMAINWINCREATE;

(10)声明窗口创建、显示、获取窗口信息等等与窗口相关的函数 (11)宏定义主窗口的限制参数并声明相关函数

#define MWM_MINWIDTH 0 #define MWM_MINHEIGHT 1 #define MWM_BORDER 2 #define MWM_THICKFRAME 3 。。。。。。

#define MWM_ITEM_NUMBER 31

(12)宏定义颜色信息并声明相关函数

#define BKC_CAPTION_NORMAL 0 #define FGC_CAPTION_NORMAL 1 #define BKC_CAPTION_ACTIVED 2 #define FGC_CAPTION_ACTIVED 3 。。。。。。

#define BKC_DESKTOP 34 #define BKC_DIALOG #define BKC_TIP

/* back compitabilty defines */

#define BKC_BUTTON_DEF WEC_3DBOX_NORMAL #define BKC_BUTTON_PUSHED WEC_3DBOX_DARK #define FGC_BUTTON_NORMAL WED_3DBOX_REVERSE #define FGC_BUTTON_PUSHED WED_3DBOX_REVERSE #define BKC_EDIT_DEF WEC_3DBOX_LIGHT #define BKC_EDIT_DISABLED WEC_3DBOX_NORMAL #define WEC_3DFRAME_LEFT_OUTER WED_3DBOX_REVERSE #define WEC_3DFRAME_LEFT_INNER WEC_3DBOX_DARK #define WEC_3DFRAME_TOP_OUTER WED_3DBOX_REVERSE #define WEC_3DFRAME_TOP_INNER WEC_3DBOX_DARK #define WEC_3DFRAME_RIGHT_OUTER WEC_3DBOX_LIGHT #define WEC_3DFRAME_RIGHT_INNER WEC_3DBOX_NORMAL

35 36

#define WEC_ITEM_NUMBER 37

#define WEC_3DFRAME_BOTTOM_OUTER WEC_3DBOX_LIGHT #define WEC_3DFRAME_BOTTOM_INNER WEC_3DBOX_NORMAL #define WEC_3DFRAME_LEFT WEC_3DBOX_LIGHT #define WEC_3DFRAME_TOP WEC_3DBOX_LIGHT #define WEC_3DFRAME_RIGHT WEC_3DBOX_DARK #define WEC_3DFRAME_BOTTOM WEC_3DBOX_DARK

(13)宏定义位图相关参数并声明相关函数 (14)宏定义系统图标参数并声明相关函数 (15)滚动条相关的宏定义、数据结构和函数声明 (16)菜单相关的宏定义和函数声明

(17)对话框相关的宏定义、数据结构和函数声明

typedef struct _CTRLDATA {

/** Class name of the control */ const char* class_name; /** Control style */

DWORD dwStyle; /** Control position in dialog */ int x, y, w, h; /** Control identifier */

int id; /** Control caption */

const char* caption; /** Additional data */

DWORD dwAddData; /** Control extended style */

DWORD dwExStyle; } CTRLDATA;

typedef CTRLDATA* PCTRLDATA;

typedef struct _DLGTEMPLATE {

/** Dialog box style */

DWORD dwStyle; /** Dialog box extended style */

DWORD dwExStyle; /** Dialog box position */

int x, y, w, h; /** Dialog box caption */

const char* caption; /** Dialog box icon */

HICON hIcon;

/** Dialog box menu */

HMENU hMenu; /** Number of controls */

int controlnr; /** Poiter to control array */

PCTRLDATA controls; /** Addtional data, must be zero */

DWORD dwAddData; } DLGTEMPLATE;

typedef DLGTEMPLATE* PDLGTEMPLATE;

10、internals.h窗口、消息和消息队列相关的宏定义和数据结构及相关函数声明

(1)内部数据包括一些默认参数的宏定义

#define DEF_NR_TIMERS 32 #define DEF_MSGQUEUE_LEN 8 #define SIZE_CLIPRECTHEAP 16 #define SIZE_INVRECTHEAP 16 #define SIZE_QMSG_HEAP 8 #define MAX_LEN_FIXSTR 64 #define NR_HEAP 5

#define LEN_BITMAP (1+2+4+8+16)

(2)句柄类型和子类型的宏定义

#define TYPE_HWND 0x01 #define TYPE_MAINWIN 0x11 #define TYPE_CONTROL 0x12 #define TYPE_ROOTWIN 0x13 #define TYPE_HMENU 0x02 #define TYPE_MENUBAR 0x21 #define TYPE_PPPMENU 0x22 #define TYPE_NMLMENU 0x23 #define TYPE_HACCEL 0x03 #define TYPE_HCURSOR 0x05 #define TYPE_HICON 0x07 #define TYPE_HDC 0x08 #define TYPE_SCRDC 0x81 #define TYPE_GENDC 0x82 #define TYPE_MEMDC 0x83

#define TYPE_WINTODEL 0xF1 #define TYPE_UNDEFINED 0xFF

(3)Z序相关的数据结构

typedef struct _ZORDERNODE {

HWND hWnd; /* Handle of window */ struct _ZORDERNODE* pNext; /* Next window */ }ZORDERNODE;

typedef ZORDERNODE* PZORDERNODE;

typedef struct _ZORDERINFO {

int nNumber; /* Number of windows */ HWND hWnd; /* Handle of host window */ PZORDERNODE pTopMost; /* the top most Z order node */ } ZORDERINFO;

typedef ZORDERINFO* PZORDERINFO;

(4)滚动条和滚动窗口相关的数据结构

typedef struct _SCROLLWINDOWINFO {

int iOffx; int iOffy; const RECT* rc1; const RECT* rc2; }SCROLLWINDOWINFO;

typedef SCROLLWINDOWINFO* PSCROLLWINDOWINFO;

#define SBS_NORMAL 0x00 #define SBS_DISABLED 0x01 #define SBS_HIDE 0x02 typedef struct _SCROLLBARINFO {

int minPos; // min value of scroll range. int maxPos; // max value of scroll range. int curPos; // current scroll pos. int pageStep; // steps per page. int barStart; // start pixel of bar. int barLen; // length of bar. BYTE status; // status of scroll bar. }SCROLLBARINFO;

typedef SCROLLBARINFO* PSCROLLBARINFO;

(5)符号信息相关的数据结构

typedef struct _CARETINFO {

int x; // position of caret int y;

void* pNormal; // normal bitmap.

百度搜索“77cn”或“免费范文网”即可找到本站免费阅读全部范文。收藏本站方便下次阅读,免费范文网,提供经典小说综合文库MINIGUI输入模块代码文件分析(3)在线全文阅读。

MINIGUI输入模块代码文件分析(3).doc 将本文的Word文档下载到电脑,方便复制、编辑、收藏和打印 下载失败或者文档不完整,请联系客服人员解决!
本文链接:https://www.77cn.com.cn/wenku/zonghe/583185.html(转载请注明文章来源)
Copyright © 2008-2022 免费范文网 版权所有
声明 :本网站尊重并保护知识产权,根据《信息网络传播权保护条例》,如果我们转载的作品侵犯了您的权利,请在一个月内通知我们,我们会及时删除。
客服QQ: 邮箱:tiandhx2@hotmail.com
苏ICP备16052595号-18
× 注册会员免费下载(下载后可以自由复制和排版)
注册会员下载
全站内容免费自由复制
注册会员下载
全站内容免费自由复制
注:下载文档有可能“只有目录或者内容不全”等情况,请下载之前注意辨别,如果您已付费且无法下载或内容有问题,请联系我们协助你处理。
微信: QQ: