View Full Version : Petzold v. .NET
lennard
03-27-2007, 01:35 PM
I'm studying windows stuff this week and had planned to do a windoze based project old school - ie. win32 function calls to handle all of my windows and dialog stuff. I'm not interested in learning MFC for a variety of reasons but I saw something today that suggested that anything but .NET would eventually be deprecated (2010 time frame). Anybody know if this is reality or not?
Would like to just buy the latest Petzold and start cranking, the job is in jeopardy if I have to get into .NET as I'm not into buying into a proprietary dev. scheme.
Deprecated does not mean it won't work, especially with Windows - the most important selling point for Vista is backwards compatibility.
Emulated or virtualized maybe but pure win32 stuff will always work.
Applewood
03-27-2007, 02:10 PM
And I've never taken the time to learn anything other than win32 and regret it at least weekly.
I'm kinda limited by the fact that most windows programming I do is for my engine tools, so needs to be in C++ (as I know a little Java which might help). But, when I want controls that are more advanced than the basics, I'm shit outta luck - you can't find tuts on anything in pure win32.
Learn .NET while you can, I wish I had time to...
Meanwhile, if anyone can show me a win32 tut to put 2 or more checkboxes into a treeview, (ideally with a tabbed list box row in each leaf), I'd have bare your children.
svero
03-27-2007, 10:16 PM
It's good to lean base windows stuff and then mfc. MFC is really a bunch of pretty hacky c++ with lots of macros sitting on top of the win32 stuff anyway. MFC is easier to pickup if you're already familiar with the base win32 calls and ++.
Dominique Biesmans
03-27-2007, 11:15 PM
Meanwhile, if anyone can show me a win32 tut to put 2 or more checkboxes into a treeview, (ideally with a tabbed list box row in each leaf), I'd have bare your children.
Codeguru (http://www.codeguru.com) used to be a good source for extended controls. Do a search for "checkbox" on this page (http://www.codeguru.com/cpp/controls/treeview/) and you'll find a few examples. (unchecked)
Dominique Biesmans
03-27-2007, 11:23 PM
the job is in jeopardy if I have to get into .NET as I'm not into buying into a proprietary dev. scheme.
Well, look at it this way: which one of the two is more proprietary : win32 or .NET? While the Microsoft implementation of .NET is windows specific, .NET is an open standard, making projects like mono (http://www.mono-project.com/) possible.
Pyabo
03-28-2007, 12:36 AM
If your choices are Win32 or .NET, it's a no brainer... go with .NET and don't look back. It's the way of the future. And why did you title this "Petzold v .NET?" In case you hadn't checked, the most recent Petzold books are devoted to C#/.NET.
Applewood
03-28-2007, 04:03 AM
Been there, thanks. All I could find was MFC class extensions :(
GrahamGoring
03-28-2007, 05:08 AM
And I've never taken the time to learn anything other than win32 and regret it at least weekly.
I'm kinda limited by the fact that most windows programming I do is for my engine tools, so needs to be in C++ (as I know a little Java which might help). But, when I want controls that are more advanced than the basics, I'm shit outta luck - you can't find tuts on anything in pure win32.
I, too, had the devil's own job finding tuts when I started out in win32 for anything to do with controls, but I get on with it fairly peachily nowadays. Some of the better things I found were Forger's win32 tutorials (simple stuff, but it helped), some really old example programs from when Win95 was still codenamed "Chicago" and using the usenet win32 discussion newsgroup as they're a fairly friendly lot if you stay on-topic.
Ronkes
03-28-2007, 09:11 AM
I find these Win32 tutorials very helpful: http://www.catch22.net/tuts/. No checkboxes in tree views, though, I'm afraid.
More on topic: whether you're better off using Win32 or .NET depends on a couple of things, most importantly what type of app you're making and how familiar you are with each of the technologies you are considering.
It sounds like you're not familiar with either Win32 or .NET. In my experience, .NET is definitely easier to learn and most applications can be written with less code than would be possible with Win32. I kinda like programming in Win32, but it takes a while to adjust your mindset to it.
Petzold himself said that nowadays he choses .NET whenever he needs to write a Windows app, unless there is a specific reason not to. I agree with him. So the question you'll have to answer is: what reason do I have not to use .NET? (The hassle of distributing the framework is one possible answer, but I can't decide for you whether it applies in your case.)
DavidL
03-30-2007, 03:09 PM
The nice thing about writing Win32 is that if you play your cards right, your app can be compatible with a wide range of older systems (Win95, Win98, etc.) while its total distribution size remains small.
With .NET, compatibility can become an issue, especially if you want to keep your app's total download size small. Users may need to download dependencies first, such as the .NET runtime itself, or more, depending on which version of .NET you are targeting (1.1, 2.0, or 3.0.) This may or may not be a problem in your case though, depending on your audience.
.NET does have a lot of advantages though. The languages and APIs are often easier to work with (than C/C++, the Windows API, and MFC), and Microsoft seems to put much more time and effort into simplifying .NET development than they do to their non-.NET C/C++ tools.
zoombapup
03-31-2007, 02:24 AM
Goddam I hate MFC.. it really REALLY bites.
.Net all the way for windows "apps", especially tools.
Dont be bone headed and think that you gain something from not using a suitable technology just because it thumbs a nose at microsoft. Frankly, .net is for the most part GOOD for windows dev. I do wish there were a provable cross platform variant (I know mono isnt complete and of course you know that microsoft will always try and shift the goalposts on it).
20thCenturyBoy
03-31-2007, 04:49 AM
Depends what you need to do. If you just need a window and a canvas on which to use GDI then Win32 isn't that difficult, and .Net graphics functions are really only a thin layer on top of gdiplus anyway. If however, you are looking to develop a data-bound client using tables, trees etc, then you'd be mad to use anything but .Net (or Java) as it already has classes for that sort of thing.
vBulletin v3.6.0, Copyright ©2000-2008, Jelsoft Enterprises Ltd.