VS 2005: Does Hosting Windows Forms in MFC Require .NET Framework?

As far as I can tell, an MFC App developed in VS 2005 that hosts Windows 
Forms controls does not require the .NET Framework on a target install 
machine. I.e. even though it hosts Windows Forms controls, it is still a pure 
good old-fashioned MFC app that does not depend on .NET Framework to run. Is 
that true?

Thank You
-- 
Greg McPherran
www.McPherran.com
0
gm4480 (4)
11/25/2005 8:57:30 PM
vc.mfc 33608 articles. 0 followers. Follow

6 Replies
558 Views

Similar Articles

[PageSpeed] 12

Windows Forms is a .NET GUI library - so if your MFC app uses Windows Forms, 
the target machine *will need* the .NET Framework.

-- 
Regards,
Nish [VC++ MVP]


"Greg" <gm@mcpherran.com> wrote in message 
news:0021B490-BC82-4FDE-ADB1-54F2D7DEB977@microsoft.com...
> As far as I can tell, an MFC App developed in VS 2005 that hosts Windows
> Forms controls does not require the .NET Framework on a target install
> machine. I.e. even though it hosts Windows Forms controls, it is still a 
> pure
> good old-fashioned MFC app that does not depend on .NET Framework to run. 
> Is
> that true?
>
> Thank You
> -- 
> Greg McPherran
> www.McPherran.com 


0
nish (347)
11/25/2005 9:29:06 PM
When I built a sample MFC app that hosts Windows Forms controls, and then 
built a test deployment project for it, the automatic deployment dependencies 
did not include the .NET Framework. However, when I built a C# app the 
deployment dependencies did indeed include  .NET Framework.


-- 
Greg McPherran
www.McPherran.com


"Nishant Sivakumar" wrote:

> Windows Forms is a .NET GUI library - so if your MFC app uses Windows Forms, 
> the target machine *will need* the .NET Framework.
> 
> -- 
> Regards,
> Nish [VC++ MVP]
> 
> 
> "Greg" <gm@mcpherran.com> wrote in message 
> news:0021B490-BC82-4FDE-ADB1-54F2D7DEB977@microsoft.com...
> > As far as I can tell, an MFC App developed in VS 2005 that hosts Windows
> > Forms controls does not require the .NET Framework on a target install
> > machine. I.e. even though it hosts Windows Forms controls, it is still a 
> > pure
> > good old-fashioned MFC app that does not depend on .NET Framework to run. 
> > Is
> > that true?
> >
> > Thank You
> > -- 
> > Greg McPherran
> > www.McPherran.com 
> 
> 
> 
0
gm4480 (4)
11/25/2005 9:54:03 PM
I've never used deployment projects using VS 2005, so I am not sure why it's 
doing that.

But when you use any .NET library from your app, it needs .NET to run.
In fact, if you take an MFC project, enable /clr and re-build it, the 
resulting executable now requires the .NET f/w to run.

-- 
Regards,
Nish [VC++ MVP]


"Greg" <gm@mcpherran.com> wrote in message 
news:C3488AD0-C398-46CE-BD9F-14679FD03BA9@microsoft.com...
> When I built a sample MFC app that hosts Windows Forms controls, and then
> built a test deployment project for it, the automatic deployment 
> dependencies
> did not include the .NET Framework. However, when I built a C# app the
> deployment dependencies did indeed include  .NET Framework.
>
>
> -- 
> Greg McPherran
> www.McPherran.com
>
>
> "Nishant Sivakumar" wrote:
>
>> Windows Forms is a .NET GUI library - so if your MFC app uses Windows 
>> Forms,
>> the target machine *will need* the .NET Framework.
>>
>> -- 
>> Regards,
>> Nish [VC++ MVP]
>>
>>
>> "Greg" <gm@mcpherran.com> wrote in message
>> news:0021B490-BC82-4FDE-ADB1-54F2D7DEB977@microsoft.com...
>> > As far as I can tell, an MFC App developed in VS 2005 that hosts 
>> > Windows
>> > Forms controls does not require the .NET Framework on a target install
>> > machine. I.e. even though it hosts Windows Forms controls, it is still 
>> > a
>> > pure
>> > good old-fashioned MFC app that does not depend on .NET Framework to 
>> > run.
>> > Is
>> > that true?
>> >
>> > Thank You
>> > -- 
>> > Greg McPherran
>> > www.McPherran.com
>>
>>
>> 


0
nish (347)
11/25/2005 10:00:08 PM
I think I understand what's going on now. The MFC App that hosts the controls 
does not depend on the Framework, but the hosted controls themselves are from 
the Framework.

Thank You

-- 
Greg McPherran
www.McPherran.com


"Greg" wrote:

> When I built a sample MFC app that hosts Windows Forms controls, and then 
> built a test deployment project for it, the automatic deployment dependencies 
> did not include the .NET Framework. However, when I built a C# app the 
> deployment dependencies did indeed include  .NET Framework.
> 
> 
> -- 
> Greg McPherran
> www.McPherran.com
> 
> 
> "Nishant Sivakumar" wrote:
> 
> > Windows Forms is a .NET GUI library - so if your MFC app uses Windows Forms, 
> > the target machine *will need* the .NET Framework.
> > 
> > -- 
> > Regards,
> > Nish [VC++ MVP]
> > 
> > 
> > "Greg" <gm@mcpherran.com> wrote in message 
> > news:0021B490-BC82-4FDE-ADB1-54F2D7DEB977@microsoft.com...
> > > As far as I can tell, an MFC App developed in VS 2005 that hosts Windows
> > > Forms controls does not require the .NET Framework on a target install
> > > machine. I.e. even though it hosts Windows Forms controls, it is still a 
> > > pure
> > > good old-fashioned MFC app that does not depend on .NET Framework to run. 
> > > Is
> > > that true?
> > >
> > > Thank You
> > > -- 
> > > Greg McPherran
> > > www.McPherran.com 
> > 
> > 
> > 
0
gm4480 (4)
11/25/2005 10:03:03 PM
Actually, the MFC app needs .NET too - since you have enabled /clr in the 
compiler settings.

-- 
Regards,
Nish [VC++ MVP]


"Greg" <gm@mcpherran.com> wrote in message 
news:1D90A93E-D465-4928-BC97-4EAF30A1F533@microsoft.com...
>I think I understand what's going on now. The MFC App that hosts the 
>controls
> does not depend on the Framework, but the hosted controls themselves are 
> from
> the Framework.
>
> Thank You
>
> -- 
> Greg McPherran
> www.McPherran.com
>
>
> "Greg" wrote:
>
>> When I built a sample MFC app that hosts Windows Forms controls, and then
>> built a test deployment project for it, the automatic deployment 
>> dependencies
>> did not include the .NET Framework. However, when I built a C# app the
>> deployment dependencies did indeed include  .NET Framework.
>>
>>
>> -- 
>> Greg McPherran
>> www.McPherran.com
>>
>>
>> "Nishant Sivakumar" wrote:
>>
>> > Windows Forms is a .NET GUI library - so if your MFC app uses Windows 
>> > Forms,
>> > the target machine *will need* the .NET Framework.
>> >
>> > -- 
>> > Regards,
>> > Nish [VC++ MVP]
>> >
>> >
>> > "Greg" <gm@mcpherran.com> wrote in message
>> > news:0021B490-BC82-4FDE-ADB1-54F2D7DEB977@microsoft.com...
>> > > As far as I can tell, an MFC App developed in VS 2005 that hosts 
>> > > Windows
>> > > Forms controls does not require the .NET Framework on a target 
>> > > install
>> > > machine. I.e. even though it hosts Windows Forms controls, it is 
>> > > still a
>> > > pure
>> > > good old-fashioned MFC app that does not depend on .NET Framework to 
>> > > run.
>> > > Is
>> > > that true?
>> > >
>> > > Thank You
>> > > -- 
>> > > Greg McPherran
>> > > www.McPherran.com
>> >
>> >
>> > 


0
nish (347)
11/25/2005 10:14:22 PM
I see, in the MSDN MFCWinForms sample, the MFC exe that host the controls, 
MFC04, doesn't use /clr but it does link with dlls that do use /clr. You are 
right. Thanks again.

-- 
Greg McPherran
www.McPherran.com


"Nishant Sivakumar" wrote:

> Actually, the MFC app needs .NET too - since you have enabled /clr in the 
> compiler settings.
> 
> -- 
> Regards,
> Nish [VC++ MVP]
> 
> 
> "Greg" <gm@mcpherran.com> wrote in message 
> news:1D90A93E-D465-4928-BC97-4EAF30A1F533@microsoft.com...
> >I think I understand what's going on now. The MFC App that hosts the 
> >controls
> > does not depend on the Framework, but the hosted controls themselves are 
> > from
> > the Framework.
> >
> > Thank You
> >
> > -- 
> > Greg McPherran
> > www.McPherran.com
> >
> >
> > "Greg" wrote:
> >
> >> When I built a sample MFC app that hosts Windows Forms controls, and then
> >> built a test deployment project for it, the automatic deployment 
> >> dependencies
> >> did not include the .NET Framework. However, when I built a C# app the
> >> deployment dependencies did indeed include  .NET Framework.
> >>
> >>
> >> -- 
> >> Greg McPherran
> >> www.McPherran.com
> >>
> >>
> >> "Nishant Sivakumar" wrote:
> >>
> >> > Windows Forms is a .NET GUI library - so if your MFC app uses Windows 
> >> > Forms,
> >> > the target machine *will need* the .NET Framework.
> >> >
> >> > -- 
> >> > Regards,
> >> > Nish [VC++ MVP]
> >> >
> >> >
> >> > "Greg" <gm@mcpherran.com> wrote in message
> >> > news:0021B490-BC82-4FDE-ADB1-54F2D7DEB977@microsoft.com...
> >> > > As far as I can tell, an MFC App developed in VS 2005 that hosts 
> >> > > Windows
> >> > > Forms controls does not require the .NET Framework on a target 
> >> > > install
> >> > > machine. I.e. even though it hosts Windows Forms controls, it is 
> >> > > still a
> >> > > pure
> >> > > good old-fashioned MFC app that does not depend on .NET Framework to 
> >> > > run.
> >> > > Is
> >> > > that true?
> >> > >
> >> > > Thank You
> >> > > -- 
> >> > > Greg McPherran
> >> > > www.McPherran.com
> >> >
> >> >
> >> > 
> 
> 
> 
0
gm4480 (4)
11/25/2005 10:29:02 PM
Reply:

Similar Artilces:

Couldn't Find c:\windows\system32\system.mdw Message
Loaded Access 97 on my new Vista Machine and got the above message when I tried to start Access. How do I fix this ? Vista has more stringent rules about who, and how you can write to the System32 (or Windows for that matter) folder. If you have another machine with and unsecured system.mdw file try to copy it to your new one. If it lets you, you are fine, if not you'll need to work with someone in a Vista newsgroup to figure out what the problem is. -- Arvin Meyer, MCP, MVP http://www.datastrat.com http://www.mvps.org/access http://www.accessmvp.com "JWalker" <JWalker...

Window Redirection?
A PrintWindow API related sample application in MSDN has this line - The API uses window redirection to paint a snapshot of the window into the hdc. What is window redirection? Is it possible to use this outside PrintWindow API to get a visual image of the window without actually having to show the window? (Note - PrintWindow needs the window displayed for it to work) TIA Priyesh ...

help need with VC 6.0 IDE and mfc
Hello, First let me explain the scenario where i m using this requirement. We are Using CustomAppWizard and designing a wizard .One of the wizard pages will Insert Composite controls as many as the user wants . 1.So i should be able to dynamically insert ATL controls without using Insert Control Dailog. 2. can any one tell me how to dynamically create Template file in TEMPLATE folder of resource view . 3. I want to include many files created by templet files and add them to build by editing newproj.inf Is it possible to do this. 4.I would even like to know if i have 2 ifles in my C drive h...

Can't open 2005 data file after reinstalling Money 2005
I am experiencing a recurring problem. I have had to reinstall Windows XP and MS Money 2005. I am now unable to open my previously converted 2005 file or restore any backup version. I consistently get the following error message: "Money cannot locate filename or cannot open it, possibly because it is a read-only file, you do not have permission to change it, or your disk drive is write- protected. If you have chosen the correct file and it cannot be accessed, you will need to click OK and then Restore your most recent backup file." Any help or thoughts would be greatly ap...

Where is the cache files folder located for windows media player?
Does windows media player have a cache files folder? Where is the cache files folder located for windows media player? Or how do I find the cache files folder for windows media player? Thank You for your Help. Bob Background info: I have a desktop AMD 4400+ 64X2 4GB memory 320GB HD(way bigger than I need) Acer computer (AM3100-U3201A) I purchased new February 2008 running 32-bit MS Vista Home Premium SP2 box. I use MS auto updates. I think it has onboard shared memory for video and sound. My ISP is Comcast 12mbps with Motorola SURFboard SB5101 Cable Modem direct to...

Word2007. Checkbox. No Form
Hello! We have a document (not a form) that we would like to use checkboxes in. This document has a couple of sections where it would be useful if the user could check if something is applicable. We can't protect the whole document. Thank you for your help! Stacey I actually used this feature in a form this morning. Although you don't say what version of Word you are using, you can access the Control Toolbox toolbar in Word 2003, or in Word 2007, it is on Developer tab. To show the developer tab, click the Microsoft Office Button and then click Word Options. S...

Help Required
Hi, Whenever I open Outlook 2003, I am getting a dialog box which displays the following message: Microsoft Office Outlook has encountered a problem and needs to close. We are sorry for the inconvenience When I click Debug it displays a message box with the following error message "The instruction at "0x3007e993" referenced memory at "0x0000000:. The memory could not be read" When I click No it Visual Studio JIT debugger pops up. I uninstalled and installed several times but still the problem persists. Is there any regsitry entry that I've to modify/delete? ...

Windows Server 2008 R2 04-09-10
Windows Server 2008 R2 and Windows 7 share the same code? how is that possible when Windows 7 has both 32 bit and 64 bit versions and windows server 2008 r2 is only 64 bit Hello Charle, As Microsoft is going to use only 64bit versions for servers they don't built the 32bit version. Sharing the same code doesn't mean that the server OS use exaclty the same files, there are a lot more and different ones. But the basic code is the same. Best regards Meinolf Weber Disclaimer: This posting is provided "AS IS" with no warranties, and confers no rights. ...

I would like to know how to set up a 'fill in the blanks' form?
I would like to set up a templet of sorts to fill in the blanks for certificates. ...

Short time vs short date
In my form I have a fldOutOfRoom which the user inputs a short time into the field, i.e, 0900. I have the following code in the open event of another form called frmRNnotes: If DateDiff("h", Forms!frmPtDemographicNew!frmVisitNewEdit.Form!OutOfRoom, Now) >= 1 Then Me.cmdRNnotesEdit.Visible = False This code gives the RN one hour to complete a note and then he/she can no longer edit the note. What I want to know is the Short Time format going to let the cmdRNnotesEdit button be visible everyday within one hour of the of the original time? That is, is the short time just a tim...

MFC project with my classes
I have got a project that uses MFC. I want to expand the functionality of the project by adding a few of my own classes to it. But I don't know where should I create objects of my new classes so that I can access them, I know the WinMain function resides in CWinApp class and my project has a class inherited from the CWinApp class, but where should I define my own objects I can't figure it our. Can anybody help? Adrian wrote: > I have got a project that uses MFC. I want to expand the functionality > of the project by adding a few of my own classes to it. But I don't > kno...

Visual C++ 2005 always rebuilds
I have an MFC DLL project that I recently moved over to Visual Studio 2005. However now the project always rebuilds entirely whenever I start debugging. Even if I have only made a simple change to one file. Any help would be greatly appreciated. Thanks Colin Check the date on your source files to make sure that they are not in the future. AliR. "Colin J Paterson" <nospam@thanks.com> wrote in message news:ObtLxgTbGHA.1196@TK2MSFTNGP03.phx.gbl... > I have an MFC DLL project that I recently moved over to Visual Studio 2005. > However now the project always rebuild...

RMS 1.2 vs 1.3, plus integrate with Great Plains
1.) I am working on an assessment for upgrading our current RMS software from 1.2 to 1.3. My assessment will take in account the benefits, broken down by store operations (Retail) and the benefits to IT. Also, list risks and potential problems that might be experienced. We currently have 28 stores with 3+ registers per location with another 22 new stores on the schedule over the next 2 years. Are their other in this group of similiar size that have done this upgrade to the new version? 2.) If we do not upgrade the software, can we still integrate the RMS to Great Plains? Would we...

Word 2003: Will it work on Windows 7 Pro
The ads say there is virtual XP on Windows 7 that can run programs like Word 2003. In your experience is this true? On any Windows 7 machine? Does 64 versus 32 bit processor matter for either Word/Office 2003 or Office 2007? thanks. You don't need Virtual XP to run Office 2003 on Windows 7. -- Suzanne S. Barnhill Microsoft MVP (Word) Words into Type Fairhope, Alabama USA http://word.mvps.org "removing all headers and footers" <removingallheadersandfooters@discussions.microsoft.com> wrote in message news:95298031-44F6-4E74-A608-C76987DFAB46@microsoft....

Picture control on a form
What is the best way to fill a form with a picture control so that when the client window is resized the picture control will fill the form? -- Just Al Take a look at this and see if this is what you want: http://www.codeproject.com/dialog/bmpdlg01.asp Tom "Al" <Al@discussions.microsoft.com> wrote in message news:5BEA0FA2-3F95-4090-B908-A75DBF1D19DE@microsoft.com... > What is the best way to fill a form with a picture control so that when > the > client window is resized the picture control will fill the form? > -- > Just Al Thank You! -- Just Al &...

Null value in form not trapped by beforeupdate event
I have a form in Access 2003 linked to a SQL Server 2005 table. When I clear the value in a textbox (bound field is varchar and is required), I want the before update event to run to tell the user the value cannot be null. When I press the tab button to move to the next field after clearing the texbox, the before update event is not triggering and instead I'm getting the following error: You tried to assign the Null value to a variable that is not a Variant data type. (Error 3162) How can I prevent nulls before and this error from triggering? Thanks! ...

mfc project not compile in visual studio 2008
I made a mfc project using wizard in visual studio 2008 and it didn`t compile,. i didn`t add anything, just made it as it should be. i tried changing _WIN32_WINNT and WINVER 0x0600 but it just resulted in another errors. i also reinstalled my vs 2008, but it didn`t help. For more informations i have win xp sp2 and freshly installed microsoft visual studio 2008 in a default way. errors: 1>stdafx.cpp 1>c:\program files\microsoft visual studio 9.0\vc\atlmfc\include\winnt.h(3019) : error C2146: syntax error : missing ';' before identifier 'ContextRecord' 1>c:\progr...

Updating External Links Excel 2000 vs 2002/2003
I have a situation where I'm using Excel 2000 with a workbook containing references to another workbook. When opening the first workbook & the second workbook is not available, you can say "no" to the update external links, and still see all values as they were when the first workbook was last closed. However, when the same workbook is opened in Excel 2002 or 2003, the external links specified only as a cell reference show the proper data (e.g, =wbkname!E1), but when they are Excel formulae (specifically a SUMIF), I'm getting a #VALUE! error in the pertinent cells Is th...

Windows mail asking to verify username and password
I was in Windows Mail when suddenly a box popped up asking for my username and password from Windows Mail.. Although I attempted correctly several times it still will not work. I contacted my kerrlake server and we tried several things including deleting the account and resetting it back up but it still will not open. I can receive my emails on my blackberry and can get on the internet. Also, a protocal error message pops up. Please help! -- Diamond & Associates When you get that repeated prompt for username and password, click = Cancel, which should then produce an erro...

Disappearing data in sync'd forms
I have a small sized text box in a form called frmMain. This text box may or may not contain a large amount of text. If the text box does contain alot of text I want to open up a new form called frmLargeText that contains a larger text box to allow the user to easily see and edit the large amount of text. I also need the two forms to stay in sync. i.e. if the user moves to a new record then both forms move to the same record. I thought I could do this by setting the recordset of frmLargeText to equal the recordset of frmMain as follows: Dim frm as Form_frmLargeText Dim rst As DAO.Rec...

y value vs x
In an xy scatter plot one can choose the type of line connecting the data points (smooth, straight, etc.). Once this is done, Is there a simple way of determining the y value of graph for a specific x value without doing successive approximations with 0 shifts. I'd rather not purchase a graphing program just for this simple task. You could find an equation that fits the data (see trendline) best wishes -- Bernard V Liengme www.stfx.ca/people/bliengme remove caps from email "ralph" <ralph@discussions.microsoft.com> wrote in message news:284B39DE-20C6-40CB-AB60-39B...

Active Directory , Windows 2003 SBS to Windows 2008 SBS
Hello! I've got a little issue here. I work for a company and we are getting a new Intelserver. Now the problem is we've got an 32bit windows 2003 small business server with an Active Directory (and sql). And we are getting a Windows 2008 Small business server 64bit. Is there any possible way to ''Transfer'' ''Move'' or ''Copy'' the Active Directory to his new server without changing, removing or adding any data. I really need to be sure that nothing goes wrong cause 25 people are working on it everyday (Ofcourse i have a...

Outlook 98 Crashes in Windows NT
I have a few Windows NT machines that Outlook 98 crashes on with a Dr. Watson error - almost always when the user is typing an e-mail. I have tried re-installing, creating a new outlook profile, and replacing various files related to Outlook 98, but nothing seems to work. It is very important to note that I have many other users who have Windows NT and Outlook 98 on our network that do not have a problem at all. Can anyone decipher the Dr. Watson error message below? Thanks in advance. Microsoft (R) Windows NT (TM) Version 4.00 DrWtsn32 Copyright (C) 1985-1996 Microsoft Corp. All rights r...

Automatically open Detail Entry Window
In SOP Transcation Entry, I'd like the Sales Customer Detail Entry window to open automatically after the customer ID is selected. Is this possible? How would I go about doing this with Modifier or VBA? Extender would come in very handy. You don't need to write a single code. Record a macro using GP macro and embed it on the SOP Entry window using Extender. "Elaine" wrote: > In SOP Transcation Entry, I'd like the Sales Customer Detail Entry window to > open automatically after the customer ID is selected. Is this possible? How > would I go about doi...

Windows 7/IE8 Javascript will not run.
I am having major issues with IE8 recently. I get no error messages, things just don't work. For example, I can't download files from sites, windows update will not download files either. I viewed the html source on a particular page that wasn't working and there was some text in the html that said Javascript was not supported in my browser (but the text didn't show on the screen). FWIW, I have now installed both chrome and firefox and they don't have any problems with javascript or download files, etc. This problem started after I switched from McAfee to...