• 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

    • Louis Rossmann suing Samsung over "990 Pro SSD warranty scam" by Sayan Sen Back in 2023, if you recall, Neowin reviewer Robbie Khan had a dispute with Samsung over his 990 Pro SSD, which was rapidly losing its health. After significant back and forth, the tech giant had finally released firmware to "stop" the issue. Interestingly, its previous flagship at the time, the 980 Pro was also facing problems leading to two consecutive sets of firmware fixes. Three years later, it looks like a similar conflict has now broken out between tech repair entrepreneur YouTuber Louis Rossmann and Samsung, as it has escalated into a threatened lawsuit after the company allegedly refused to appropriately replace a failing 990 Pro SSD that remained under warranty. According to Rossmann, a 4TB Samsung 990 Pro NVMe SSD purchased for approximately $330 less than two years ago, began experiencing major hiccups and issues, even though he claims it had been operated under ideal cooling conditions. It was installed in a RAID 1 array and cooled by a heatsink and dual high-speed fans. However the drive reportedly started dropping out of the array, exhibiting controller-level failures that eventually became not useable in any meaningful way. Rossmann said Samsung’s support process was marked by delays and confusion from the very start. After initially contacting the wrong regional support channel, he was redirected to Samsung’s memory support division where he submitted detailed diagnostics, logs, and proof of purchase. Rossmann runs a repair company and owns an ACE Lab PC-3000 machine, which is a professional-grade data recovery equipment. As such, he had been confident in his diagnostics. Samsung even seemingly acknowledged that later. Regardless, Rossmann claims that his initial support ticket was automatically closed before a full 24-hour response window had elapsed, forcing him to reopen the case and resubmit documentation. The controversy however intensified further from here after Samsung accepted the drive for warranty evaluation but later returned it with a repair report stating that the drive had passed its testing and that the SSD had been verified as functional. Rossmann strongly disputed those claims citing that his own independent testing on PC-3000 showed write speeds reducing to as low as 40–60 MB/s before the drive failed entirely. Samsung subsequently informed him that the SSD had been reset and reflashed, passing internal stress tests. However, the company also stated that replacement units were unavailable due to an industry-wide memory shortage and suggested that a refund process could be initiated if further testing confirmed the fault. Thus, to settle, the company offered a refund of $330, the amount that was initially paid by him to make the purchase. Here, Rossmann pointed out the seeming hypocrisy of the tech giant as in how no Samsung drive was apparently allocated for warranty replacements, but they were abundantly available for retail sales especially when using business accounts. As you can see, Rossmann is indeed right, there are Samsung 990 Pro 4TB SSDs on Amazon currently for $950 (shipped and sold by first-party Amazon US itself), and they are also available on Samsung's own store too, albeit for an even higher price of $1100. Thus Rossmann argues that Samsung’s inability or unwillingness to provide a replacement while the same model remains available for purchase at significantly higher market prices reflects a failure to honor its warranty obligations. He has issued a formal 60-day notice and says he intends to file suit in Texas small claims court, asserting that companies should face greater costs for denying legitimate warranty claims than for fulfilling them. You can check out the full video titled "Samsung's 990 Pro SSD warranty policy is a scam; I'm taking them to court," at the link below. Source and image: Louis Rossmann (YouTube) As an Amazon Associate we earn from qualifying purchases
    • Was it too much to ask to show the icon in this article?
    • Frankly, I blame whoever is writing such articles. "A big improvement/update and/or new feature is now available to everyone! Also, use this unofficial tweak tool to enable it because it actually isn't available to you yet officially and might not in fact even be entirely ready or whatever, hence why it is perhaps not enabled for you*. But it's great and you should enable it!" I mean there's nothing wrong with sharing info about some feature you might need to enable via unofficial means, of course. It's just that these articles tend to essentially end up being two news pieces in one, and one of them tends to be a bit misleading. (*Yes, yes, the "it's a controlled rollout!" thing. Not a fan of that one either. The argument, not the actual rollout.)
    • Thank you. Will do. I read in the release notes that editor config might be at play here.
    • Actually, I think even Microsoft doesn't know how to control it
  • Recent Achievements

    • Week One Done
      davidbazooked earned a badge
      Week One Done
    • One Month Later
      Jamswaz earned a badge
      One Month Later
    • Week One Done
      Jamswaz earned a badge
      Week One Done
    • Rookie
      Marzoid went up a rank
      Rookie
    • Community Regular
      coch went up a rank
      Community Regular
  • Popular Contributors

    1. 1
      +primortal
      509
    2. 2
      PsYcHoKiLLa
      185
    3. 3
      +Edouard
      157
    4. 4
      Steven P.
      83
    5. 5
      ATLien_0
      75
  • Tell a friend

    Love Neowin? Tell a friend!