mirror of
https://gitlab.com/freepascal.org/fpc/source.git
synced 2025-08-18 03:09:11 +02:00
+ added the win16api window class management functions
git-svn-id: trunk@31717 -
This commit is contained in:
parent
dde243e4e5
commit
5c71414d02
@ -504,6 +504,10 @@ const
|
|||||||
PWR_SUSPENDRESUME = 2;
|
PWR_SUSPENDRESUME = 2;
|
||||||
PWR_CRITICALRESUME = 3;
|
PWR_CRITICALRESUME = 3;
|
||||||
|
|
||||||
|
{ Window class management }
|
||||||
|
{ Class field offsets for GetClassLong() and GetClassWord() }
|
||||||
|
GCW_ATOM = (-32);
|
||||||
|
|
||||||
function GetFreeSystemResources(SysResource: UINT): UINT; external 'USER';
|
function GetFreeSystemResources(SysResource: UINT): UINT; external 'USER';
|
||||||
|
|
||||||
procedure LogError(err: UINT; lpInfo: FarPointer); external 'KERNEL';
|
procedure LogError(err: UINT; lpInfo: FarPointer); external 'KERNEL';
|
||||||
|
@ -789,3 +789,22 @@ function CallMsgFilter(var msg: MSG; nCode: SmallInt): BOOL; external 'USER';
|
|||||||
{ Application termination }
|
{ Application termination }
|
||||||
|
|
||||||
procedure PostQuitMessage(nExitCode: SmallInt); external 'USER';
|
procedure PostQuitMessage(nExitCode: SmallInt); external 'USER';
|
||||||
|
|
||||||
|
{ Window class management }
|
||||||
|
|
||||||
|
function RegisterClass(lpwc: LPWNDCLASS): ATOM; external 'USER';
|
||||||
|
{$ifdef VAR_PARAMS_ARE_FAR}
|
||||||
|
function RegisterClass(var wc: WNDCLASS): ATOM; external 'USER';
|
||||||
|
{$endif}
|
||||||
|
function UnregisterClass(lpszClassName: LPCSTR; hinst: HINST): BOOL; external 'USER';
|
||||||
|
|
||||||
|
function GetClassInfo(hinst: HINST; lpszClassName: LPCSTR; lpwc: LPWNDCLASS): BOOL; external 'USER';
|
||||||
|
{$ifdef VAR_PARAMS_ARE_FAR}
|
||||||
|
function GetClassInfo(hinst: HINST; lpszClassName: LPCSTR; var wc: WNDCLASS): BOOL; external 'USER';
|
||||||
|
{$endif}
|
||||||
|
function GetClassName(hwnd: HWND; lpszClassName: LPSTR; cchClassName: SmallInt): SmallInt; external 'USER';
|
||||||
|
|
||||||
|
function GetClassWord(hwnd: HWND; offset: SmallInt): WORD; external 'USER';
|
||||||
|
function SetClassWord(hwnd: HWND; nIndex: SmallInt; wNewWord: WORD): WORD; external 'USER';
|
||||||
|
function GetClassLong(hwnd: HWND; offset: SmallInt): LONG; external 'USER';
|
||||||
|
function SetClassLong(hwnd: HWND; nIndex: SmallInt; nVal: LONG): LONG; external 'USER';
|
||||||
|
@ -1359,3 +1359,58 @@ const
|
|||||||
WM_QUIT = $0012;
|
WM_QUIT = $0012;
|
||||||
|
|
||||||
WM_SYSTEMERROR = $0017;
|
WM_SYSTEMERROR = $0017;
|
||||||
|
|
||||||
|
type
|
||||||
|
{ Window class management }
|
||||||
|
WNDPROC = function(hwnd: HWND; msg: UINT; wParam: WPARAM; lParam: LPARAM): LRESULT; far;
|
||||||
|
|
||||||
|
PWNDCLASS = ^WNDCLASS;
|
||||||
|
NPWNDCLASS = ^WNDCLASS; near;
|
||||||
|
LPWNDCLASS = ^WNDCLASS; far;
|
||||||
|
WNDCLASS = record
|
||||||
|
style: UINT;
|
||||||
|
lpfnWndProc: WNDPROC;
|
||||||
|
cbClsExtra: SmallInt;
|
||||||
|
cbWndExtra: SmallInt;
|
||||||
|
hInstance: HINST;
|
||||||
|
hIcon: HICON;
|
||||||
|
hCursor: HCURSOR;
|
||||||
|
hbrBackground: HBRUSH;
|
||||||
|
lpszMenuName: LPCSTR;
|
||||||
|
lpszClassName: LPCSTR;
|
||||||
|
end;
|
||||||
|
TWndClass = WNDCLASS;
|
||||||
|
|
||||||
|
const
|
||||||
|
{ Class styles }
|
||||||
|
CS_VREDRAW = $0001;
|
||||||
|
CS_HREDRAW = $0002;
|
||||||
|
|
||||||
|
CS_OWNDC = $0020;
|
||||||
|
CS_CLASSDC = $0040;
|
||||||
|
CS_PARENTDC = $0080;
|
||||||
|
|
||||||
|
CS_SAVEBITS = $0800;
|
||||||
|
|
||||||
|
CS_DBLCLKS = $0008;
|
||||||
|
|
||||||
|
CS_BYTEALIGNCLIENT = $1000;
|
||||||
|
CS_BYTEALIGNWINDOW = $2000;
|
||||||
|
|
||||||
|
CS_NOCLOSE = $0200;
|
||||||
|
|
||||||
|
CS_KEYCVTWINDOW = $0004;
|
||||||
|
CS_NOKEYCVT = $0100;
|
||||||
|
|
||||||
|
CS_GLOBALCLASS = $4000;
|
||||||
|
|
||||||
|
{ Class field offsets for GetClassLong() and GetClassWord() }
|
||||||
|
GCL_MENUNAME = (-8);
|
||||||
|
GCW_HBRBACKGROUND = (-10);
|
||||||
|
GCW_HCURSOR = (-12);
|
||||||
|
GCW_HICON = (-14);
|
||||||
|
GCW_HMODULE = (-16);
|
||||||
|
GCW_CBWNDEXTRA = (-18);
|
||||||
|
GCW_CBCLSEXTRA = (-20);
|
||||||
|
GCL_WNDPROC = (-24);
|
||||||
|
GCW_STYLE = (-26);
|
||||||
|
Loading…
Reference in New Issue
Block a user