Re: How to put CFString into any static ppob control
by David Phillip Oster <oster@[EMAIL PROTECTED]
>
Aug 18, 2005 at 03:37 PM
In article <1124371090.758350.206620@[EMAIL PROTECTED]
>,
"Neel" <nilesh.khemkar@[EMAIL PROTECTED]
> wrote:
> I am localizing my application, for that i am searching how
> to put/replace CFString
> into anyone ppob dialog control say LStaticText.
> Can anyone provide me a snippet of the code for doing the
> same ?
You are luck you are using a LStaticText. If you used a LCaption, you'd
have to use Constructor to edit your dialog's resoruces to replace it
with a LStaticText.
LStaticText inherits from LPane, so:
LStaticText* tex = win->FindPaneByID( 100 );
tex->SetCFDescriptor( cfs );
// If you are done with the CFString:
CFRelease(cfs);
Note that PowerPlant provides convenient cl***** that wrap Core
Foundation objects like CFString and take care of calling CFRelease for
you. Look in:
:Metrowerks Codewarrior:Mac OS Sup****t:PowerPlant:_In Progress:_Core
Foundation:
--
David Phillip Oster