c++ Why am I getting CreateWindowW, when I call CreateWindow ?

Started by
11 comments, last by Nitage 18 years, 10 months ago
Quote:you can't impose your own arbitrary decisions on the rest of the programming world.


Look up the word arbitrary. The practice of minimising the use of Macros in both C and C++ code is not arbitrary - it is advocated by the majority of C/C++ programmers for a very good reason.

Quote:
The reason they don't use the all caps naming convention is two fold a) its just your convention not a standard, b) they wan't it to look like a funtion call as that's how it was from the windows 3.1 days. This way other people dont' have to modify their code.


Actually, it's a convention which Microsoft follows for the most part.

Quote:
Just because you've never worked on a serious project doesn't mean others haven't. Maintaing legacy code is very important, and your "rant" would cause most of it to break.


Rant is your word not mine, so I've no idea why you quoted it.

Secondly, you have no basis for assuming that I've never worked on a large project. I'm well aware that nasty bits of code persist because of the time and effort required to change them.

Quote:
You just need to learn that most microsoft "hacks" are acutallly very well thought out and implemented by people who have forgotten more about programming than we'll ever know:)


Microsoft programmers aren't all Herb Sutter.

Quote:
EDIT, sorry that came off alittle harsh on you, didn't mean it to:)


No problem. It's easy to go a little overboard on forums.
Advertisement
Quote:Original post by Nitage
I'm well aware that nasty bits of code persist because of the time and effort required to change them.


"Do you know what 'Legacy Code' means? It's code that works"

It's mostly not there because of the "time and effort required to change them", it's there because Microsoft doesn't own 90% of the code you run everyday, so it can't be changed.

The problem is, if you have Program A which you're running on Windows 2000, and you upgrade to Windows XP which breaks Program A, who do you blame? You don't think to yourself "Crappy Program A developers, everybody knows you're not supposed to call RandomAPI with uninitialized data in the dwReserved parameter of RandomStruct" or whatever, you think "Crappy Windows, breaking this program I've been using for 5 years without a single crash".

So the developers of Windows have to jump through hoops to keep programs running between versions, which means you end up with hacks all over the place...
Quote:Original post by Dean Harding
Quote:Original post by Nitage
I'm well aware that nasty bits of code persist because of the time and effort required to change them.


"Do you know what 'Legacy Code' means? It's code that works"

It's mostly not there because of the "time and effort required to change them", it's there because Microsoft doesn't own 90% of the code you run everyday, so it can't be changed.

The problem is, if you have Program A which you're running on Windows 2000, and you upgrade to Windows XP which breaks Program A, who do you blame? You don't think to yourself "Crappy Program A developers, everybody knows you're not supposed to call RandomAPI with uninitialized data in the dwReserved parameter of RandomStruct" or whatever, you think "Crappy Windows, breaking this program I've been using for 5 years without a single crash".

So the developers of Windows have to jump through hoops to keep programs running between versions, which means you end up with hacks all over the place...


That's totally wrong. Correcting this would require Microsoft to release a new version of the Win32 API. Legacy code could be compiled with the old version. Applications already compiled would still run.

Much like code compiled for Win98 will run on WinXP even though the API has been expanded.

This topic is closed to new replies.

Advertisement