Path: utzoo!dciem!juana From: juana@dciem.dciem.dnd.ca (Juana Chang) Newsgroups: comp.sys.mac.programmer Subject: Think C programming Message-ID: <2967@dciem.dciem.dnd.ca> Date: 8 Mar 90 16:35:03 GMT Organization: DCIEM, Toronto, Canada Lines: 35 Hi. I am new to this news group and I am attempting to learn how to program in the Macintosh environment with Think C 4.0 which by the way I am also learning. And I need HELP ! I am trying to produce a DIALOG BOX with editable items. And I want to: 1. Get the text in the dialog item. 2. Convert the text to an integer. 3. Edit check this integer. Therefore, I use: GetDItem( theDialog, ITEM, &i_itemType, &hdl_item, &rect_item ); /* in order to get the item handle */ GetIText( &hdl_item, str_item ); /* in order to get the text */ This is where I get stuck... I print the contents of str_item and get GARBAGE! (pretty little symbols). I printed the contents out of curiosity and to make sure I was getting the actual contents that the user places in the editable text box. I used the DrawString function to print the text onto the screen. Why am I getting GARBAGE?? Thanks in advance. :-)