"John Harrison" <jo*************@hotmail.com> wrote in message
news:c1*************@ID-196037.news.uni-berlin.de...
Besides GetObject, they have also macro-redefined lots of other useful
names, such as 'DrawText' or 'MessageBox'. This is _really_ annoying.
Simple, don't use camel notation
get_object, draw_text, message_box, you know it makes sense.
And more to the point, one needs to pay attention to any
libraries one is using(*), and not step on their names.
C++ namespaces help greatly with this. Since the Windows
API is not in a namespace (it's mainly intended as a C
interface), you can insulate your names from it by putting
your own code in a namespace(s) (except 'main()', that is).
<OT>
Marcin:
Those symbols 'GetObject', 'DrawText', 'MessagBox', are names
from the Windows API. Many of these are macros which expland
to the same names with either 'A' or 'W' suffixes depending upon
a #define, for choosing between ASCII and Unicode. That's
"Just The Way It Is". Those who don't like it can simply choose
not to use the API, but perhaps some 'wrapper' library.
(*)What, you're not using the Windows API? Then what's the
windows.h there for? I don't see anything in your code that
uses it. Remove it, and then you can use those symbols
as your own.
And if I'm writing code that *does* use the Windows API, I
don't use their 'camel case' for my own symbols, it makes
it obvious which symbols are from the API, and which not.
(except for the all-uppercase macro names of course).
</OT>
-Mike