• 0

VC++6 & .NET


Question

Hello.... i have got this question about .NET and VC6

we all know the VC6 uses MFC. i installed VS.NET 2003 and i opened VC++.NET and found one of the projects types as MFC application

so if i wanted to learn VC++6 before .net and then do MFC with .NET, will there be any differance between both

i mean whats new in VC.NET MFC app and VC6 MFC app apart from the namespaces?

Link to comment
https://www.neowin.net/forum/topic/149407-vc6-net/
Share on other sites

17 answers to this question

Recommended Posts

  • 0

Visual Studio .NET can create several types of C++ projects, including managed, MFC, and Win32. Win32 is the C++ code you'll use with most of the C++ self-teaching books out there. MFC, you know what that is if you're talking about it. Finally, .NET code is managed C++ that runs on the .NET framework, like C# and VB.NET (Y)

Link to comment
https://www.neowin.net/forum/topic/149407-vc6-net/#findComment-1850179
Share on other sites

  • 0
so in VC++.NEt IDE there is nothing differant in an MFC application and one made with VC++6... is that what you mean game guy?

There are some data type differences, but its mostly some minor things (nothing that a few minutes of searching couldn't figure out if yo get an error when moving a project from VS6->VS.NET.

I also believe, though i'm not positive on this, that there's a push by the Microsoft dev. people to combine the MFC and ATL stuff into one collection of objects instead of two. I think this can be seen if you go and look at the included libraries and include files and compare them between what comes with VS6 and VS.NET.

I remember running into a few issues on a VERY large MFC app we moved from VS6 to VS.NET that were related to this combination of MFC/ATL and there was some info in the documentation about it - though i don't remember where exactly at this point.

Link to comment
https://www.neowin.net/forum/topic/149407-vc6-net/#findComment-1854143
Share on other sites

  • 0

IIRC, all they're doing is adding some of the MFC easy-use classes (like CString) over to ATL to make it a bit friendlier. That shouldn't affect MFC.

There are some breaking changes in VC++ 7.1 though, that may or may not affect MFC programs. One of the more notables is the absence of the C++ stream classes (ofstream, ifstream, etc). Most of that stuff has to be done through the API now (or by finding the old .h and .cpp files, which won't necessarily work).

Link to comment
https://www.neowin.net/forum/topic/149407-vc6-net/#findComment-1854399
Share on other sites

  • 0

Changes from VC++ 6 to VC++.NET for MFC

Reference topics for MFC contain hundreds of new code examples.

Static Casting and MFC Message Maps  Beginning with Visual C++ .NET, MFC provides stricter type checking for return and parameter types of message handler functions. This new behavior notifies the developer of potential problems by flagging potentially unsafe message handlers with an error message. MFC now uses static casts for ON_MESSAGE, ON_REGISTERED_MESSAGE, ON_THREAD_MESSAGE, and ON_REGISTERED_THREAD_MESSAGE.

For example, in the past a developer could use a member function that returned void instead of LRESULT for ON_MESSAGE or ON_REGISTERED_MESSAGE and compile without any errors. With Visual C++ .NET, the potential miscast is caught and flagged as an error. The developer can fix the potential problem by replacing the return type (with LRESULT) and recompiling.

DHTML editing component: CHtmlEditCtrl, CHtmlEditView, CHtmlEditDoc

DHTML dialog boxes: CDHtmlDialog, CMultiPageDHtmlDialog

ISAPI support for parsing argument lists: CHttpArg, CHttpArgList

Support for windowless controls: COleControlSite, COleControlContainer, and COccManager

Enhanced support for using HTML Help in an MFC application: Displaying the Help Viewer.

Windows 2000 print property sheet: CPrintDialogEx.

DAO support: The Visual C++ MFC Application Wizard and MFC DLL Application Wizard no longer support DAO database projects. You can still add DAO-derived classes using the Add Class Wizard. Microsoft recommends using OLE DB or ODBC for new native C++ projects. You should use DAO only in maintaining existing applications.

TRACE0, TRACE1, TRACE2, and TRACE3 are now considered obsolete; use ATLTRACE2. TRACE now has the same functionality as ATLTRACE2.

When selecting a dialog box font, use MS Shell Dlg, not MS Sans Serif or Helv fonts. Previous versions of MFC would automatically replace MS Sans Serif or Helv with DEFAULT_GUI_FONT or the system font, but MFC no longer does that. See General MBCS Programming Advice.

Enhanced support for localized resources in satellite DLLs: Localized Resources in MFC Applications: Satellite DLLs.

As far as the stream classes not being there, just change your headers to point to the standard classes ( <iostream> instead of <iostream.h> ), and qualify your usage with the using namespace std; or std::fstream.

Lots of changes to the C-Runtime. Attributed programming was added for COM/ATL. ATL Server is new.

A more comprehensive list:

http://msdn.microsoft.com/library/default....lcversion70.asp

Link to comment
https://www.neowin.net/forum/topic/149407-vc6-net/#findComment-1854487
Share on other sites

  • 0
As far as the stream classes not being there, just change your headers to point to the standard classes ( <iostream> instead of <iostream.h> ), and qualify your usage with the using namespace std; or std::fstream.

Ah, didn't know that. I remember seeing the "iostreams are deprecated" message in VC 2002, and I figured they were just gone. Dammit, that means I learned how to use ReadFile/WriteFile for nothing. *LOL*

Link to comment
https://www.neowin.net/forum/topic/149407-vc6-net/#findComment-1857065
Share on other sites

  • 0
Visual Studio .NET can create several types of C++ projects, including managed, MFC, and Win32. Win32 is the C++ code you'll use with most of the C++ self-teaching books out there. MFC, you know what that is if you're talking about it. Finally, .NET code is managed C++ that runs on the .NET framework, like C# and VB.NET (Y)

Win32 is C code, NOT C++. MFC is the C++ wrapper for the Win32 API.

VC++ 6.0 compared to VC++ .Net, not much different. They're both just IDEs and a collection of software development tools (compiler, linker). If you just look at them as simply tools, it doesn't really matter what runtime library/environment you use. Except where .Net is concerned, then the .Net Visual Tools are required.

Also note that if you want to write MFC apps using the VC++ .Net IDE, it uses the new MFC v7.0 runtime DLL. When I first started using Windows XP about 6 months ago it didn't ship with the MFC 7.0 DLL. But it does come with VC++ .Net obviously. So as a developer, if you want to redistribute your applications you made with VC++ .Net, you'll also have to bundle the MFC 7.0 DLL. I forget which programs I installed, but I have seen commercial apps shipping with the MFC 7.0 DLL included locally in the program directory rather than installing it into the System folder.

If you want to reach a broader audience and reduce dependency, and especially if you're doing distribution over the Internet and want smaller downloads, and third if you don't want to deal with Install Wizard tools then your best bet is to stick with VC++ 6.0 and MFC 4.0.

Link to comment
https://www.neowin.net/forum/topic/149407-vc6-net/#findComment-1862657
Share on other sites

  • 0
Incorrect. The Win32 API is written in C. You can write a Win32 project in C++ without using MFC. If you need proof, just start a Win32 project in VC++ (any version), and create a class. Bingo, C++.

Let me rephrase that: Win32 IN-AND-OF-ITSELF is C code. The API is procedural. That's what I meant. It goes without saying that C code can be mixed with C++.

I know you can use Win32 in C++ code, but gameguy had said Win32 is C++ code which is incorrect and that's what I was trying to straighten out.

Link to comment
https://www.neowin.net/forum/topic/149407-vc6-net/#findComment-1878464
Share on other sites

  • 0
I know you can use Win32 in C++ code, but gameguy had said Win32 is C++ code which is incorrect and that's what I was trying to straighten out.

No, I said that in VS.NET, a Win32 project was a 'normal' C++ project...

Edit: I should have just taken a screenshot earlier :rolleyes: This is what I'm talking about:

post-47-1080092360.jpg

Link to comment
https://www.neowin.net/forum/topic/149407-vc6-net/#findComment-1879583
Share on other sites

  • 0
Yeah the screen shot helps, didn't sound like that the first time around.

Anyways... does anyone know how to make VC++ .Net (7.0) link against MFC 4.2 instead of 7.0?

Link to the MFC 6 (the mfc42xx files are actually MFC 6.0) .lib files instead of the MFC 7 files, which the IDE uses by default.

Link to comment
https://www.neowin.net/forum/topic/149407-vc6-net/#findComment-1880810
Share on other sites

This topic is now closed to further replies.
  • Recently Browsing   0 members

    • No registered users viewing this page.
  • Posts

    • Since they open sourced the calculator in Win 10/11 it is much better and can do a lot, I love it.
    • That's just silly imo. The lengths that man goes to just to avoid W11 is just nuts. Very, very few home users would do that. I will say this though, he is committed. Btw, I note on askwoody that Woody Leonhard passed away March, 2025 aged 73. His site was one of my favorites back in the day. Belated yes but RIP Woody.
    • Because of the EU (a good thing) newer android devices been getting 5 years worth of security patches. Except some Motorola which found the loop hole, and offer ZERO updates. In addition, Google for years have been making where it can patch some stuff by updating the core Google Play Store itself.  As echoed earlier,  you take the security risk in to your own hand beyond supported.
    • Win11Debloat 06.11.2026 by Razvan Serea Win11Debloat is a lightweight, easy to use PowerShell script that allows you to quickly declutter and customize your Windows experience. It can remove pre-installed bloatware apps, disable telemetry, remove intrusive interface elements and much more. The script also includes many features that system administrators and power users will enjoy. Such as a powerful command-line interface, support for Windows Audit mode and the option to make changes to other Windows users. All changes made by Win11Debloat can be easily reversed, and most removed apps can be restored via the Microsoft Store. A full guide on how to undo the changes is available here. Win11Debloat features: Below is an overview of the key features and functionality offered by Win11Debloat. Please refer to the wiki for more information about the default settings preset. Remove a wide variety of preinstalled apps. Click here for more info. Disable telemetry, diagnostic data, activity history, app-launch tracking & targeted ads. Disable tips, tricks, suggestions & ads across Windows. Disable Windows location services & app location access. Disable Find My Device location tracking. Disable 'Windows Spotlight' and tips & tricks on the lock screen. Disable 'Windows Spotlight' desktop background option. Disable ads, suggestions and the MSN news feed in Microsoft Edge. Hide Microsoft 365 ads on the Settings 'Home' page, or hide the 'Home' page entirely. Disable & remove Microsoft Copilot. Disable Windows Recall. Disable Click to Do, AI text & image analysis tool. Prevent AI service (WSAIFabricSvc) from starting automatically. Disable AI Features in Edge. Disable AI Features in Paint. Disable AI Features in Notepad. Disable the Drag Tray for sharing & moving files. Restore the old Windows 10 style context menu. Turn off Enhance Pointer Precision, also known as mouse acceleration. Disable the Sticky Keys keyboard shortcut. Disable Storage Sense automatic disk cleanup. Disable fast start-up to ensure a full shutdown. ...and more. Once you’ve downloaded the Win11Debloat file (Get.ps1), just follow these quick steps: Locate the Get.ps1 script file. Right-click the file and select Run with PowerShell from the context menu. If prompted by User Account Control (UAC), select Yes to grant the script the necessary administrative permissions. Win11Debloat 06.11.2026 fixes: Fix lock screen spotlight option being disabled when disabling the start recommended section by @Raphire in #619 Fix log message formatting by @Raphire Note The -RemoveCommApps and -RemoveW11Outlook command-line parameters for uninstalling a few specific apps have been removed with this release. If you previously relied on these parameters, please see this wiki page for alternative methods of removing these apps. Download: Win11Debloat 06.11.2026 | Open Source View: Win11Debloat Home Page | Screenshots 1| 2 Get alerted to all of our Software updates on Twitter at @NeowinSoftware
  • Recent Achievements

    • Rookie
      restore went up a rank
      Rookie
    • Very Popular
      AndrewSteel earned a badge
      Very Popular
    • Veteran
      Taliseian went up a rank
      Veteran
    • One Month Later
      Clizby earned a badge
      One Month Later
    • One Month Later
      Timaximus earned a badge
      One Month Later
  • Popular Contributors

    1. 1
      +primortal
      499
    2. 2
      +Edouard
      162
    3. 3
      PsYcHoKiLLa
      153
    4. 4
      ATLien_0
      83
    5. 5
      Steven P.
      79
  • Tell a friend

    Love Neowin? Tell a friend!