tags:

views:

70

answers:

3

Windows API


So i know that the WinForms touches on the Windows API a little, but frankly its horrible. ESPECIALLY with the layered windows and flickering. So i was wondering if anyone has wrote partial, or full wrappers for the Windows API.Im particularly interested in the Layered Window aspect, but really any part of the API is a good place to start.

Update: I found the Windows API Code Pack here: http://code.msdn.microsoft.com/WindowsAPICodePack but it seems that it doesnt wrap Layered Windows? Am i correct in assuming this?

Native API (Windows)


Ive heard a little bit about the Native API, but im not quite sure what it is for? what features does it provide? would it be a good idea to look into?

Summary (Questions in a nutshell)


  1. Does anyone know of an existing (partial or full) wrapper of the Windows API?
    • If the answer is no to question one, where would be a good resource to learn about it myself, and potentially write my own?
  2. An explanation of the Native API? What does it do? Can I use it to make applications better? Can I even USE it at all?

An answer to any of those is highly appricaited :) thanks

+3  A: 

You could start at PInvoke.NET.

Jordão
I guess this broad answer is the best you can get with such a broad question.
0xA3
+1  A: 

The Windows API is huge. There is a ton of stuff in it. Windows Forms is a wrapper of parts of it. WPF is a wrapper of parts of it. Parts of the Base Class Libraries (eg System.IO.*) are wrappers of parts of it. The Code Pack is a wrapper specifically of things that were new in Vista and Windows 7 and not in Windows Forms or WPF.

Have you looked into WPF? Combined with P/Invoke of specific API functions, it might take you a long way towards where you want to be.

Kate Gregory
+2  A: 

The LayeredWindows actually work better in WinForms than windows. The native windows controls don't even have the alpha channel support of the WinForms analogues, so native windows flicker, and require massive amounts of subclassing to override the painting to use alpha compatible routines.

You would be better off going to WPF. The windows team has not treated the native control's well at all, going so far as to remove support for a style (WS_EX_COMPOSITED) if aero glass is enabled which, given the way that windows controls paint, effectivly made it impossible for any application to paint flicker free if it uses child window's as controls.

WPF "draws" windows controls, but does not use discrete (native) child windows to represent individual controls. This gives it control over when and how its window surface is rendered.

Chris Becke