No.  I was trying to get the label text from a Selector control and save it
to a char* variable.  Here is a copy of the comments from the API Reference
documentation about using CtlSetLabel...

This function stores the newLabel pointer in the control's data structure.
It doesn't make a copy of the string that is passed in.
Therefore, if you use CtlSetLabel, you must manage the string yourself. You
must ensure that it persists for as long as it is being displayed (that is,
for as long as the control is displayed or until you call CtlSetLabel with
a new string), and you must free the string after it is no longer in use
(typically after the form containing the control is freed).
If you never use CtlSetLabel, you do not need to worry about freeing a
control's label.

Can you send me lines of code to do a CtlSetLabel() and save the label to a
char* variable using the string handle returned from CtrGetLabel()?

-Elizabeth


                                                                                       
                          
                    Peter Epstein                                                      
                          
                    <[EMAIL PROTECTED]>           To:     Palm Developer 
Forum                         
                    Sent by:                                
<[EMAIL PROTECTED]>                     
                    bounce-palm-dev-forum-8072@news.        cc:                        
                          
                    palmos.com                              Subject:     RE: Question 
on CtlGetLabel()           
                                                                                       
                          
                                                                                       
                          
                    08/07/01 04:15 PM                                                  
                          
                    Please respond to Palm Developer                                   
                          
                    Forum                                                              
                          
                                                                                       
                          
                                                                                       
                          




I think Elizabeth is saying that labels aren't controls, and that Control
APIs don't work on labels. That's true.
--
Peter Epstein

--
For information on using the Palm Developer Forums, or to unsubscribe,
please see http://www.palmos.com/dev/tech/support/forums/





--
For information on using the Palm Developer Forums, or to unsubscribe, please see 
http://www.palmos.com/dev/tech/support/forums/

Reply via email to