Texas Instruments TI89 Developer Guide - Page 166
WinOpen, WinBackupToScr, DlgNotice, DynMenuAdd
![]() |
UPC - 033317198566
View all Texas Instruments TI89 manuals
Add to My Manuals
Save this manual to your list of manuals |
Page 166 highlights
124 Chapter 11: Creating the User Interface Lines 42, 43 Lines 45 . . . 50 Lines 51 . . . 57 Lines 58 . . . 61 Lines 62 . . . 64 Lines 65 . . . 67 Lines 68 . . . 70 Lines 73 . . . 77 When another app is switched to in split screen mode or our app is about to be closed a deactivate message is sent and we restore the saved screen state. The quit message signals our app is about to be closed. We close our window if it was opened (all opened windows must eventually be closed) and mark it as closed. Echo printable characters to our window, let the system respond to any other keys (if we did not the system would not work). We receive a paint message when the system wants us to redraw our window. The WF_DUP_SCR in our call to WinOpen tells the system to make a backup of all of our writes to our window (at the cost of extra memory and time) and so all we have to do is redraw our border and call WinBackupToScr to copy the duplicate screen image to the display. ACM_WINSTR is a menu ID defined in app1.h (line 98) and stored in our menu (line 110). Application menu IDs range from 0x500 . . . 0x6FF and are used to return values to an app. Since it is stored in our menu and the system is handling our menu we get the command automatically when the user selects it from our menu. In this case we just draw a string to our window. ACM_DIALOG (lines 99, 111), another of our menu IDs is sent when it is selected from our menu to call our dialog (defined on lines 118 . . . 134). We then setup the parameters for our dialog. The edit field parameters were set on lines 32 and 33 in response to our start-up message and so their values will only change when the app is started. The array opts contains the values passed to and returned for the two dropdowns (lines 121, 122 and lines 126 . . . 134) in the dialog box. If ¸ is pressed to close the dialog box (N is the other valid key) we display the values selected using DlgNotice. DlgNotice creates a dynamic dialog box and places the strings we pass along with ¸ and N buttons. Here we create a dynamic pop-up using the values entered in the dialog box and one additional static item. Instead of using predefined menu IDs we pass 0 (the second parameter to DynMenuAdd) so that they are assigned sequentially (starting with 1). TI-89 / TI-92 Plus Developer Guide Not for Distribution Beta Version January 26, 2001
![](/manual_guide/products/texas-instruments-ti89-developer-guide-95b636f/166.png)