home *** CD-ROM | disk | FTP | other *** search
Text File | 1994-09-03 | 559 b | 24 lines | [TEXT/PJMM] |
- program TestCDEF;
- const
- DIALOG = 128;
- PAGE1 = 132;
- PAGE2 = 133;
- PICTCNTLITEM = 4;
- DONEITEM = 1;
- SWITCHITEM = 2;
- var
- theDialog: DialogPtr;
- item, itemType: integer;
- theControl: ControlHandle;
- r: Rect;
- begin
- theDialog := GetNewDialog(DIALOG, nil, windowPtr(-1));
- GetDItem(theDialog, PICTCNTLITEM, itemType, Handle(theControl), r);
- SetCtlValue(theControl, PAGE1);
- repeat
- DrawDialog(theDialog);
- ModalDialog(nil, item);
- if item = SWITCHITEM then
- SetCtlValue(theControl, 265 - GetCtlValue(theControl));
- until item = DONEITEM;
- end.