How should I learn to use the Windows API with Python?

前端 未结 12 1090
迷失自我
迷失自我 2020-12-07 10:52

I have very little experience building software for Windows, and zero experience using the Windows API, but I\'m reasonably familiar with Python. How should I go about learn

相关标签:
12条回答
  • 2020-12-07 11:03

    As Charlie says : "this Api is an 800 pound monster covered with hair".

    Consider using the express version (free) of visual studio for vb or c# (http://www.microsoft.com/express/) along with the msdn library (http://msdn.microsoft.com/en-us/library/default.aspx). this will give you as much exposure to the api as you want.

    0 讨论(0)
  • 2020-12-07 11:04

    Umm...a lot of people have put the cart before the horse on this one. The question I have for you is: why do you want to learn Win32?

    If you want to learn it so you can build Windows user interfaces, perhaps consider wxPython instead. If you only plan on calling into non-visual Win32 APIs then the Petzold book may not be the best. There are tools like SWIG that make calling libraries such as Win32 easier from languages like Python.

    0 讨论(0)
  • 2020-12-07 11:11

    All you need is completely free on MSDN.COM. Win32 is easily programed using C/C++, C#, and Visual Basic. I recommend C/C++. YOu can download the Visual Studio Express editions here.

    All the documentation (not an abbreviated form) is on the web here.

    Note that Win32 is often loosely used to mean "all the programming interface for Windows". More cannonically, it is the base native set of APIs for user mode applications. There a similar set of APIs for drivers and kernel components. You can learn about that here.

    Microsoft has many other windows programming interfaces as well: The Common Language Run time and .NET frame work is a manged layer on top of windows. There are many other API families as well such as DX9 and DX10 (good link to game programming here).

    0 讨论(0)
  • 2020-12-07 11:13

    Learning Win32 API is 5% of initial understanding of concepts and the patterns used and 95% of RTFM.

    For those initial 5% the Petzold book is really good but I suspect that there ought to be some online tutorials which you can find in google as good as I can to find.

    Really, once you get the hang of it it's really straight forward do to be able to do anything. Once you get there it would probably be time to move on to something better like QT and never touch Win32 API ever again. Nowadays no one really uses bare Win32 API for anything more than trivial due to the sheer overhead it involves and the extreme lack of comfort.

    0 讨论(0)
  • 2020-12-07 11:14

    Since you've asked about Python, why do you need the Win32 API ? That's used for writing small, fast C/C++ programs. If your tool is Python, just download wxPython which runs wonderfully on Windows and produces sleek native GUIs with 1% the code and the effort.

    0 讨论(0)
  • 2020-12-07 11:16

    You have to start with these two books.

    Petzold book: Great for learning messages and message pumps, GDI and User32 stuff.

    Richter book: The windows base services, viz. Processes, memory, threads and dlls

    0 讨论(0)
提交回复
热议问题