home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
BUG 4
/
BUGCD1997_05.BIN
/
aplic
/
clip4win
/
clip4win.exe
/
C4W30E.HUF
/
INCLUDE
/
DIALOG.CH
< prev
next >
Wrap
Text File
|
1993-11-17
|
3KB
|
111 lines
////////////////////////////
//
// Clip-4-Win DIALOG GET definitions
//
// Copyright (C) 1993 Skelton Software, Kendal Cottage, Hillam, Leeds, UK.
// All Rights Reserved.
//
// These #command's allow GETs to be used in dialogs (as edit
// controls), as well as allowing you to specify the font to
// use, etc.
//
// NOTE: You can choose a font either using something like:
//
// @ DIALOG hDlg ID ID_MYEDIT GET nVar ;
// FONT GetStockObject(ANSI_VAR_FONT)
//
// which uses one of the pre-defined fonts, or use a font from
// CreateFont() or ChooseFont().
//
// You can check whether the GETs are ok (basically, whether
// a K_PGDN would be acceptable) using the IsDialogOK() function,
// as shown below. You can quit the GETs using CANCEL DIALOG as
// shown.
//
// case nMsg == WM_COMMAND
// do case
// case nwParam == IDD_OK ;
// .or. nwParam == IDOK ;
// .or. nwParam == IDYES
// if IsDialogOK(hWndDlg, nwParam)
// EndDialog(hWndDlg, nwParam)
// endif
// case nwParam == IDCANCEL ;
// .or. nwParam == IDABORT ;
// .or. nwParam == IDNO
// CANCEL DIALOG hWndDlg
// EndDialog(hWndDlg, nwParam)
// endcase
//
//
////////////////////////////
#ifndef C4W_DIALOG_CH
#define C4W_DIALOG_CH
#command @ DIALOG <hWndDlg> ;
ID <nId> ;
GET <var> ;
[PICTURE <pic>] ;
[VALID <valid>] ;
[WHEN <when>] ;
[FONT <hFont>] ;
[SEND <msg>] ;
=> SetPos(500, 1) ;
; AAdd( ;
GetList, ;
_GET_( <var>, <(var)>, <pic>, <{valid}>, <{when}> ) ;
) ;
; DReadSetInfo( <hWndDlg>, <nId>, GetList, Len(GetList) ) ;
[; DReadSetFont( <hFont> ) ] ;
; _DlogAddGet( <hWndDlg>, <nId>, GetList, Len(GetList) ) ;
[; ATail(GetList):<msg>]
#command @ DIALOG <hWndDlg> ;
ID <nId> ;
GET [USING] BLOCK <bGetSet> ;
[NAME <cName>] ;
[ROW <nRow>] ;
[COLUMN <nCol>] ;
[PICTURE <pic>] ;
[COLOR <colour>] ;
[FONT <hFont>] ;
[SEND <msg>] ;
=> AAdd( ;
GetList, ;
GetNew( 500, 1, <bGetSet>, <cName>, <pic>, <colour> ) ;
) ;
; DReadSetInfo( <hWndDlg>, <nId>, GetList, Len(GetList) ) ;
[; DReadSetFont( <hFont> ) ] ;
; _DlogAddGet( <hWndDlg>, <nId>, GetList, Len(GetList) ) ;
[; ATail(GetList):<msg>]
#command @ DIALOG <hWndDlg> ;
ID <nId> ;
GET <var> ;
[<clauses,...>] ;
RANGE <lo>, <hi> ;
[<moreClauses,...>] ;
=> @ DIALOG <hWndDlg> ;
ID <nId> ;
GET <var> ;
[<clauses>] ;
VALID {|_1| DRangeCheck(_1, , <lo>, <hi>)} ;
[<moreClauses>]
#xtranslate IsDialogOK( <hDlg> [, <nId> ] ) ;
=> IsDReadOK( <hDlg> [, <nId> ] ) // .t. if valid GETs
#command CANCEL DIALOG <hDlg> ;
=> DReadCancel( <hDlg> ) // like K_ESC
#endif // C4W_DIALOG_CH