Hi, I am working on an application, which calls a WPF page in MFC exe and loads it too, but the backgound for the WPF is coming black. here is code snippet Declaration using namespace System; using namespace System::Windows; using namespace System::Windows::Controls; using namespace System::Windows::Media; ref class Globals { public: static System::Windows::Interop::HwndSource^ gHwndSource; static WpfApplication1::Window1^ gwcContainer; }; i have added in oninitdialog, System::Windows::Interop::HwndSourceParameters^ sourceParams = gcnew System::Windows::Interop::HwndSourceParameters("MyWindowName"); sourceParams->PositionX = 20; sourceParams->PositionY = 30; sourceParams->ParentWindow = System::IntPtr(this->GetSafeHwnd()); sourceParams->WindowStyle = WS_VISIBLE | WS_CHILD; System::Windows::Interop::HwndSource^ source = gcnew System::Windows::Interop::HwndSource(*sourceParams); source->SizeToContent = System::Windows::SizeToContent::WidthAndHeight; Globals::gwcContainer = gcnew WpfApplication1::Window1(); FrameworkElement^ myPage = Globals::gwcContainer; source->RootVisual = myPage; I dont want the black color around. Any help is highly appriciated. Thanks&Regards, KDevloper
kDevloper
Posts
-
Calling WPF pages in VC++ -
Calling WPF pages in VC++Hi, I am working on an application, which calls a WPF page in MFC exe and loads it too, but the backgound for the WPF is coming black. here is code snippet Declaration using namespace System; using namespace System::Windows; using namespace System::Windows::Controls; using namespace System::Windows::Media; ref class Globals { public: static System::Windows::Interop::HwndSource^ gHwndSource; static WpfApplication1::Window1^ gwcContainer; }; i have added in oninitdialog, System::Windows::Interop::HwndSourceParameters^ sourceParams = gcnew System::Windows::Interop::HwndSourceParameters("MyWindowName"); sourceParams->PositionX = 20; sourceParams->PositionY = 30; sourceParams->ParentWindow = System::IntPtr(this->GetSafeHwnd()); sourceParams->WindowStyle = WS_VISIBLE | WS_CHILD; System::Windows::Interop::HwndSource^ source = gcnew System::Windows::Interop::HwndSource(*sourceParams); source->SizeToContent = System::Windows::SizeToContent::WidthAndHeight; Globals::gwcContainer = gcnew WpfApplication1::Window1(); FrameworkElement^ myPage = Globals::gwcContainer; source->RootVisual = myPage; I dont want the black color around. Any help is highly appriciated. Thanks&Regards, KDevloper
-
Shellexecute and installing a file with out showing any further dialogs.Hi,, I have a file abc.reg.I want to install the registry file , but the main point is the RUN dialog as well as the conformation dialog should be hidden to the user. After shell execute the installation should be done silently. Any help is appriciated. Regards, KDevloper
-
Adding binaries to a registry?Hi Palini, It's not a kind of UNICODE Build, i have a set of values as say "12324323242300000",which i need to add to registry as REG_BINARY. The earlier vaue was as a result of a different way of implementation. but lets forget the giant value. i hope the lines of code will be my final way to implement :-D . Hey wat's dat " WER r u at...." Regards, KDevloper
-
Adding binaries to a registry?Even i restricted the size the value does not appear at the registry.Below is the code: CString szRegData = "NEW"; CString strData = "abcd"; HKEY hMainKey; DWORD dwsize = strData.GetLength(); if(RegOpenKey(HKEY_LOCAL_MACHINE,"Software\\abc\\abc\\Current Version",&hMainKey)==ERROR_SUCCESS) { if(RegSetValueEx(hMainKey,szRegData,NULL,REG_BINARY,(LPBYTE)strData.GetBuffer(),dwsize)==ERROR_SUCCESS) { strData.ReleaseBuffer(); RegCloseKey(hMainKey); return TRUE; } RegCloseKey(hMainKey); } Thanks &Regards, kDevloper
-
Adding binaries to a registry?Hi all, i am trying to add a set of binaries to registry but the size of the value i am trying to add is giving me 825243701 :doh: . any help is appriciated. Regards, KDevloper
-
Why CreateCompatibleDC not only CreateDC?Hi, why do we need to use CreateCompatibleDC to create a DC even though we can create a Dc using CreateDC? Regards, KDevloper
-
Difference between subclasswindow and subclassdlgitem?Thanks Palini. :) Regards, KDevloper
-
Difference between OnPaint and OnDrawHi, Can any one please let me know the difference between OnPaint and OnDraw? Regards, KDevloper
-
Difference between subclasswindow and subclassdlgitem?Hi, can anyone please let me know what's the exact difference between subclasswindow and subclassdlgitem in subclassing? Regards, KDevloper
-
difference between char* and char** in C++Hi, Can anyone pleae explain the difference between char* and char** in c++, with examples. Regards, KDevloper
-
New interfaceHow to add a neew interface to an existing COM application? Regards, KDevloper
-
3D arrayHah.. :)
-
3D arrayHi CPallini, I have not disabled my mental compiler, i understood, thats a typo error.So i corrected it from my side, without mentioning it.. Thanks & Regards, KDevloper
-
3D arrayThanks.
-
3D arrayHi, How to initialise a 3D array through a function? Regards, KDevloper
-
Synchronization concepts.. [modified]Thanks John, Am sorry to mention that i need Multithreading programming using Visual c++. Regards, KDevloper
-
Synchronization concepts.. [modified]Hi, Need help in Synchronizing Execution of Multiple Threads in VC++, i am new to Multithreading Programming.. Any related book or documents will be useful. :) Regards, KDevloper
modified on Saturday, October 4, 2008 12:25 AM
-
Crash at customized buttonDuring the conversation n fighting session i got the answer to my pbm.. Thanks For the info. Regards, KDevloper
-
Crash at customized buttonI dont think this is not the right way to answer some one.. n e ways am not here to see or ask for any super power or paste the answer for me by some one. u shud 1st read before answering some one. How to get an answer to your question by Chris Maunder :)