Ok, so if I change the label text w/ CtlSetLabel I should first get the old text pointer w/ CtlGetLabel & free it. If the label text was set in the resource, however, it is not dynamic memory and trying to free it would result in some sort of memory violation (I assume). How can I tell the difference, given a text pointer returned by CtlGetLabel, between a text pointer that should be freed and one that should not be freed? -- -Richard M. Hartman [EMAIL PROTECTED] 186,000 mi./sec ... not just a good idea, it's the LAW! > -----Original Message----- > From: Bob Ebert [mailto:[EMAIL PROTECTED]] > > > > The only slightly odd thing is that CtlSetLabel just saves > the pointer you > pass in, it does not copy the text, so if the string is > dynamic you need to > be a little bit careful about the memory management. In this > case, it's > probably OK to re-use the buffer that's returned from > CtlGetLabel, assuming > you've previously set the control's label to dynamic memory > that you manage. >
