|
|
Hi friends,
I have a MFC dll which i m trying to load in Wpf. My Dll consist of a dialog which i
am trying to embedd in WPF Browser. i have done following steps.
a)Build my dll using /clr option
b)I have created a namespace in DLL and added a class which is being derived from
HWNDHost.
c) i have overridden
protected override HandleRef BuildWindowCore(HandleRef hwndParent)
{
}
in this function i have created a dialog and returning the handle of the window.
In the Main application(WPF) i am adding the reference of the Dll, then creating the object of it and then making it as a child control of WPF panel
my applications gets the handle of the window but it crashes..
Can anyone correct my steps if they are wrong
Thanks in Advance
Regards
Samir Satardekar
|
|
|
|
|
Did you look at this[^] ?
|
|
|
|
|
|
|
|
you will need to declare the 'ctrl' namespace in your XAML namespaces.
|
|
|
|
|
Stop reposting in different forums. I seen your post in the C# forum also. Stick to a forum.
|
|
|
|
|
I have a WPF application (client/server). i had created .exe file. when i install it on my client box it will install all the the dll's in the program files/manufactuere/ productname folder.It will install dll's of different languages also( spanish dll's in ES folder, portugese dll's in pt folder in program files/manufactuere/ productname)
What i need is when client is installing it i need to give him an option to select the language. based on the language it should install the concerning dll's in the client box.
Setup project is not giving any option to select language.
Please help thanks.
|
|
|
|
|
|
I couldn't run the vbscript in that post its giving me error.
API Error in this line set basedb = wi.OpenDatabase("C:\SetupEN.msi", 0)
Please help
thanks.
|
|
|
|
|
yes i did whole steps accordingly but when i try to install setupEn.msi its displaying in chinese.
i was wondering how would i get the options.
|
|
|
|
|
|
Hello everyone,
I made some progress. I use ItemsControl, DataTemplates an I can move my nodes over canvas.
Code:
public class NetworkNode
{
string Caption;
string Type;
int ID = 0;
int X = 0;
int Y = 0;
}
public class EndNode : NetworkNode {}
public class RouterNode : NetworkNode {}
public class Connection
{
int StartNode = 0;
int EndNode = 0;
}
Xaml:
<ItemsControl>
<ItemsControl.Items>
<cc:EndNode ID="0" Caption="Node" X="70" Y="20"/>
<cc:RouterNode ID="1" Caption="Router" X="220" Y="120"/>
<cc:EndNode ID="2" Caption="Router" X="120" Y="50"/>
<cc:Connection StartNode="0" EndNode="1"/>
<cc:Connection StartNode="1" EndNode="2"/>
</ItemsControl.Items>
</ItemsControl>
Now I try to solve how to connect the nodes. The problem is I want to data bind two nodes according to their ID's. This functionality provides for example Graphite for WPF (http://www.orbifold.net/default/?p=1326) but the source code is not available. I guess some binding converter will be required as well as multiple binding. But for me as beginner is hard to put all pieces together. Any ideas? Thank you.
|
|
|
|
|
|
Is anyone using Moonlight 2.0?? I'm looking at using it for my next project instead of Silverlight and was wondering if anyone had any comments re Moonlight/Silverlight compatibility..
Thanks in advance
Stuart
appSynergy.com - blur the boundaries of your devices
Capture public beta now open! Assisting our users to Get Things Done
Sign-up here
|
|
|
|
|
Moonlight 2.0 doesn't exist yet unless you're talking about alpha.
|
|
|
|
|
Yes, sorry, I should have been more clear.. I am referring to the Alpha.
-Stuart
appSynergy.com - blur the boundaries of your devices
Capture public beta now open! Assisting our users to Get Things Done
Sign-up here
|
|
|
|
|
I wish to disable particcular listbox items from a listbox binding with a list,How can i get the ListBoxitem?
|
|
|
|
|
You will have to databind the IsEnabled Property of ListBox item to a CLR property in the databound object. The Visual tree is not accessible easily once you use Data binding. Once you databind the IsEnabled property to a CLR property then setting the CLR property will automatically enable\disable the ListBox item.
Hope I made sense
|
|
|
|
|
hello
i need to load a 3d model from file and show it in viewport3d.
how do it?
thanks
[AmirHossein.MOjvar@yahoo.Com]
|
|
|
|
|
Hello evveryone,
I am trying to add my WPF controller to a winform dynamically. Could anyone please help me?
This is what I tried so fare
MyWinForm myForm = new MyWinForm();
WpfUserControl uc = new WpfUserControl();
if (ListBox.SelectedItem != null)
{
WPFObject selObject = Listbox.SelectedItem as WPFObject;
uc.GetObjects(selObject);
myForm.Controls.Add(uc);
myForm.Visible = true;
}
it throws an error. cannot convert WpfUsercontrol to System.Windows.Forms.Control. Is there a way to add WPF controller dynamic to a winform??
many thanks in advance!
|
|
|
|
|
You cannot directly use a WPF control in WinForms. You will need to use an ElementHost[^]
e.g.
ElementHost elhost = new ElementHost();<br />
elhost.Size = new Size(110, 60);<br />
elhost.Location = new Point(45,35);<br />
<br />
MyWPFControl wpfctl = new MyWPFControl();<br />
elhost.Child = wpfctl;<br />
<br />
myForm.Controls.Add(elhost);
See here[^]
|
|
|
|
|
Thank you very much, It was very heplfull
|
|
|
|
|