Re: Windows message -> .NET method

Tech-Archive recommends: Repair Windows Errors & Optimize Windows Performance

From: Edward Diener (eddielee_at_tropicsoft.com)
Date: 10/26/04


Date: Tue, 26 Oct 2004 14:36:11 -0400

Joshua Frank wrote:
> Better still would be a Win32 namespace that actually encapsulated the
> whole API in a managed way.

I do not know if it would be better, since I still would not get the benefit
of knowing how Windows messages translate into .NET events. It would be
helpful so that one would not have to #include <windows.h> in VC++, use IJW,
and create mixed mode assemblies that way with their current destructive
bugginess, and of course it would be better for all languages not to have to
use InterOp just to drop to the Windows API level. But if MS documented the
messages -> .NET events better, I might not have to ever go the Win32 API
route anymore in the first place.

>
> Edward Diener wrote:
>
>> Microsoft has put out a document relating Win32 API calls to .NET
>> methods
>>
(http://msdn.microsoft.com/library/default.asp?url=/library/en-us/dndotnet/h
>> tml/win32map.asp ) . An equally valuable document, esspecially from
>> the component developer point of view, would map Windows messages to
>> .NET methods.
>>
>> Has anyone seen such a document ?
>>
>> I find myself pretty consistently looking at Win32 code which does a
>> SendMessage or PostMessage and searching for the .NET method which is
>> equivalent. Sometimes I find a method which looks like it will do
>> what I want, but the MSDN .NET framework documentation is often not
>> clear enough to tell me if it is so. Of course I can experiment, but
>> I hate top spend time playing arouind when a good document would
>> already tell me.
>>
>> Am I the only .NET developer who feels a need for such a document
>> from Microsoft to aid in porting Win32 functionality to .NET ?



Relevant Pages

  • Re: No TextBox method for clearing the selection
    ... and thanks for clearing my misconception about Win32 api and C++ ... > Windows messages exist for all programming languages which use the Win32 ... > was previously used in Win32 when sending the message to the control. ...
    (microsoft.public.dotnet.framework.windowsforms.controls)
  • Re: More on Shatter
    ... pronouncements that the problem is "inherent to the Win32 API" and "unfixable". ... dozen of these timers active at once. ... Operators of critical servers could leave the filtering ...
    (Vuln-Dev)
  • Re: What can .Net do for me?
    ... >> object-oriented API. ... If you're not writing OOP apps then you'll probably ... WIN32 is here *now*. ... > "If you don't use the Windows API directly then you'll probably never ...
    (borland.public.delphi.non-technical)
  • Re: Suggested base class additions
    ... If you think of Dolphin as primarily a Smalltalk-flavoured front-end to Win32, ... then it'd seem quite natural to have all the API wrapped/exposed. ... on Windows, then the less you see of the Win32 cesspit the better. ...
    (comp.lang.smalltalk.dolphin)
  • Re: What can .Net do for me?
    ... > How is .NET a benefit over WIN32 API? ... > better than the mess that is WIN32. ... >> specific development languages. ... Because it's OOP? ...
    (borland.public.delphi.non-technical)