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

📄 winapi.h

📁 Dos6.0
💻 H
📖 第 1 页 / 共 2 页
字号:
    ICH     maxPixelWidth;     // Width (in pixels) of longest line 
    WORD    undoType;          // Current type of undo we support 
    HANDLE  hDeletedText;      // Handle to text which has been deleted (for undo )
    ICH     ichDeleted;        // Starting index from which text was deleted
    ICH     cchDeleted;        // Count of deleted characters in buffer 
    ICH     ichInsStart;       // Starting index from which text was inserted 
    ICH     ichInsEnd;         // Ending index of inserted text 
//    HANDLE  hFont;             // Handle to the font for this edit control.
    int     aveCharWidth;      // Ave width of a character in the hFont 
    int     lineHeight;        // Height of a line in the hFont 
    int     charOverhang;      // Overhang associated with the hFont      
    int     cxSysCharWidth;    // System font ave width 
    int     cySysCharHeight;   // System font height 
    HWND    listboxHwnd;       // ListBox hwnd. Non null if we are a combo box
    int     *pTabStops;	       // Points to an array of tab stops; First
										// element contains the number of elements in
										// the array 
    HANDLE  charWidthBuffer;  
	} ED;

typedef ED *PED;


#endif //FULL_EDIT


#define GetDC(hWnd)	(hWnd)

#define ReleaseDC(hWnd, hDC)

#define UpdateWindow(pwnd)  XSendMessage((pwnd), WM_PAINT, 0, 0L )

VOID	FARPUBLIC InvalidateRect	( PVOID, NPRRC );			/*OPTIONAL*/

VOID FARPUBLIC GetClientRect(PVOID, RRC *);					/*OPTIONAL*/

VOID	FARPUBLIC SiblingToTop		(PVOID, BOOL);          /*OPTIONAL*/	

PWND	FARPUBLIC GetTopSibling	(PVOID);							/*OPTIONAL*/

BOOL	FARPUBLIC IsTopSibling	(PVOID);							/*OPTIONAL*/

#define GetWindowRect(hwnd, parc )	*(parc) = (hwnd)->arcWindow	

#define GetUpdateRect(hwnd, prrc, bErase )	*(prrc) = (hwnd)->rrcInvalid

VOID	FARPUBLIC FillRect	(PVOID, NPRRC, ACHAR, WORD);/*OPTIONAL*/

#define GetDesktopWindow()	pwndDesktop

PWND FARPUBLIC GetActiveWindow ( VOID );/*OPTIONAL*/

// winget.c
PWND FARPUBLIC GetWindow ( PVOID, WORD );
PWND FARPUBLIC GetTopWindow ( PVOID );

// GetWindow() Constants 

#define GW_HWNDFIRST	0
#define GW_HWNDLAST	1
#define GW_HWNDNEXT	2
#define GW_HWNDPREV	3
#define GW_OWNER		4
#define GW_CHILD		5

//wincoord.c
VOID FARPUBLIC ScreenToClient ( PVOID, NPARC, NPRRC );
VOID FARPUBLIC ClientToScreen ( PVOID, NPARC, NPRRC );

// winenum.c
BOOL FARPUBLIC EnumWindows ( PFFN, DWORD );
BOOL FARPUBLIC EnumChildWindows ( PVOID, PFFN, DWORD );

// winpos.c
VOID FARPUBLIC CloseWindow ( PVOID );

//winwhere.c
HWND FARPUBLIC WindowFromPoint ( AX, AY );
VOID	FARPUBLIC SetWindowPos ( PWND,HWND,AX,AY,BYTE,BYTE,WORD );

#ifndef NOCOLOR


// Color Types 
#define CTLCOLOR_MSGBOX		0
#define CTLCOLOR_EDIT		1
#define CTLCOLOR_LISTBOX	2
#define CTLCOLOR_BTN		3
#define CTLCOLOR_DLG		4
#define CTLCOLOR_SCROLLBAR	5
#define CTLCOLOR_STATIC		6
#define CTLCOLOR_MAX		8     /* three bits max */


//wincolor.c
BOOL FARPUBLIC SetSysColors ( WORD,WORD FAR *,WORD FAR * );
DWORD FARPUBLIC GetSysColor ( WORD );

// Defines for colors. These are Windows compatible, and we map
// them to internal isa defines within uisa.h ( ugh. )

#define COLOR_SCROLLBAR			0
#define COLOR_BACKGROUND		1
#define COLOR_ACTIVECAPTION	2
#define COLOR_INACTIVECAPTION	3
#define COLOR_MENU				4
#define COLOR_WINDOW				5
#define COLOR_WINDOWFRAME		6	
#define COLOR_MENUTEXT			7
#define COLOR_WINDOWTEXT		8
#define COLOR_CAPTIONTEXT		9
#define COLOR_ACTIVEBORDER		10
#define COLOR_INACTIVEBORDER	11
#define COLOR_APPWORKSPACE		12
#define COLOR_HIGHLIGHT			13
#define COLOR_HIGHLIGHTTEXT	14
#define COLOR_BTNFACE			15
#define COLOR_BTNSHADOW			16
#define COLOR_GRAYTEXT			17
#define COLOR_BTNTEXT			18
#define COLOR_ENDCOLORS 		COLOR_BTNTEXT

#endif

//sysmenu.c

// VOID** FARPUBLIC GetSystemMenu( PVOID, BOOL );

BOOL FARPUBLIC OpenSystemMenu ( PVOID );


//winmenu.c
#define	MF_BYPOSITION	0x0001
#define	MF_BYCOMMAND	0x0002
#define	MF_CHECKED		0x0004
#define	MF_UNCHECKED	0x0008
#define	MF_ENABLED		0x0010
#define	MF_DISABLED		0x0020
#define	MF_HILITE		0x0040
#define	MF_UNHILITE		0x0080


//wincaret.c

VOID FARPUBLIC ShowCaret ( PVOID );
VOID FARPUBLIC	SetCaretPos ( BYTE, BYTE );

VOID FARPUBLIC SetCaretBlinkTime ( WORD );
VOID FARPUBLIC	HideCaret ( PVOID );
VOID FARPUBLIC	GetCaretPos ( VOID * );
WORD FARPUBLIC	GetCaretBlinkTime (VOID );
VOID FARPUBLIC	DestroyCaret (VOID );
VOID FARPUBLIC	CreateCaret ( PVOID, HANDLE, WORD, WORD );

//wintext.c

DWORD FARPUBLIC GetTextExtent ( HDC, LPSTR, int );
int FARPUBLIC DrawText ( HDC, LPSTR, int, LPRECT, WORD );


// DrawText() Format Flags 

#define DT_TOP				0x0000
#define DT_LEFT			0x0000
#define DT_CENTER			0x0001
#define DT_RIGHT			0x0002
#define DT_VCENTER		0x0004
#define DT_BOTTOM			0x0008
#define DT_WORDBREAK		0x0010
#define DT_SINGLELINE	0x0020
#define DT_EXPANDTABS	0x0040
#define DT_TABSTOP		0x0080
#define DT_NOCLIP			0x0100
#define DT_EXTERNALLEADING  0x0200
#define DT_CALCRECT		0x0400
#define DT_NOPREFIX		0x0800
#define DT_INTERNAL		0x1000



typedef struct tagTEXTMETRIC
  {
    int 	tmHeight;
    int 	tmAscent;
    int 	tmDescent;
    int 	tmInternalLeading;
    int 	tmExternalLeading;
    int 	tmAveCharWidth;
    int 	tmMaxCharWidth;
    int 	tmWeight;
    BYTE	tmItalic;
    BYTE	tmUnderlined;
    BYTE	tmStruckOut;
    BYTE	tmFirstChar;
    BYTE	tmLastChar;
    BYTE	tmDefaultChar;
    BYTE	tmBreakChar;
    BYTE	tmPitchAndFamily;
    BYTE	tmCharSet;
    int 	tmOverhang;
    int 	tmDigitizedAspectX;
    int 	tmDigitizedAspectY;
  } TEXTMETRIC;

typedef TEXTMETRIC	    *PTEXTMETRIC;
typedef TEXTMETRIC NEAR     *NPTEXTMETRIC;
typedef TEXTMETRIC FAR	    *LPTEXTMETRIC;

BOOL FARPUBLIC GetTextMetrics ( HDC, LPTEXTMETRIC );

//winclip.c

BOOL FARPUBLIC	OpenClipboard ( PVOID );
HWND FARPUBLIC	GetClipboardOwner ( VOID );
HWND FARPUBLIC	GetClipboardViewer ( VOID );
HANDLE FARPUBLIC	GetClipboardData ( WORD );
BOOL FARPUBLIC	CloseClipboard ( VOID );

#ifndef NOCLIPBOARD

// Predefined Clipboard Formats 
#define CF_TEXT 	    1
#define CF_BITMAP	    2
#define CF_METAFILEPICT     3
#define CF_SYLK 	    4
#define CF_DIF		    5
#define CF_TIFF 	    6
#define CF_OEMTEXT	    7
#define CF_DIB		    8
#define CF_PALETTE	    9

#define CF_OWNERDISPLAY     0x0080
#define CF_DSPTEXT	    0x0081
#define CF_DSPBITMAP	    0x0082
#define CF_DSPMETAFILEPICT  0x0083

/* "Private" formats don't get GlobalFree()'d */
#define CF_PRIVATEFIRST     0x0200
#define CF_PRIVATELAST	    0x02FF

/* "GDIOBJ" formats do get DeleteObject()'d */
#define CF_GDIOBJFIRST	    0x0300
#define CF_GDIOBJLAST	    0x03FF

#endif // NOCLIPBOARD 

//winrect.c
VOID FARPUBLIC InflateRect ( LPRECT, int, int );
VOID FARPUBLIC OffsetRect ( LPRECT, int, int );

//winscroll.c
VOID FARPUBLIC ScrollWindow(PVOID, int, int, LPRECT, LPRECT );



// The idStaticPath parameter to DlgDirList can have the following values
// ORed if the list box should show other details of the files along with
// the name of the files;

#define LBD_UPPERCASE  	0x8001	// Should the file name be in upper case 
#define LBD_SIZE			0x8002	// Should the file size be shown
#define LBD_DATE			0x8004	// Date stamp of the file to be shown ?
#define LBD_TIME			0x8008	// Time stamp of the file to be shown ?
#define LBD_ATTRIBUTE	0x8010	// The dos attributes of the file ?
#define LBD_FULLDETAILS 0x801E	// Name, size, date and time 
#define LBD_SENDDETAILS 0x8020	// In DlgDirSelect(), along with file name
											// all other details also will be returned

// DlgDirList flags values 
#define DDL_NORMAL	    0x0000
#define DDL_READWRITE    0x0001
#define DDL_READONLY	    0x0002
#define DDL_HIDDEN	    0x0004
#define DDL_SYSTEM	    0x0008
#define DDL_DIRECTORY    0x0010
#define DDL_ARCHIVE	    0x0020

#define DDL_POSTMSGS	    0x2000
#define DDL_DRIVES	    0x4000
#define DDL_EXCLUSIVE    0x8000
#define DDL_VALID			 0xe03f	/* ;Internal */


// A lot of these typedef's and macros should be made globally available.

typedef char *PSTR;

#define MAKEPOINT(l)		(*((POINT FAR *)&(l)))

#define lstrlen(sz) fstrlen((char far *)(sz))

#define lstrcpy(dest,src) fstrcpy((LPSTR)(dest), (LPSTR)(src))

typedef int near *PINT;

#define LCopyStruct(lpSrc,lpDest,cch) bltbytex(lpSrc,lpDest,cch)

#define SwapHandle(hHandle) 

DWORD FARPUBLIC SendDlgItemMessage ( HWND,WORD,WORD,WORD,DWORD );

#ifdef OLD_API
#include "old_api.h"
#endif

#endif //BROADSWORD

⌨️ 快捷键说明

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