Neel
2006-05-09 09:54:08 UTC
Hi there,
I am localizing my application, and searching how to put/insert
CFString in PopUpButton.
Here is the snippet of the code.
else if ( (l_popUpList = dynamic_cast<LPopupButton *>(pane) ) != NULL)
{
Str255 l_pData;
l_popUpList->GetMenuItemText(l_popUpList->GetValue(), l_pData);
MapIDToUnicode(&l_pData, &dst);
if( NULL != (cfS =
CFStringCreateWithPascalString(kCFAllocatorDefault, dst,
kCFStringEncodingUTF8)))
{
// This method does change but not each and every items inside the
popup
l_popUpList->SetCFDescriptor( cfS );
// ?????? Here want to use something like
InsertMenuItem(...)
CFRelease(cfS);
l_popUpList->Refresh();
}
}
Appreciate with your advice!
Thanks!
Neel
I am localizing my application, and searching how to put/insert
CFString in PopUpButton.
Here is the snippet of the code.
else if ( (l_popUpList = dynamic_cast<LPopupButton *>(pane) ) != NULL)
{
Str255 l_pData;
l_popUpList->GetMenuItemText(l_popUpList->GetValue(), l_pData);
MapIDToUnicode(&l_pData, &dst);
if( NULL != (cfS =
CFStringCreateWithPascalString(kCFAllocatorDefault, dst,
kCFStringEncodingUTF8)))
{
// This method does change but not each and every items inside the
popup
l_popUpList->SetCFDescriptor( cfS );
// ?????? Here want to use something like
InsertMenuItem(...)
CFRelease(cfS);
l_popUpList->Refresh();
}
}
Appreciate with your advice!
Thanks!
Neel