Click here to Skip to main content
16,005,149 members
Home / Discussions / .NET (Core and Framework)
   

.NET (Core and Framework)

 
QuestionRegarding Windows Workflow Pin
bluish9-Feb-10 13:08
bluish9-Feb-10 13:08 
AnswerRe: Regarding Windows Workflow Pin
Richard MacCutchan9-Feb-10 21:43
mveRichard MacCutchan9-Feb-10 21:43 
QuestionRegarding FileSystemWatcher Pin
bluish9-Feb-10 13:07
bluish9-Feb-10 13:07 
AnswerRe: Regarding FileSystemWatcher Pin
Luc Pattyn9-Feb-10 13:35
sitebuilderLuc Pattyn9-Feb-10 13:35 
GeneralRe: Regarding FileSystemWatcher Pin
bluish9-Feb-10 19:09
bluish9-Feb-10 19:09 
GeneralRe: Regarding FileSystemWatcher Pin
Luc Pattyn10-Feb-10 1:13
sitebuilderLuc Pattyn10-Feb-10 1:13 
AnswerRe: Regarding FileSystemWatcher Pin
Dave Kreskowiak10-Feb-10 2:21
mveDave Kreskowiak10-Feb-10 2:21 
GeneralFrustrations with C++/MFC vs. C#/.NET Pin
al25009-Feb-10 11:21
al25009-Feb-10 11:21 
Hi all,

I have been programming in Visual C++/MFC for some time now and it can be a frustrating experience. Often I find myself implementing various workarounds for deficiencies in container classes, controls, dialogs and serialization. Also, documentation seems to be very fragmented. Sometimes I get hung up for days on something which should be very simple. Of course I know that every environment has it's quirks but hopefully things have improved with C#/.NET as opposed to a whole new, possibly bigger set of problems.

I thought I would list a few of my most frustrating experiences with C++/MFC to elicit comments comparing C#/.NET. I have started reading up on C#/.NET and I know it has many improvements but it's nice to hear from those using it before I jump in.

1. Container classes - I know that C# has reworked these. I use C++ CArrays extensively and although they work well for the basics, it's gets very tiring having to write workarounds or pure C code for things like multidimensions, sorting and serialization. Everytime I want to serialize a CArray with mixed types (CStrings), I have to implement a template override and depending in what MFC generated class the array/template lives, it may not be called and I have to cross my fingers that serialization will be reliable. As if this wasn't bad enough, MS documentation on this workaround consists of one poorly worded paragraph - took me ages to realize why serialization of Array based CStrings was not reliable.

2. Tabbed dialogs - I once had to make a fairly complicated tabbed dialog that was able to save user settings(via serialization) and restore them automatically on initialization - you can't believe how much code this required because of quirks in the behavior of property sheets/pages and inconsistent behavior of serialization from the property page class. Implementing the same behavior in a simple dialog would be trivial. It seems that MS .NET tabbed dialogs behave just like regular dialogs which would be a godsend.

3. Serialization - in addition to the problems with arrays, it seems like an excessive number of poorly documented macros are required. The whole IMPLEMENT_SERIAL/DYNAMIC/DYNCREATE macros are very confusing. I know most people use alternate methods but I hate to reinvent the wheel.

4. Lack of useful controls. I once needed to display lots of data in a grid format and ended up using Flexgrid which it seems was never intended for general useage. Also, implementing controls in the mainframe border area (ex. a color picker like the one in paint) is extremely difficult.

5. Modifying behaviour of framework - I often need slightly different behavior with regards to the mainframe/childframe. A lot of this knowledge seems to be tribal. For example, I recently had to modify the child window title based on various program conditions. This is fairly common - many apps will place a '*' next to the filename if source is modified. I found a webpage on methods of doing this. They presented several possible methods but they basically admitted that none worked well or at all due to framework code unknowns. Luckily I saw that someone gave a reply to the article that gave me a working solution. I could not find any documentation on MS.
GeneralRe: Frustrations with C++/MFC vs. C#/.NET Pin
Not Active9-Feb-10 11:45
mentorNot Active9-Feb-10 11:45 
GeneralRe: Frustrations with C++/MFC vs. C#/.NET Pin
al25009-Feb-10 13:12
al25009-Feb-10 13:12 
GeneralRe: Frustrations with C++/MFC vs. C#/.NET Pin
Not Active9-Feb-10 14:20
mentorNot Active9-Feb-10 14:20 
GeneralRe: Frustrations with C++/MFC vs. C#/.NET Pin
Roger Wright9-Feb-10 19:01
professionalRoger Wright9-Feb-10 19:01 
GeneralRe: Frustrations with C++/MFC vs. C#/.NET Pin
Richard MacCutchan9-Feb-10 21:42
mveRichard MacCutchan9-Feb-10 21:42 
NewsVisual Studio 2010, .NET Framework 4 release candidate ships Pin
brucedkyle9-Feb-10 6:12
brucedkyle9-Feb-10 6:12 
QuestionHow to add APP.Config for Visual Basic Application Pin
ramdili9-Feb-10 4:44
ramdili9-Feb-10 4:44 
AnswerRe: How to add APP.Config for Visual Basic Application Pin
Not Active9-Feb-10 5:40
mentorNot Active9-Feb-10 5:40 
Question.NET & Linux OS Pin
fahimeh_hashemi8-Feb-10 2:08
fahimeh_hashemi8-Feb-10 2:08 
AnswerRe: .NET & Linux OS Pin
ddecoy8-Feb-10 4:22
ddecoy8-Feb-10 4:22 
GeneralRe: .NET & Linux OS Pin
Pete O'Hanlon8-Feb-10 4:34
mvePete O'Hanlon8-Feb-10 4:34 
AnswerRe: .NET & Linux OS Pin
Luc Pattyn8-Feb-10 4:54
sitebuilderLuc Pattyn8-Feb-10 4:54 
QuestionVisual Studio 2008 with SQL Server Express Edition Pin
meeram3957-Feb-10 20:33
meeram3957-Feb-10 20:33 
AnswerRe: Visual Studio 2008 with SQL Server Express Edition Pin
Andy_L_J7-Feb-10 20:40
Andy_L_J7-Feb-10 20:40 
GeneralRe: Visual Studio 2008 with SQL Server Express Edition Pin
meeram3957-Feb-10 22:25
meeram3957-Feb-10 22:25 
GeneralRe: Visual Studio 2008 with SQL Server Express Edition Pin
Kevin McFarlane8-Feb-10 9:27
Kevin McFarlane8-Feb-10 9:27 
AnswerRe: Visual Studio 2008 with SQL Server Express Edition Pin
Richard MacCutchan7-Feb-10 22:11
mveRichard MacCutchan7-Feb-10 22:11 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.