• 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

    • Weekend PC Game Deals: Anno 117, Final Fantasy VII, Rematch, and more by Pulasthi Ariyasinghe Weekend PC Game Deals is where the hottest gaming deals from all over the internet are gathered into one place every week for your consumption. So kick back, relax, and hold on to your wallets. The Epic Games Store's mystery giveaways may have ended, but its regular freebies didn't miss a step this week. The double drop was for copies of Warhammer 40K Speed Freeks and The Ouroboros King. Speed Freeks lands for multiplayer racing fans, but with plenty of competitive shooting elements too. You will be piloting Ork buggies, tanks, and aircraft modeled after the popular tabletop miniatures while trying to complete objectives and pass finish lines. Next, Ouroboros King is a crossover between chess and tactical roguelikes, offering the chance to create your own army with special rules to beat incoming foes on the board. The double giveaway on the Epic Games Store will be available until June 11, and replacing it will be Citizen Sleeper and ROBOBEAT. The Humble Store brought a new charity bundle to check out this week too. Landing with the name The Complete Inkle Library, this is a large collection of interactive narrative puzzle games from the publisher Inkle. This begins with Heaven's Vault, four parts from the Sorcery series, 80 Days, Overboard, and Pendragon: Narrative Tactics within the starting tier for $9. Hopping up a step to the $12 tier gets you TR-49, Expelled, and A Highland Song for paying at least $12. If you go for the $20 tier, you get four e-books from the Heaven's Vault series. The bundle has almost three weeks on its counter before it goes away. Big Deals There is a larger than normal amount of weekend specials happening this time, including multiple publisher deals, franchise discounts, and indie gems to grab. With those and more, here's our hand-picked big deals list for the weekend: Anno 117: Pax Romana – $44.99 on Steam Clair Obscur: Expedition 33 – $39.99 on Steam Timberborn – $27.99 on Steam EARTH DEFENSE FORCE 6 – $26.39 on Steam Rust – $19.99 on Steam FINAL FANTASY VII REBIRTH – $19.99 on Steam Street Fighter 6 – $19.99 on Steam Returnal – $19.79 on Steam Shape of Dreams – $17.49 on Steam Far Cry 6 – $14.99 on Steam Assassin's Creed Valhalla – $14.99 on Steam Quarantine Zone: The Last Check – $14.99 on Steam REMATCH – $14.99 on Steam EA SPORTS FC 26 – $13.99 on Steam FINAL FANTASY VII REMAKE INTERGRADE – $13.99 on Steam Magicraft – $12.79 on Steam Cult of the Lamb – $12.49 on Steam Dying Light 2: Reloaded Edition – $11.99 on Steam Cuphead – $11.99 on Steam Assassin's Creed Odyssey – $11.99 on Steam Hunt: Showdown 1896 – $11.99 on Steam Sektori – $11.99 on Steam Just Shapes & Beats – $11.99 on Steam Gunfire Reborn – $10.99 on Steam 33 Immortals – $9.99 on Epic Store Baby Steps – $9.99 on Steam Sifu – $9.99 on Steam Hearts of Iron IV – $9.99 on Steam DREDGE – $9.99 on Steam DAVE THE DIVER – $9.99 on Steam Pacific Drive – $9.89 on Steam Mycopunk – $9.74 on Steam Sons Of The Forest – $8.99 on Steam Jotunnslayer: Hordes of Hel – $8.99 on Steam Nuclear Throne – $8.99 on Steam Mechabellum – $8.99 on Steam Deep Rock Galactic: Survivor – $8.44 on Steam TerraTech Legion – $7.99 on Steam Inscryption – $7.99 on Steam Assassin's Creed Unity – $7.49 on Steam Minishoot' Adventures – $7.49 on Steam The Stanley Parable – $7.49 on Steam Oxygen Not Included – $7.49 on Steam Megabonk – $6.99 on Steam Look Outside – $5.99 on Steam Vampire Hunters – $5.24 on Steam MOTHERGUNSHIP – $4.99 on Steam My Friend Pedro – $3.99 on Steam The Messenger – $3.99 on Steam Vampire Survivors – $3.74 on Steam Brotato – $2.99 on Steam Enter the Gungeon – $2.99 on Steam Loop Hero – $2.99 on Steam GRIS – $2.99 on Steam Exit the Gungeon – $2.49 on Steam Hitman: Absolution – $1.99 on Steam CARRION – $1.99 on Steam Don't Starve Together – $1.49 on Steam Golf With Your Friends – $1.49 on Steam Hotline Miami – $0.99 on Steam The Ouroboros King – $0 on Epic Store Warhammer 40K Speed Freeks – $0 on Epic Store DRM-free Specials Hopping over to the DRM-free deals, the GOG store has plenty of discounts running this weekend too. Here are some highlights: Fallout 4: Game of the Year Edition - $15.99 on GOG Fallout: New Vegas Ultimate Edition - $9.99 on GOG Disco Elysium - The Final Cut - $9.99 on GOG Crysis - $9.99 on GOG Tyranny - Standard Edition - $7.49 on GOG Frostpunk: Game of the Year Edition - $7.35 on GOG Banished - $6.79 on GOG Fallout 3: Game of the Year Edition - $6.59 on GOG The Forgotten City - $6.25 on GOG The Age of Decadence - $5.99 on GOG SimCity 3000 Unlimited - $4.99 on GOG Assassin's Creed: Director's Cut - $4.99 on GOG SimCity 4 Deluxe Edition - $3.99 on GOG Vampyr - $3.99 on GOG Torchlight II - $3.99 on GOG Deus Ex GOTY Edition - $3.49 on GOG Primordia - $3.09 on GOG Theme Hospital - $2.99 on GOG SimCity 2000 Special Edition - $2.99 on GOG Total Annihilation: Kingdoms + Iron Plague - $2.99 on GOG Deus Ex: Human Revolution - Director’s Cut - $2.99 on GOG Master of Orion 1+2 - $2.39 on GOG Prince of Persia: The Sands of Time - $1.99 on GOG Prince of Persia: Warrior Within - $1.99 on GOG EVERSPACE - $1.99 on GOG Total Annihilation: Commander Pack - $0.99 on GOG Keep in mind that availability and pricing for some deals could vary depending on the region. That's it for our pick of this weekend's PC game deals, and hopefully, some of you have enough self-restraint not to keep adding to your ever-growing backlogs. As always, there are an enormous number of other deals ready and waiting all over the interwebs, as well as on services you may already subscribe to if you comb through them, so keep your eyes open for those, and have a great weekend.
    • When will the Photos app be updated to remember the window size and position when reopened? They addressed this issue in a 2024 version of the app (though I can't recall the build number). Unfortunately, after that specific version, the problem persists! Please prioritise this fix in your K2 schedule. Additionally, the Snipping Tool has lost the ability to capture the Windows Taskbar starting from the 2024 version!
    • Same, never saw it on Android or iOS. Guess only some people got it *shrugs*
    • Anthropic pulls Fable 5 and Mythos 5 after US export control order by Pradeep Viswanathan In April this year, Anthropic launched the Claude Mythos Preview frontier model with state-of-the-art cyber and coding capabilities for a select set of companies around the world. After preparing appropriate guardrails, early this week, Anthropic launched Claude Fable 5 and Mythos 5, its most capable AI models. Claude Fable 5 is for general users and comes with strict safeguards, while Mythos 5 is designed with fewer safeguards for cybersecurity and biology use cases. Today, Anthropic abruptly suspended access to its Fable 5 and Mythos 5 AI models for all customers after receiving an export control directive from the US government. The company received the directive from the government today at 5:21 p.m. ET, and the received letter did not provide any details regarding the national security concern. Anthropic understands that the government became aware of a method to bypass, or “jailbreak,” Fable 5, which might be the reason behind the directive. The order was issued under national security authorities and requires the company to suspend all access to Fable 5 and Mythos 5 by any foreign national, whether they are inside or outside the United States. The restriction also applies to foreign national employees working at Anthropic. As a result, the company has disabled both models for all customers to ensure compliance. Access to previous Anthropic models like Opus and Sonnet is not affected by this government order. The company highlighted that it had developed strong safeguards to reduce the possibility that Fable is misused for tasks related to cybersecurity. In fact, many developers are complaining that the safeguards are going overboard. Additionally, the company worked with the US government, the UK AISI, multiple private third-party organizations, and internal teams to red-team Fable’s safeguards for thousands of hours. Finally, Anthropic noted that no testers have yet been able to find a universal jailbreak on Fable 5. As expected, Anthropic disagrees that a narrow potential jailbreak should lead to the recall of a commercial model used by hundreds of millions of people. It warned that applying this standard across the AI industry could effectively halt new frontier model deployments. Anthropic concluded by mentioning that it is working to restore access to Fable 5 and Mythos 5 as soon as possible and plans to share more details within the next 24 hours.
  • Recent Achievements

    • Week One Done
      ssd21345 earned a badge
      Week One Done
    • Contributor
      MarkHughes4096 went up a rank
      Contributor
    • Dedicated
      jordanspringer earned a badge
      Dedicated
    • Rookie
      Rimplesnort went up a rank
      Rookie
    • One Year In
      Markus94287 earned a badge
      One Year In
  • Popular Contributors

    1. 1
      +primortal
      503
    2. 2
      +Edouard
      176
    3. 3
      PsYcHoKiLLa
      147
    4. 4
      ATLien_0
      92
    5. 5
      Steven P.
      79
  • Tell a friend

    Love Neowin? Tell a friend!