📄 cwindows.h
字号:
#define IDOK 1
#define IDCANCEL 2
#define IDABORT 3
#define IDRETRY 4
#define IDIGNORE 5
#define IDYES 6
#define IDNO 7
#ifdef HELP_BUTTON
#define IDHELP 8
#endif
#define MB_OK 1
#define MB_YESNOCANCEL 2
#define MB_RETRYCANCEL 3
#define MB_OKCANCEL 4
#define MB_ABORT 5
#define MB_YESNO 6
#define MB_RETRY 7
#define MB_TYPE 0x0f // message type
#define MB_BEEP 0x10
#define MB_CAPTION 0x20 // 1st param is caption
#define MB_BUTTON 0x0300 // button mask
#define MB_DEFBUTTON1 0x0000 // initial button to get focus
#define MB_DEFBUTTON2 0x0100
#define MB_DEFBUTTON3 0x0200
#ifdef HELP_BUTTON
#define MB_DEFBUTTON4 0x0300
#define MB_NOHELP 0x8000
#endif
#endif //!NOMB
// for Special MessageBox
extern BYTE FAR * PASCAL lpbWorkTemp; // App should never use directly
#define InitSpecialMessageBox(lpbBuff) \
{ \
Assert(lpbWorkTemp == NULL); \
lpbWorkTemp = (lpbBuff); \
}
#define EndSpecialMessageBox() \
{ \
Assert(lpbWorkTemp != NULL); \
lpbWorkTemp = NULL; \
}
/* so that rspAppIdle can determine where the current msg box dialog is */
// extern PWND_DLG pwndDlg; /* Again, app should never use */
#define PwndDlgCur() pwndDlg
#if defined(ADM)
#ifdef DEBUG
VOID FARPUBLIC EndDialog ( PVOID, WORD); /*OPTIONAL*/
#else
#define EndDialog(pwnd, wParam ) ((PWND_DLG)pwnd)->wParamEnd = wParam;
#endif
WORD FARPUBLIC DialogBox ( VOID *, PLFN_WNDPROC ); /*OPTIONAL*/
PWND FARPUBLIC NextChild ( PVOID, PVOID);
PWND FARPUBLIC PrevChild ( PVOID, PVOID );
PWND FARPUBLIC GetNextDlgGroupItem ( PVOID, PVOID, BOOL );
// #define WM_DLGUSER 20
// ADM defines
BOOL FARPUBLIC CreateChildren ( PVOID, VOID *, WORD ); /*OPTIONAL*/
PWND FARPUBLIC WinLoadDlg ( VOID *, PLFN_WNDPROC ); /*OPTIONAL*/
WORD FARPUBLIC WinProcessDlg ( PVOID, PLFN ); /*OPTIONAL*/
PWND FARPUBLIC GetDlgItem ( PVOID, WORD ); /*OPTIONAL*/
#define LB_FILE TRUE
#define LB_DIR FALSE
PWND FARPUBLIC CreateDialog ( VOID *, PWND, PLFN_WNDPROC ); /*OPTIONAL*/
VOID FARPUBLIC WinDlgDirList ( PVOID, char *, WORD, WORD, WORD, BOOL ); /*OPTIONAL*/
VOID FARPUBLIC DrawDlg ( PVOID, DWORD); /*OPTIONAL*/
DWORD FARPUBLIC ADMDialogWndProc ( PVOID,WORD, WORD, DWORD ); /*OPTIONAL*/
DWORD FARPUBLIC ADMMboxWndProc ( PVOID,WORD, WORD, DWORD ); /*OPTIONAL*/
WORD FARPUBLIC MessageBox ( VOID *, VOID *, VOID *, WORD ); /*OPTIONAL*/
WORD FARPUBLIC MessageBoxAxAy ( VOID *, VOID *, VOID *, WORD, WORD, WORD ); /*OPTIONAL*/
PWND FARPUBLIC CreateMsgBtn ( char *,WORD,WORD,WORD,WORD,WORD,WORD,PVOID,WORD );
#ifdef WIN_BTN
VOID FARPUBLIC CheckRadioButton ( PVOID, WORD, WORD, WORD ); /*OPTIONAL*/
#define CheckDlgRadioButton(hwnd,idFirstButton,idLastButton,idCheckButton) CheckRadioButton(hwnd,idFirstButton,idLastButton,idCheckButton)
#else
VOID FARPUBLIC CheckDlgRadioButton ( PVOID, WORD, WORD, WORD ); /*OPTIONAL*/
#endif
#endif //ADM
// Control Procedure
typedef WORD (FARPUBLIC *PWFN_CTL)(WORD, char *, WORD, WORD, WORD, WORD);
// BLADE enhanced version.
#ifdef BLADE
#ifdef BROADSWORD
#ifdef FULL_EDIT
#ifdef BASED
typedef struct _winwnded _based(pWndSeg) WND_WINEDIT;
#else
typedef struct _winwnded WND_WINEDIT;
#endif
typedef WND_WINEDIT *PWND_WINEDIT;
typedef struct _winwnded
{
WORD id;
BITS style:14;
BITS fCursorOn:1;
BITS fEnabled:1;
WORD wExtStyle;
ARC arcWindow;
ARC arcClipping;
#ifdef BROADSWORD
ARC rrcInvalid;
BYTE hbrDraw; // Color for drawing.
BYTE hbrBackGround; // Color for background.
#else
RRC rrcInvalid;
#endif
PLFN_WNDPROC pfnWndProc;
PWND pwndParent;
PWND pwndSibling;
PWND pwndChild;
#ifdef BROADSWORD
WORD pcls;
#endif
BYTE axCursor;
BYTE ayCursor;
#ifndef BROADSWORD
BYTE wndBytes; // 31 bytes
#endif
PED ped;
};
#define GetEditPed(pwnd) (((PWND_WINEDIT)pwnd)->ped)
#define SetEditPed(pwnd, ped) ( ((PWND_WINEDIT)pwnd)->ped = ped)
#endif
#endif
#ifdef BASED
typedef struct _wndmle _based(pWndSeg) WND_MLE;
#else
typedef struct _wndmle WND_MLE;
#endif
typedef WND_MLE *PWND_MLE;
typedef struct _wndmle
{
WORD id;
BITS style:14;
BITS fCursorOn:1;
BITS fEnabled:1;
WORD wExtStyle;
ARC arcWindow;
ARC arcClipping;
#ifdef BROADSWORD
ARC rrcInvalid;
BYTE hbrDraw; // Color for drawing.
BYTE hbrBackGround; // Color for background.
#else
RRC rrcInvalid;
#endif
PLFN_WNDPROC pfnWndProc;
PWND pwndParent;
PWND pwndSibling;
PWND pwndChild;
#ifdef BROADSWORD
WORD pcls;
#endif
BYTE axCursor;
BYTE ayCursor;
#ifndef BROADSWORD
BYTE wndBytes;
#endif
WORD padding;
WORD pEF_Structure;
};
#ifdef BASED
typedef struct _wnddesktop _based(pWndSeg) WND_DESKTOP;
#else
typedef struct _wnddesktop WND_DESKTOP;
#endif
typedef WND_DESKTOP *PWND_DESKTOP;
typedef struct _wnddesktop
{
WORD id;
BITS style:14;
BITS fCursorOn:1;
BITS fEnabled:1;
WORD wExtStyle;
ARC arcWindow;
ARC arcClipping;
#ifdef BROADSWORD
ARC rrcInvalid;
BYTE hbrDraw; // Color for drawing.
BYTE hbrBackGround; // Color for background.
#else
RRC rrcInvalid;
#endif
PLFN_WNDPROC pfnWndProc;
PWND pwndParent;
PWND pwndSibling;
PWND pwndChild;
#ifdef BROADSWORD
WORD pcls;
#endif
BYTE axCursor;
BYTE ayCursor;
#ifndef BROADSWORD
BYTE wndBytes; // 31 bytes
#endif
BYTE bFill;
WORD isaDesktop;
};
#ifdef BASED
typedef struct _wndgeneric _based(pWndSeg) WND_GEN;
#else
typedef struct _wndgeneric WND_GEN;
#endif
typedef WND_GEN *PWND_GEN;
typedef struct _wndgeneric
{
WORD id;
BITS style:14;
BITS fCursorOn:1;
BITS fEnabled:1;
WORD wExtStyle;
ARC arcWindow;
ARC arcClipping;
#ifdef BROADSWORD
ARC rrcInvalid;
BYTE hbrDraw; // Color for drawing.
BYTE hbrBackGround; // Color for background.
#else
RRC rrcInvalid;
#endif
PLFN_WNDPROC pfnWndProc;
PWND pwndParent;
PWND pwndSibling;
PWND pwndChild;
#ifdef BROADSWORD
WORD pcls;
#endif
BYTE axCursor;
BYTE ayCursor;
#ifndef BROADSWORD
BYTE wndBytes; // 31 bytes
#endif
WORD aclDialog;
char *szDialog;
WORD cchDialog; // 6 bytes
};
#ifdef BASED
typedef struct _wndgenpic _based(pWndSeg) WND_GENPIC;
#else
typedef struct _wndgeneric WND_GENPIC;
#endif
typedef WND_GENPIC *PWND_GENPIC;
typedef struct _wndgenpic
{
WORD id;
BITS style:14;
BITS fCursorOn:1;
BITS fEnabled:1;
WORD wExtStyle;
ARC arcWindow;
ARC arcClipping;
#ifdef BROADSWORD
ARC rrcInvalid;
BYTE hbrDraw; // Color for drawing.
BYTE hbrBackGround; // Color for background.
#else
RRC rrcInvalid;
#endif
PLFN_WNDPROC pfnWndProc;
PWND pwndParent;
PWND pwndSibling;
PWND pwndChild;
#ifdef BROADSWORD
WORD pcls;
#endif
BYTE axCursor;
BYTE ayCursor;
#ifndef BROADSWORD
BYTE wndBytes; // 31 bytes
#endif
WORD aclDialog;
char *szDialog;
WORD cchDialog; // 6 bytes
PWFN_CTL pfnGenProc;
WORD wParam; // 6 bytes
};
// General window stuff
// #define PwfnCtlGeneral(pwnd) (*((PWFN_CTL *) &pwnd->rgwExtra[cwExtraMin]))
#define PwfnCtlGeneral(pwnd) ((PWND_GENPIC)pwnd)->pfnGenProc
#define WParamGeneral(pwnd) ((PWND_GENPIC)pwnd)->wParam
#define SetAccelerator(pwnd, Position, szText) \
((PWND_GEN)(pwnd))->aclDialog = (((BYTE)((Position) - 1)) << 8) + \
*((unsigned char *)(szText) + ((Position) - 1))
#ifdef BASED
typedef struct _wndgroup _based(pWndSeg) WND_GROUP;
#else
typedef struct _wndgroup WND_GROUP;
#endif
typedef WND_GROUP *PWND_GROUP;
typedef struct _wndgroup
{
WORD id;
BITS style:14;
BITS fCursorOn:1;
BITS fEnabled:1;
WORD wExtStyle;
ARC arcWindow;
ARC arcClipping;
#ifdef BROADSWORD
ARC rrcInvalid;
BYTE hbrDraw; // Color for drawing.
BYTE hbrBackGround; // Color for background.
#else
RRC rrcInvalid;
#endif
PLFN_WNDPROC pfnWndProc;
PWND pwndParent;
PWND pwndSibling;
PWND pwndChild;
#ifdef BROADSWORD
WORD pcls;
#endif
BYTE axCursor;
BYTE ayCursor;
#ifndef BROADSWORD
BYTE wndBytes;
#endif
WORD aclDialog;
char *szDialog;
PWND pwndAccel;
};
#ifdef BASED
typedef struct _wndstatic _based(pWndSeg) WND_STATIC;
#else
typedef struct _wndstatic WND_STATIC;
#endif
typedef WND_STATIC *PWND_STATIC;
typedef struct _wndstatic
{
WORD id;
BITS style:14;
BITS fCursorOn:1;
BITS fEnabled:1;
WORD wExtStyle;
ARC arcWindow;
ARC arcClipping;
#ifdef BROADSWORD
ARC rrcInvalid;
BYTE hbrDraw; // Color for drawing.
BYTE hbrBackGround; // Color for background.
#else
RRC rrcInvalid;
#endif
PLFN_WNDPROC pfnWndProc;
PWND pwndParent;
PWND pwndSibling;
PWND pwndChild;
#ifdef BROADSWORD
WORD pcls;
#endif
BYTE axCursor;
BYTE ayCursor;
#ifndef BROADSWORD
BYTE wndBytes; // 31 bytes
#endif
WORD aclDialog;
char *szDialog;
PWND pwndAccel;
};
#ifdef BASED
typedef struct _dlgwnd _based(pWndSeg) WND_DLG;
#else
typedef struct _dlgwnd WND_DLG;
#endif
typedef WND_DLG *PWND_DLG;
typedef struct _dlgwnd
{
WORD id;
BITS style:14;
BITS fCursorOn:1;
BITS fEnabled:1;
WORD wExtStyle;
ARC arcWindow;
ARC arcClipping;
#ifdef BROADSWORD
ARC rrcInvalid;
BYTE hbrDraw; // Color for drawing.
BYTE hbrBackGround; // Color for background.
#else
RRC rrcInvalid;
#endif
PLFN_WNDPROC pfnWndProc;
PWND pwndParent;
PWND pwndSibling;
PWND pwndChild;
#ifdef BROADSWORD
WORD pcls;
#endif
BYTE axCursor;
BYTE ayCursor;
#ifndef BROADSWORD
BYTE wndBytes; // 31 bytes
#endif
WORD aclDialog;
char *szDialog;
WORD wParamEnd;
VOID *pmbsDialog;
PLFN pfnUserProc; // 12 bytes
WORD hidHelp;
};
// so that rspAppIdle can determine where the current msg box dialog is
extern PWND_DLG pwndDlg; // Again, app should never use
typedef struct _drop DROP;
typedef DROP *PDROP;
typedef struct _Drop {
WORD Dummy;
WORD wDropFlags;
PWND pwndDropListBox;
PWND pwndDropButton;
PWND pwndDropEdit;
PLFN_WNDPROC pfnDropListBoxProc;
PLFN_WNDPROC pfnDropEditProc;
};
#ifdef BASED
typedef struct _wnddrop _based(pWndSeg) WND_DROP;
#else
typedef struct _wnddrop WND_DROP;
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -