GetObject and MessageBox are macros defined in the windows headers. They map these names to either the ANSI or the UNICODE imlplementation. However, they collide with .NET Method-Names, that''s why you get these errors.
General rule of thumb: whenever the compiler complains about a "SomeNameA" or "SomeNameW", you have to #undef SomeName.
The more interesting question to me is: why do you want to override the WndProc? Maybe if you tell us we''ll find a more elegant ''.NETish'' way.
Regards,
Andre
how can i use WndProc() in .NET applications?
1)Yes, i want handle some Windows Message, as Windows Unactivate and viceversa and so on...
2)Also if i use #undef MessageBoxA i get anyway error C2653 and error C2660 error.
Thanks.
2)Also if i use #undef MessageBoxA i get anyway error C2653 and error C2660 error.
Thanks.
quote:Original post by Link
the question is, why i need to include that header to use WM_ ?
You can always dig into the Windows headers and get the numerical values of those messages. That''s what you''d have to do if you were using C# or VB.NET anywyay.
quote:Original post by Link
1)Yes, i want handle some Windows Message, as Windows Unactivate and viceversa and so on...
2)Also if i use #undef MessageBoxA i get anyway error C2653 and error C2660 error.
Thanks.
ok i''ve resolved also the point 2. It need to #undef MessageBox at the place of MessageBoxA
Thanks at all.
This topic is closed to new replies.
Advertisement
Popular Topics
Advertisement