Right now the only way to use a WinForms control in MFC is to enable COM
Interop for the control and use it in MFC as you would any ActiveX control.
While this works, COM Interop is a pain, and an ActiveX control isn't as
straight-forward as a CWnd-derived object. It also means that I have to
split my code into two projects. Going the other way (using MFC in
WinForms) is only possible by exposing MFC objects as ActiveX controls,
which probalby means adding ATL to an existing MFC project.
Is any of this going to be easier/cleaner in Whidbey? What I have in mind
is something like (I'm sure I don't have all the new syntax right):
generic<typenam e FORM> where FORM : System::Windows ::Forms::Contro l
ref class CControlWrapper : public CWnd
{
private:
// lots of magic code to make a System::Windows ::Forms::Contro l object
look like a CWnd
protected:
FORM* m_WinFormContro l;
};
ref class CMyControl : public CControlWrapper <MyApp::MyUserC ontrol>
{
public:
void Method1() {
m_WinFormContro l->Method1();
}
};
This would make using CMyControl as easy as any other CWnd-derived object;
which would make it much easier to integrate WinForms controls into an
existing MFC application. Going the other way would be nice too, as there
are MFC-based controls available (I'm specifically thinking of http://codejock.com).
Can anybody comment?
Thanks,
Dan 5 1847
Yes, our plans are for more explicit support for integrating MFC and Windows
Forms in the Whidbey release.
It is still too early to share any preliminary design of that feature.
Ronald Laeremans
Visual C++ team
"Dan Smith" <J_************ @HoTMaiL.com> wrote in message
news:O3******** ******@TK2MSFTN GP09.phx.gbl... Right now the only way to use a WinForms control in MFC is to enable COM Interop for the control and use it in MFC as you would any ActiveX
control. While this works, COM Interop is a pain, and an ActiveX control isn't as straight-forward as a CWnd-derived object. It also means that I have to split my code into two projects. Going the other way (using MFC in WinForms) is only possible by exposing MFC objects as ActiveX controls, which probalby means adding ATL to an existing MFC project.
Is any of this going to be easier/cleaner in Whidbey? What I have in mind is something like (I'm sure I don't have all the new syntax right):
generic<typenam e FORM> where FORM : System::Windows ::Forms::Contro l ref class CControlWrapper : public CWnd { private: // lots of magic code to make a System::Windows ::Forms::Contro l object look like a CWnd protected: FORM* m_WinFormContro l; };
ref class CMyControl : public CControlWrapper <MyApp::MyUserC ontrol> { public: void Method1() { m_WinFormContro l->Method1(); } };
This would make using CMyControl as easy as any other CWnd-derived object; which would make it much easier to integrate WinForms controls into an existing MFC application. Going the other way would be nice too, as there are MFC-based controls available (I'm specifically thinking of http://codejock.com).
Can anybody comment?
Thanks, Dan
OK...I'll be anxiously waiting to see how this is supported. Glad to see
it's "on ths list". Is this not a "sexy" enough feature to make it onto
things like PDC presentations and .NET blogs?
Dan
"Ronald Laeremans [MSFT]" <ro*****@online .microsoft.com> wrote in message
news:ed******** ******@TK2MSFTN GP10.phx.gbl... Yes, our plans are for more explicit support for integrating MFC and
Windows Forms in the Whidbey release.
It is still too early to share any preliminary design of that feature.
Ronald Laeremans Visual C++ team
"Dan Smith" <J_************ @HoTMaiL.com> wrote in message news:O3******** ******@TK2MSFTN GP09.phx.gbl... Right now the only way to use a WinForms control in MFC is to enable COM Interop for the control and use it in MFC as you would any ActiveX control. While this works, COM Interop is a pain, and an ActiveX control isn't as straight-forward as a CWnd-derived object. It also means that I have to split my code into two projects. Going the other way (using MFC in WinForms) is only possible by exposing MFC objects as ActiveX controls, which probalby means adding ATL to an existing MFC project.
Is any of this going to be easier/cleaner in Whidbey? What I have in
mind is something like (I'm sure I don't have all the new syntax right):
generic<typenam e FORM> where FORM : System::Windows ::Forms::Contro l ref class CControlWrapper : public CWnd { private: // lots of magic code to make a System::Windows ::Forms::Contro l
object look like a CWnd protected: FORM* m_WinFormContro l; };
ref class CMyControl : public CControlWrapper <MyApp::MyUserC ontrol> { public: void Method1() { m_WinFormContro l->Method1(); } };
This would make using CMyControl as easy as any other CWnd-derived
object; which would make it much easier to integrate WinForms controls into an existing MFC application. Going the other way would be nice too, as
there are MFC-based controls available (I'm specifically thinking of http://codejock.com).
Can anybody comment?
Thanks, Dan
It is too early in the gestation phase of this feature to have made it into
the PDC, or into current BLOG entries.
Ronald
"Dan Smith" <J_************ @HoTMaiL.com> wrote in message
news:Ok******** ******@TK2MSFTN GP09.phx.gbl... OK...I'll be anxiously waiting to see how this is supported. Glad to see it's "on ths list". Is this not a "sexy" enough feature to make it onto things like PDC presentations and .NET blogs?
Dan
"Ronald Laeremans [MSFT]" <ro*****@online .microsoft.com> wrote in message news:ed******** ******@TK2MSFTN GP10.phx.gbl... Yes, our plans are for more explicit support for integrating MFC and Windows Forms in the Whidbey release.
It is still too early to share any preliminary design of that feature.
Ronald Laeremans Visual C++ team
"Dan Smith" <J_************ @HoTMaiL.com> wrote in message news:O3******** ******@TK2MSFTN GP09.phx.gbl... Right now the only way to use a WinForms control in MFC is to enable
COM Interop for the control and use it in MFC as you would any ActiveX control. While this works, COM Interop is a pain, and an ActiveX control isn't
as straight-forward as a CWnd-derived object. It also means that I have
to split my code into two projects. Going the other way (using MFC in WinForms) is only possible by exposing MFC objects as ActiveX
controls, which probalby means adding ATL to an existing MFC project.
Is any of this going to be easier/cleaner in Whidbey? What I have in mind is something like (I'm sure I don't have all the new syntax right):
generic<typenam e FORM> where FORM : System::Windows ::Forms::Contro l ref class CControlWrapper : public CWnd { private: // lots of magic code to make a System::Windows ::Forms::Contro l object look like a CWnd protected: FORM* m_WinFormContro l; };
ref class CMyControl : public CControlWrapper <MyApp::MyUserC ontrol> { public: void Method1() { m_WinFormContro l->Method1(); } };
This would make using CMyControl as easy as any other CWnd-derived object; which would make it much easier to integrate WinForms controls into an existing MFC application. Going the other way would be nice too, as there are MFC-based controls available (I'm specifically thinking of http://codejock.com).
Can anybody comment?
Thanks, Dan
Related to this, did microsoft develop some scenario on what it takes to port
a XP native C++ multimedia application to Longhorn?
My area of interest are:
- Taking advantage of the new UI features (How to Replace Win32)
- Taking advantage of the new multimedia API (How to Replace Directshow)
- Keep tight integration of all API: Mainly how COM Direct3D tightly integrate with
the new UI, media services and WinFS.
Their is allot of information and its easy to get 'lost' and spend days reading very low level info.
Thanks for any pointers...
Stephan
"Ronald Laeremans [MSFT]" <ro*****@online .microsoft.com> wrote in message news:ed******** ******@TK2MSFTN GP10.phx.gbl... Yes, our plans are for more explicit support for integrating MFC and Windows Forms in the Whidbey release.
It is still too early to share any preliminary design of that feature.
Ronald Laeremans Visual C++ team
"Dan Smith" <J_************ @HoTMaiL.com> wrote in message news:O3******** ******@TK2MSFTN GP09.phx.gbl... Right now the only way to use a WinForms control in MFC is to enable COM Interop for the control and use it in MFC as you would any ActiveX control. While this works, COM Interop is a pain, and an ActiveX control isn't as straight-forward as a CWnd-derived object. It also means that I have to split my code into two projects. Going the other way (using MFC in WinForms) is only possible by exposing MFC objects as ActiveX controls, which probalby means adding ATL to an existing MFC project.
Is any of this going to be easier/cleaner in Whidbey? What I have in mind is something like (I'm sure I don't have all the new syntax right):
generic<typenam e FORM> where FORM : System::Windows ::Forms::Contro l ref class CControlWrapper : public CWnd { private: // lots of magic code to make a System::Windows ::Forms::Contro l object look like a CWnd protected: FORM* m_WinFormContro l; };
ref class CMyControl : public CControlWrapper <MyApp::MyUserC ontrol> { public: void Method1() { m_WinFormContro l->Method1(); } };
This would make using CMyControl as easy as any other CWnd-derived object; which would make it much easier to integrate WinForms controls into an existing MFC application. Going the other way would be nice too, as there are MFC-based controls available (I'm specifically thinking of http://codejock.com).
Can anybody comment?
Thanks, Dan
Hi Stephan,
Since this really is a question for the Longhorn team, I think you would get
a better answer asking in one of the Longhorn forums, or in the DirectX
forums that deal with the current technology.
Ronald
"Stephan Schaem" <ss*****@seriou smagic.com> wrote in message
news:uo******** ******@TK2MSFTN GP11.phx.gbl... Related to this, did microsoft develop some scenario on what it takes to
port a XP native C++ multimedia application to Longhorn?
My area of interest are:
- Taking advantage of the new UI features (How to Replace Win32) - Taking advantage of the new multimedia API (How to Replace Directshow) - Keep tight integration of all API: Mainly how COM Direct3D tightly
integrate with the new UI, media services and WinFS.
Their is allot of information and its easy to get 'lost' and spend days
reading very low level info. Thanks for any pointers...
Stephan
"Ronald Laeremans [MSFT]" <ro*****@online .microsoft.com> wrote in message
news:ed******** ******@TK2MSFTN GP10.phx.gbl... Yes, our plans are for more explicit support for integrating MFC and
Windows Forms in the Whidbey release.
It is still too early to share any preliminary design of that feature.
Ronald Laeremans Visual C++ team
"Dan Smith" <J_************ @HoTMaiL.com> wrote in message news:O3******** ******@TK2MSFTN GP09.phx.gbl... Right now the only way to use a WinForms control in MFC is to enable
COM Interop for the control and use it in MFC as you would any ActiveX control. While this works, COM Interop is a pain, and an ActiveX control isn't
as straight-forward as a CWnd-derived object. It also means that I have
to split my code into two projects. Going the other way (using MFC in WinForms) is only possible by exposing MFC objects as ActiveX
controls, which probalby means adding ATL to an existing MFC project.
Is any of this going to be easier/cleaner in Whidbey? What I have in
mind is something like (I'm sure I don't have all the new syntax right):
generic<typenam e FORM> where FORM : System::Windows ::Forms::Contro l ref class CControlWrapper : public CWnd { private: // lots of magic code to make a System::Windows ::Forms::Contro l
object look like a CWnd protected: FORM* m_WinFormContro l; };
ref class CMyControl : public CControlWrapper <MyApp::MyUserC ontrol> { public: void Method1() { m_WinFormContro l->Method1(); } };
This would make using CMyControl as easy as any other CWnd-derived
object; which would make it much easier to integrate WinForms controls into an existing MFC application. Going the other way would be nice too, as
there are MFC-based controls available (I'm specifically thinking of http://codejock.com).
Can anybody comment?
Thanks, Dan
This thread has been closed and replies have been disabled. Please start a new discussion. Similar topics |
by: Bilo |
last post by:
When I add a reference in Visual Studio to quartz.dll it creates a new file
named "Interop.QuartzTypeLib.dll"
into to bin folder. My app only works when this file is in the application
folder.
Is is legal to ship this file with my app ? Does Microsoft allow it?
If not how can I use directShow with c#?
|
by: Felipe Garcia |
last post by:
I`m trying to compile a solution built in vs.net 2003 on whibdey with
framework 1.2. I have a project into this solution that uses word automation
using office 2003, and when i try to compile this project alone, or the
entire solution i get these errors:
Ambiguity between 'Microsoft.Office.Interop.Word._Document.Close(ref object,
ref object, ref object)' and
'Microsoft.Office.Interop.Word.DocumentEvents2_Event.Close'
Ambiguity between...
|
by: frank_ulbricht |
last post by:
Hi folks,
I'm a Java programmer and now I have to use C# for a new large
project. The language is the best I've ever seen. In some points it
goes far beyond Java. I like that.
But then there was a great dissappointments about WinForms. Compared
with Java/Swing (skip the performance, I mean the development) it is
very poor at first sight. It reminds me when I startet in 1995 with
Delphi (guess a guy named Heilsberg is the reason ...
|
by: Martin Rosén-Lidholm |
last post by:
Although an impossible question to answer, I fell urged to raise it anyhow.
Given a fairly complex ERP application scenario, what's your estimation for
the X-ratio
dev. time for WebForms app
|
by: spamfurnace |
last post by:
Hi there.
Ive just been reading about the Whidbey Provider Pattern on MSDN,
http://msdn.microsoft.com/library/default.asp?url=/library/en-us/dnaspnet/html/asp02182004.asp
and i wanted to clarify my understanding of it and get some
implementation feedback. Im a bit unsure so please correct me.
What Im Doing
| |
by: spamfurnace |
last post by:
Will Whidbey have the features, of a girl i'd like to meet?
Will Whidbey be easy to talk to, and rub my tired feet?
Will Whidbey bats it eyes at me, and whisper "Baby, your so sweet".
Will Whidbey have a body to die for, and look hot as hell wrapped only in a
sheet.
Will Whidbey have construction workers whistling at it if i tucked under my
arm and walked it down the street.
Will Whidbey make me feel like a man, and have all other IDE...
|
by: Richard |
last post by:
I know there is a bit of discussion already about this subject, but I'd like
to hear any thoughts about which might be a better way to go.
I'm developing an app (actually converting an Access 2002 project) that has
quite a few UI forms, and mostly returns and updates data from a SQL Server.
I'm not sure if it would be better to set this up with ASP.NET or have a
WinForm that each client would use to access the data.
I'm hearing...
|
by: deko |
last post by:
When to use a privileged user thread rather than a windows service?
That's the question raised in a previous post . It was suggested that if the service needs to interact
with a WinForms app (which is the UI used to adjust the actions taken by,
and the schedule of the service), then a privileged user thread should be
used in the UI - no service required.
But...
"A windows service enables the creation of long-running executable
|
by: brian.wilson4 |
last post by:
Our group is currently comparing winforms vs webforms.....app is Corp
LAN based - we have control of desktops.....Below is pros and cons list
we have come up with - if anything strikes you as untrue or you would
like to add - please comment - thanks.....
Rich Client PROS
1. User experience (* indicates feasible on web with AJAX) -
a. Single, unified application experience
b. Windows/Office-like look and feel -
i.Tabs - drag and drop...
|
by: marktang |
last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However, people are often confused as to whether an ONU can Work As a Router. In this blog post, we’ll explore What is ONU, What Is Router, ONU & Router’s main usage, and What is the difference between ONU and Router. Let’s take a closer look !
Part I. Meaning of...
|
by: Hystou |
last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can effortlessly switch the default language on Windows 10 without reinstalling. I'll walk you through it.
First, let's disable language synchronization. With a Microsoft account, language settings sync across devices. To prevent any complications,...
| |
by: jinu1996 |
last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven tapestry of website design and digital marketing. It's not merely about having a website; it's about crafting an immersive digital experience that captivates audiences and drives business growth.
The Art of Business Website Design
Your website is...
|
by: Hystou |
last post by:
Overview:
Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows Update option using the Control Panel or Settings app; it automatically checks for updates and installs any it finds, whether you like it or not. For most users, this new feature is actually very convenient. If you want to control the update process,...
|
by: conductexam |
last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and then checking html paragraph one by one.
At the time of converting from word file to html my equations which are in the word document file was convert into image.
Globals.ThisAddIn.Application.ActiveDocument.Select();...
|
by: TSSRALBI |
last post by:
Hello
I'm a network technician in training and I need your help.
I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs.
The last exercise I practiced was to create a LAN-to-LAN VPN between two Pfsense firewalls, by using IPSEC protocols.
I succeeded, with both firewalls in the same network. But I'm wondering if it's possible to do the same thing, with 2 Pfsense firewalls...
|
by: adsilva |
last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
|
by: 6302768590 |
last post by:
Hai team
i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated we have to send another system
| |
by: muto222 |
last post by:
How can i add a mobile payment intergratation into php mysql website.
| |