mirror of
https://gitlab.com/freepascal.org/fpc/source.git
synced 2025-08-14 17:09:10 +02:00
+ added the win16api dialog and control management functions
git-svn-id: trunk@31810 -
This commit is contained in:
parent
09b0f516ee
commit
f3c235ef8a
@ -1160,3 +1160,55 @@ function TranslateMDISysAccel(hwndClient: HWND; var msg: MSG): BOOL; external 'U
|
|||||||
{$endif}
|
{$endif}
|
||||||
|
|
||||||
function ArrangeIconicWindows(hwnd: HWND): UINT; external 'USER';
|
function ArrangeIconicWindows(hwnd: HWND): UINT; external 'USER';
|
||||||
|
|
||||||
|
{ Dialog and Control Management }
|
||||||
|
|
||||||
|
function IsDialogMessage(hwndDlg: HWND; lpmsg: LPMSG): BOOL; external 'USER';
|
||||||
|
{$ifdef VAR_PARAMS_ARE_FAR}
|
||||||
|
function IsDialogMessage(hwndDlg: HWND; var msg: MSG): BOOL; external 'USER';
|
||||||
|
{$endif}
|
||||||
|
|
||||||
|
function DefDlgProc(hwndDlg: HWND; uMsg: UINT; wParam: WPARAM; lParam: LPARAM): LRESULT; external 'USER';
|
||||||
|
|
||||||
|
function CreateDialog(hinst: HINST; lpszDlgTemp: LPCSTR; hwndOwner: HWND; dlgprc: DLGPROC): HWND; external 'USER';
|
||||||
|
function CreateDialog(hinst: HINST; lpszDlgTemp: LPCSTR; hwndOwner: HWND; dlgprc: TFarProc): HWND; external 'USER';
|
||||||
|
function CreateDialogIndirect(hinst: HINST; lpvDlgTmp: FarPointer; hwndOwner: HWND; dlgprc: DLGPROC): HWND; external 'USER';
|
||||||
|
function CreateDialogIndirect(hinst: HINST; lpvDlgTmp: FarPointer; hwndOwner: HWND; dlgprc: TFarProc): HWND; external 'USER';
|
||||||
|
function CreateDialogParam(hinst: HINST; lpszDlgTemp: LPCSTR; hwndOwner: HWND; dlgprc: DLGPROC; lParamInit: LPARAM): HWND; external 'USER';
|
||||||
|
function CreateDialogParam(hinst: HINST; lpszDlgTemp: LPCSTR; hwndOwner: HWND; dlgprc: TFarProc; lParamInit: LPARAM): HWND; external 'USER';
|
||||||
|
function CreateDialogIndirectParam(hinst: HINST; lpvDlgTmp: FarPointer; hwndOwner: HWND; dlgprc: DLGPROC; lParamInit: LPARAM): HWND; external 'USER';
|
||||||
|
function CreateDialogIndirectParam(hinst: HINST; lpvDlgTmp: FarPointer; hwndOwner: HWND; dlgprc: TFarProc; lParamInit: LPARAM): HWND; external 'USER';
|
||||||
|
|
||||||
|
function DialogBox(hinst: HINST; lpszDlgTemp: LPCSTR; hwndOwner: HWND; dlgprc: DLGPROC): SmallInt; external 'USER';
|
||||||
|
function DialogBox(hinst: HINST; lpszDlgTemp: LPCSTR; hwndOwner: HWND; dlgprc: TFarProc): SmallInt; external 'USER';
|
||||||
|
function DialogBoxIndirect(hinst: HINST; hglbDlgTemp: HGLOBAL; hwndOwner: HWND; dlgprc: DLGPROC): SmallInt; external 'USER';
|
||||||
|
function DialogBoxIndirect(hinst: HINST; hglbDlgTemp: HGLOBAL; hwndOwner: HWND; dlgprc: TFarProc): SmallInt; external 'USER';
|
||||||
|
function DialogBoxParam(hinst: HINST; lpszDlgTemp: LPCSTR; hwndOwner: HWND; dlgprc: DLGPROC; lParamInit: LPARAM): SmallInt; external 'USER';
|
||||||
|
function DialogBoxParam(hinst: HINST; lpszDlgTemp: LPCSTR; hwndOwner: HWND; dlgprc: TFarProc; lParamInit: LPARAM): SmallInt; external 'USER';
|
||||||
|
function DialogBoxIndirectParam(hinst: HINST; hglbDlgTemp: HGLOBAL; hwndOwner: HWND; dlgprc: DLGPROC; lParamInit: LPARAM): SmallInt; external 'USER';
|
||||||
|
function DialogBoxIndirectParam(hinst: HINST; hglbDlgTemp: HGLOBAL; hwndOwner: HWND; dlgprc: TFarProc; lParamInit: LPARAM): SmallInt; external 'USER';
|
||||||
|
|
||||||
|
procedure EndDialog(hwndDlg: HWND; nResult: SmallInt); external 'USER';
|
||||||
|
|
||||||
|
function GetDlgCtrlID(hwnd: HWND): SmallInt; external 'USER';
|
||||||
|
function GetDlgItem(hwndDlg: HWND; idControl: SmallInt): HWND; external 'USER';
|
||||||
|
function SendDlgItemMessage(hwndDlg: HWND; idDlgItem: SmallInt; uMsg: UINT; wParam: WPARAM; lParam: LPARAM): LRESULT; external 'USER';
|
||||||
|
|
||||||
|
procedure SetDlgItemInt(hwndDlg: HWND; idControl: SmallInt; uValue: UINT; fSigned: BOOL); external 'USER';
|
||||||
|
function GetDlgItemInt(hwndDlg: HWND; idControl: SmallInt; lpfTranslated: LPBOOL; fSigned: BOOL): UINT; external 'USER';
|
||||||
|
|
||||||
|
procedure SetDlgItemText(hwndDlg: HWND; idControl: SmallInt; lpsz: LPCSTR); external 'USER';
|
||||||
|
function GetDlgItemText(hwndDlg: HWND; idControl: SmallInt; lpsz: LPSTR; cbMax: SmallInt): SmallInt; external 'USER';
|
||||||
|
|
||||||
|
procedure CheckDlgButton(hwndDlg: HWND; idButton: SmallInt; uCheck: UINT); external 'USER';
|
||||||
|
procedure CheckRadioButton(hwndDlg: HWND; idFirstButton, idLastButton, idCheckButton: SmallInt); external 'USER';
|
||||||
|
function IsDlgButtonChecked(hwndDlg: HWND; idButton: SmallInt): UINT; external 'USER';
|
||||||
|
|
||||||
|
function GetNextDlgGroupItem(hwndDlg, hwndCtrl: HWND; fPrevious: BOOL): HWND; external 'USER';
|
||||||
|
function GetNextDlgTabItem(hwndDlg, hwndCtrl: HWND; fPrevious: BOOL): HWND; external 'USER';
|
||||||
|
|
||||||
|
procedure MapDialogRect(hwndDlg: HWND; lprc: LPRECT); external 'USER';
|
||||||
|
{$ifdef VAR_PARAMS_ARE_FAR}
|
||||||
|
procedure MapDialogRect(hwndDlg: HWND; var rc: RECT); external 'USER';
|
||||||
|
{$endif}
|
||||||
|
function GetDialogBaseUnits: DWORD; external 'USER';
|
||||||
|
@ -39,6 +39,9 @@ type
|
|||||||
{ PDWORD is already defined in system }
|
{ PDWORD is already defined in system }
|
||||||
LPDWORD = ^DWORD; far;
|
LPDWORD = ^DWORD; far;
|
||||||
|
|
||||||
|
PBOOL = ^BOOL;
|
||||||
|
LPBOOL = ^BOOL; far;
|
||||||
|
|
||||||
LPVOID = FarPointer;
|
LPVOID = FarPointer;
|
||||||
|
|
||||||
FARPROC = FarPointer;
|
FARPROC = FarPointer;
|
||||||
@ -2208,3 +2211,81 @@ type
|
|||||||
|
|
||||||
const
|
const
|
||||||
WM_CHILDACTIVATE = $0022;
|
WM_CHILDACTIVATE = $0022;
|
||||||
|
|
||||||
|
{ Dialog and Control Management }
|
||||||
|
|
||||||
|
{ Dialog window class }
|
||||||
|
WC_DIALOG = MAKEINTATOM($8002);
|
||||||
|
|
||||||
|
{ cbWndExtra bytes needed by dialog manager for dialog classes }
|
||||||
|
DLGWINDOWEXTRA = 30;
|
||||||
|
|
||||||
|
{ Dialog styles }
|
||||||
|
DS_ABSALIGN = $01;
|
||||||
|
DS_SYSMODAL = $02;
|
||||||
|
DS_LOCALEDIT = $20;
|
||||||
|
DS_SETFONT = $40;
|
||||||
|
DS_MODALFRAME = $80;
|
||||||
|
DS_NOIDLEMSG = $100;
|
||||||
|
|
||||||
|
{ Dialog messages }
|
||||||
|
DM_GETDEFID = (WM_USER+0);
|
||||||
|
DM_SETDEFID = (WM_USER+1);
|
||||||
|
|
||||||
|
{ Returned in HIWORD() of DM_GETDEFID result if msg is supported }
|
||||||
|
DC_HASDEFID = $534B;
|
||||||
|
|
||||||
|
{ Dialog notification messages }
|
||||||
|
WM_INITDIALOG = $0110;
|
||||||
|
WM_NEXTDLGCTL = $0028;
|
||||||
|
|
||||||
|
WM_PARENTNOTIFY = $0210;
|
||||||
|
|
||||||
|
WM_ENTERIDLE = $0121;
|
||||||
|
|
||||||
|
type
|
||||||
|
DLGPROC = function(hwndDlg: HWND; msg: UINT; wParam: WPARAM; lParam: LPARAM): BOOL; far;
|
||||||
|
|
||||||
|
const
|
||||||
|
{ Get/SetWindowWord/Long offsets for use with WC_DIALOG windows }
|
||||||
|
DWL_MSGRESULT = 0;
|
||||||
|
DWL_DLGPROC = 4;
|
||||||
|
DWL_USER = 8;
|
||||||
|
|
||||||
|
WM_GETDLGCODE = $0087;
|
||||||
|
|
||||||
|
{ dialog codes }
|
||||||
|
DLGC_WANTARROWS = $0001;
|
||||||
|
DLGC_WANTTAB = $0002;
|
||||||
|
DLGC_WANTALLKEYS = $0004;
|
||||||
|
DLGC_WANTMESSAGE = $0004;
|
||||||
|
DLGC_HASSETSEL = $0008;
|
||||||
|
DLGC_DEFPUSHBUTTON = $0010;
|
||||||
|
DLGC_UNDEFPUSHBUTTON = $0020;
|
||||||
|
DLGC_RADIOBUTTON = $0040;
|
||||||
|
DLGC_WANTCHARS = $0080;
|
||||||
|
DLGC_STATIC = $0100;
|
||||||
|
DLGC_BUTTON = $2000;
|
||||||
|
|
||||||
|
WM_CTLCOLOR = $0019;
|
||||||
|
|
||||||
|
{ WM_CTLCOLOR control IDs }
|
||||||
|
CTLCOLOR_MSGBOX = 0;
|
||||||
|
CTLCOLOR_EDIT = 1;
|
||||||
|
CTLCOLOR_LISTBOX = 2;
|
||||||
|
CTLCOLOR_BTN = 3;
|
||||||
|
CTLCOLOR_DLG = 4;
|
||||||
|
CTLCOLOR_SCROLLBAR = 5;
|
||||||
|
CTLCOLOR_STATIC = 6;
|
||||||
|
|
||||||
|
WM_SETFONT = $0030;
|
||||||
|
WM_GETFONT = $0031;
|
||||||
|
|
||||||
|
{ Standard dialog button IDs }
|
||||||
|
IDOK = 1;
|
||||||
|
IDCANCEL = 2;
|
||||||
|
IDABORT = 3;
|
||||||
|
IDRETRY = 4;
|
||||||
|
IDIGNORE = 5;
|
||||||
|
IDYES = 6;
|
||||||
|
IDNO = 7;
|
||||||
|
Loading…
Reference in New Issue
Block a user