المساعد الشخصي الرقمي

مشاهدة النسخة كاملة : Sending values to WPF control from VC++



C++ Programming
02-16-2010, 06:21 PM
Hi,Im using WPF as C# dll in VC++.Im sending datas to the Listbox inthe third tabitem in a tabcontrol by using this coding.
void CToolTab::SendPresetmenu(CString menu)
{
FrameworkElement^ page;
String ^ msg = gcnew String( menu );
Globals1::gwpreset->AddPresetmenu(msg);
page = Globals1::gwpreset;
Globals1::gHwndSource->RootVisual = page;}
By this code,wat happend is my entire tabcontrol becomes a third tab item.there is not other tabs .
If i commented those last two bolded line.Full tabcotrol appears correctly but the listbox doesnot contain text.
How can i do that?Anu