Texas Instruments TI-89 Developer's Manual page 394

Graphing calculator
Hide thumbs Also See for TI-89:
Table of Contents

Advertisement

352
DialogNew
(continued)
void TestD3( void ) {
static HANDLE hD1;
static HANDLE hM1;
static WORD Key;
if (hM1 = MenuNew(0,0,0)) {
MenuAddText( hM1, -1, "MENU1", 0, 0 );
MenuAddText( hM1, -1, "MENU2", 0, 0 );
MenuAddText( hM1, -1, "EXIT", 0, 0 );
if (MenuFlags(hM1) & MF_ERROR) {
HeapFree(hM1);
return;
}
}
if (hP1 = PopupNew(NULL,0)) {
PopupAddText( hP1, -1, "POPUP ENTRY 1", 10 );
PopupAddText( hP1, -1, "EXIT DIALOG", 20 );
PopupAddText( hP1, -1, "POPUP ENTRY 3", 30 );
if (MenuFlags(hP1) & MF_ERROR)
return;
}
if (hP2 = PopupNew(NULL,0)) {
PopupAddText( hP2, -1, "DUMMY ENTRY", 0 );
if (MenuFlags(hP2) & MF_ERROR)
return;
}
if (hD1 = DialogNew( 0,0, CallBackD3 )) {
DialogAdd( hD1, DF_OWNER_DRAW, 8, 28, D_HPOPUP, "Owner draw", hP2, 0 );
DialogAdd( hD1, 0, 8, 38, D_HPOPUP, "DB_EXIT", hP1, 1 );
DialogAdd( hD1, 0, 8, 48, D_EDIT_FIELD, "Type 'EXIT' to quit", 0, 10, 10 );
DialogAdd( hD1, 0, 8, 58, D_DYNPOPUP, "DYN_POPUP", &CallBackH, 2 );
DialogAdd( hD1, 0, 0, 0, D_MENU, (MENU *) HLock(hM1), 0 );
}
else
return;
Opts[0] = 10;
Opts[1] = 30;
Opts[2] = 30;
strcpy( Buf, "TEST" );
do {
DialogDo( hD1, -1, -1, &Buf[0], &Opts[0] );
Key = DlgMessage("TITLE", "Dialog ended, press ESC to completely exit or ENTER
} while (KB_ESC != Key);
DialogFree( hD1 );
PopupFree( hP1 );
PopupFree( hP2 );
HeapFree( hM1 );
}
TI-89 / TI-92 Plus Developer Guide
to try again", PDB_OK, PDB_CANCEL );
Not for Distribution
Appendix A: System Routines — Dialog
Beta Version January 26, 2001

Hide quick links:

Advertisement

Table of Contents
loading

This manual is also suitable for:

Ti-92 plusTi-92 plus

Table of Contents