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

📄 dialbox.h

📁 ReactOS是一些高手根据Windows XP的内核编写出的类XP。内核实现机理和API函数调用几乎相同。甚至可以兼容XP的程序。喜欢研究系统内核的人可以看一看。
💻 H
字号:
/* ----------------- dialbox.h ---------------- */

#ifndef DIALOG_H
#define DIALOG_H

#include <stdio.h>

#define DF_MAXCONTROLS 30
#define DF_MAXRADIOS 20

#define DF_OFF FALSE
#define DF_ON  TRUE

/* -------- dialog box and control window structure ------- */
typedef struct  {
    char *title;    /* window title         */
    int x, y;       /* relative coordinates */
    int h, w;       /* size                 */
} DF_DIALOGWINDOW;

/* ------ one of these for each control window ------- */
typedef struct {
    DF_DIALOGWINDOW dwnd;
    DFCLASS class;    /* DF_LISTBOX, DF_BUTTON, etc */
    char *itext;    /* initialized text     */
    int command;    /* command code         */
    char *help;     /* help mnemonic        */
    BOOL isetting;  /* initially DF_ON or DF_OFF  */
    BOOL setting;   /* DF_ON or DF_OFF            */
    void *wnd;      /* window handle        */
} DF_CTLWINDOW;

/* --------- one of these for each dialog box ------- */
typedef struct {
    char *HelpName;
    DF_DIALOGWINDOW dwnd;
    DF_CTLWINDOW ctl[DF_MAXCONTROLS+1];
} DF_DBOX;

/* -------- macros for dialog box resource compile -------- */
#define DF_DIALOGBOX(db) DF_DBOX db={ #db,
#define DF_DB_TITLE(ttl,x,y,h,w) {ttl,x,y,h,w},{
#define DF_CONTROL(ty,tx,x,y,h,w,c) 						\
				{{NULL,x,y,h,w},ty,						\
				(ty==DF_EDITBOX||ty==DF_COMBOBOX?NULL:tx),	\
				c,#c,(ty==DF_BUTTON?DF_ON:DF_OFF),DF_OFF,NULL},

#define DF_ENDDB {{NULL}} }};

#define DfCancel  " Cancel "
#define DfOk      "   OK   "
#define DfYes     "  Yes   "
#define DfNo      "   No   "

#endif

⌨️ 快捷键说明

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