NOTICETPL() Function - Get Notice String Template
Syntax
NOTICETPL(objtype,code{,ERR=lineref})
Description
For BBj-specific information, see NOTICETPL() Function - BBj.
The NOTICETPL() function retrieves the template string definition for the specified Notice code and object for grid, INPUTE, INPUTN, list edit, list button, and tab controls.
Parameter |
Description |
objtype |
Object type. |
code |
Notice code. See grid; INPUTE and INPUTN; list button, list edit; tab, and edit. |
ERR=lineref |
Branch to be taken if an error occurs during execution. |
Values for objtype Parameter
The following defines the object type settings for the objtype parameter:
Value |
Description |
-1 |
Windows operating system notice event. |
1 |
Top level Window. |
2 |
Bordered Child Window. |
7 |
Borderless Child Window. |
11 |
Button control. |
12 |
Radio Button control. |
13 |
Check Box control. |
14 |
Horizontal Scroll Bar control. |
15 |
Vertical Scroll Bar control. |
16 |
Edit control. |
17 |
Static Text control. |
18 |
List Box control. |
19 |
List Button control. |
20 |
List Edit control. |
21 |
Group Box control. |
22 |
Custom Edit control. |
100 |
Menu Item control. |
101 |
Checkable Menu Item. |
102 |
Status Bar control. |
103 |
Tool Button control. |
104 |
INPUTE control. |
105 |
INPUTN control. |
106 |
Tab control. |
107 |
Grid control. |
Example
This example shows the basic structure of an event loop in a Visual PRO/5 program, including details on how to interpret arbitrary Notify events.
sysgui=unt; open (sysgui)"X0"
print (sysgui)'window'(0,40,640,400,"Event Loop",$0401088f$,$ffffffff$)
print (sysgui)'inpute'(101,40,40,200,0,$1000$,10,"","INPUTE")
dim event$:tmpl(sysgui),base$:noticetpl(0,0)
event_len=len(event$),done=0
repeat
read record(sysgui,siz=event_len)event$
switch asc(event.code$)
case asc("N"); rem ' Notify event
base$=notice(sysgui,event.x%); rem ' Get notice string.
Dim notice$:noticetpl(base.objtype%,event.flags%)
notice$=base$; rem ' Assign notice string to template.
Switch notice.objtype%
case 19; rem ' List Button Control
break
case 20; rem ' List Edit Control
break
case 104; rem ' INPUTE Control
switch event.flags
case 1; print hta(notice.key$); rem ' Keypress
break
case 2; print notice.error; rem ' Error
break
swend
break
case 105; rem ' INPUTN Control
break
case 106; rem ' Tab Control
break
case 107; rem ' Grid Control
break
swend; rem notice.objtype%
break
case asc("X"); rem - Close box operated
done=1
swend; rem asc(event.code$)
until done
stop