• 0

Good Win32 (Windows API) Programming Book?


Question

I am looking for a good Win32 (Windows API) book. I would like it to be as recent as possible and include information about how I would program for Windows 7 as well. Any recommendations? I know .NET programming and want to learn to move on to systems level programming. Thank you in advance.

11 answers to this question

Recommended Posts

  • 0
  winlonghorn said:
*Bump. Anyone? :)

No need to bump. It's only been 18 minutes.

With Win7 not even reaching RTM yet, your best bet would be online resources instead of books..

Edit: Here's a good one from MS: Windows 7 RC Training Kit for Developers

  • 0
  GreenMartian said:
No need to bump. It's only been 18 minutes.

With Win7 not even reaching RTM yet, your best bet would be online resources instead of books..

The problem is that I need one resource to learn it and not a bunch of scattered resources. I need the organization to help me focus without hunting and pecking lol. That is why I like books for learning. :)

  • 0

Bumping after just 19 minutes? :rolleyes:

Programming Windows is a classic and is arguably the best book, though old. As for Win7, first, I'm not sure if there's a book for that, given that the APIs for Win7 were only recently documented; plus, MSDN provides a pretty good reference for the new APIs (almost all of them COM APIs) in Win7. Besides, the specific APIs of each Windows version are largely unimportant because the main concepts are fairly stable and are mostly unchanged through all versions, and that's what you'll get from Petzold. Get a feel for the Windows architecture and platform, and the APIs are just details that you can look up in the docs (which you have to refer to anyway for specifics on each function's parameters and return codes, etc).

Or you can just do what I did: look at the docs and look at sample code; programming isn't history class: books are not that important when it comes to learning this stuff.

  • 0
  code.kliu.org said:
Bumping after just 19 minutes? :rolleyes:

Get Petzold. Programming Windows is a classic and is arguably the best book. As for Win7, first, I'm not sure if there's a book for that, and MSDN provides a pretty good reference for the new APIs (almost all of them COM APIs) in Win7. Besides, the specific APIs of each Windows version are largely unimportant because the main concepts are fairly stable and are mostly unchanged through all versions. Get a feel for the Windows architecture and platform, and the APIs are just details that you can look up in the docs (which you have to refer to anyway for specifics on each function's parameters and return codes, etc).

Thank you. :) Sorry about the bump. I just needed to get an answer for the friend who is buying the book and they had to leave soon.

  • 0

http://www.amazon.com/s/ref=nb_ss_gw_0_9?u...refix=win32+pro

Read reviews. Generally, MS books are very good when it comes to Win32 apps. The Windows via C/C++ is probably a good bet. Jeffery Richter is a very well-known resource for Win32 and Windows programming in general. the Petzold book is excellent, as well, but doesn't deal with newer APIs. It is invaluable, though.

  • 0
  azcodemonkey said:
http://www.amazon.com/s/ref=nb_ss_gw_0_9?u...refix=win32+pro

Read reviews. Generally, MS books are very good when it comes to Win32 apps. The Windows via C/C++ is probably a good bet. Jeffery Richter is a very well-known resource for Win32 and Windows programming in general. the Petzold book is excellent, as well, but doesn't deal with newer APIs. It is invaluable, though.

Ok, great. Thank you. :)

EDIT: I am buying the petzold book. I read the amazon preview and it looks fantastic! :)

Edited by winlonghorn
  • 0

Petzold's book was good, but you people need to be realistic. It is an old book. Very old. Over a decade old, and very dated. I'm not so sure if it can be recommended anymore, even though the basics haven't changed that much.

If you're interested in online resources, http://www.winprog.org/tutorial/start.html is not bad, especially when combined with MSDN. Let's say you want some more in-depth details about Windows, you could just head over to http://msdn.microsoft.com/en-us/library/ms...28VS.85%29.aspx

If you look in the tree on the left, it also has sections explaining window procedures, window classes, input, the various controls, etc. Most parts have example code as well. It's the main reference site for the Windows APIs, so it's something you have to bookmark. As for Windows 7, it has many new things in various areas. Let's say you wanted to use the new API that gives you a progress bar in the task bar button, this is the method to do it (along with SetProgressValue). Only one problem though, it's a COM interface exposed by the shell (Explorer), which means you need to have a basic understanding of COM (which you'd have to get somewhere else). You also need this to do various other things like multimedia, image processing, etc.

Just as a little example, you'd set the progress bar to 20% and turn it red to indicate an error like this (without any error checking or autopointers):

ITaskbarList3 *tl3 = NULL;
hr = CoCreateInstance(CLSID_TaskbarList, NULL, CLSCTX_INPROC_SERVER,
	__uuidof(ITaskbarList3), IID_PPV_ARGS(&tl3));

hr = tl3->HrInit();

hr = tl3->SetProgressValue(hwnd, 20, 100);
hr = tl3->SetProgressState(hwnd, TBPF_ERROR);

tl3->Release();

It's not that complex, you just create an instance of the class with CoCreateInstance, and then call the various methods it exposes as you see fit. Of course, you have to learn this somewhere.

  • 0
  hdood said:
even though the basics haven't changed that much.

Well, that's what he needs, though. An understanding of the platform. Knowing the difference between SendMessage and PostMessage. That kind of stuff.

  Quote
Of course, you have to learn this somewhere.

Yes, and the MSDN library contains plenty of documentation and code samples for the new features and APIs introduced in the past decade.

Developing for any platform can be separated into understanding the platform (e.g., how does the message queue work, or what exactly are windows?) and knowing the specific incantations needed to invoke feature XYZ. The former is fairly static and is mostly timeless and is thus book-worthy. OTOH, it doesn't make sense to have the latter in a book (what would a book do, beyond a dry, hard-to-search regurgitation of documentation and sample code found in the MSDN library?).

This topic is now closed to further replies.
  • Recently Browsing   0 members

    • No registered users viewing this page.
  • Posts

    • 1. DRM is the worst plague, I like my games clean. 2. Third party launchers are an overhead and annoyance.
    • Amazon lays off more staff across Goodreads and Kindle divisions by Hamid Ganji Dozens of Amazon employees working on the retailer's book divisions have been laid off. As reported by Reuters, Amazon confirmed that it's cutting jobs across the Goodreads review site and Kindle units, which impacts fewer than 100 workers. Amazon says the recent layoffs across Goodreads and Kindle divisions are meant to improve efficiency and streamline operations. The giant retailer has constantly reduced staff across various divisions over the past few years. According to CEO Andy Jassy, reducing headcounts helps the company to eliminate bureaucracy. "As part of our ongoing work to make our teams and programs operate more efficiently and to better align with our business roadmap, we've made the difficult decision to eliminate a small number of roles within the Books organization," an Amazon spokesperson said. Layoffs recently impacted employees in Amazon's Wondery podcast division, devices and services units, communications, and in-store staff. However, Amazon's Q1 results show the retailer has added about 4,000 jobs compared to Q4 2024. After the Covid pandemic settled down, many companies began laying off thousands of staff they hired during the pandemic to respond to growing demands. The layoff trend among tech firms still exists today, and AI has amplified it. The latest data shows that in 2025, about 62,832 tech employees were laid off across 141 tech companies. Also, 152,922 tech employees across 551 companies were laid off in 2024. More layoffs are expected to occur due to declining economic growth, tariffs, and the expansion of AI across companies. Amazon is also gearing up to double down in AI investments and robotics. The company has recently announced the forming of a new agentic AI team to develop an agentic AI framework for use in robotics. Also, a new report by The Information indicates that Amazon has begun testing humanoid robots for package delivery.
    • Major Privacy 0.98.1.1 Beta by Razvan Serea MajorPrivacy is a cutting-edge privacy and security tool for Windows, offering unparalleled control over process behavior, file access, and network communication. It is a continuation of the PrivateWin10 project. By leveraging advanced kernel-level protections, MajorPrivacy creates a secure environment where user data and system integrity are fully safeguarded. Unlike traditional tools, MajorPrivacy introduces innovative protection methods that ensure mounted encrypted volumes are only accessible by authorized applications, making it the first and only encryption solution of its kind. MajorPrivacy – Ultimate Privacy & Security for Windows key features Process Protection – Isolate processes to block interference from unauthorized apps, even with admin privileges. Software Restriction – Block unwanted apps and DLLs to ensure only trusted software runs. Revolutionary Encrypted Volumes Secure Storage – Create encrypted disk images for sensitive data. Exclusive Access – Unlike traditional tools, only authorized apps can access mounted volumes—blocking all unauthorized processes. File & Folder Protection – Lock down sensitive files and prevent unauthorized access or modifications. Advanced Network Firewall – Control which apps can send or receive data online. DNS Monitoring & Filtering – Track domain access and block unwanted sites (Pi-hole compatible filtering coming soon). Tweak Engine – Disable telemetry, cloud integration, and invasive Windows features for better privacy. Why MajorPrivacy? Kernel-Level Security – Protects at the deepest system level. Unmatched Encryption Protection – Keeps mounted volumes safe from all unauthorized access. Full System Control – Block, isolate, or restrict processes as needed. Enhanced Privacy – Stops Windows & apps from collecting unnecessary data. Perfect for privacy-conscious users, IT pros, and anyone who wants total system control. Major Privacy 0.98.1.1 Beta changelog: The 0.98.1 release of MajorPrivacy introduces significant enhancements and a number of critical fixes aimed at improving usability, localization, and system integration. A major new feature is the introduction of full translation support, allowing the application interface and tweaks to be localized into multiple languages. Initial translations include AI-assisted German and Polish versions, a community-contributed Turkish translation, and Simplified Chinese. Users interested in contributing translations or adding new languages are encouraged to participate via the forum. This version also improves compatibility and deployment by bundling the Microsoft Visual C++ Redistributable with the installer, which is required for the ImDisk user interface. Several important bugs have been resolved. The installer now correctly removes the driver during uninstallation. Tweak definitions have been cleaned up for better consistency. A number of networking issues were addressed, including failures related to network shares and incorrect handling of mapped drive letters. It is now required to use full UNC paths for defining rules involving shared resources. Additionally, configuration persistence issues on system shutdown have been fixed, as well as problems affecting protected folder visibility and rule precedence involving enclave conditions. Finally, the underlying driver code has been refactored, laying the groundwork for better maintainability and future enhancements. MajorPrivacy-v0.98.1.1.exe (0.98.1a) hotfix for #71 Download: Major Privacy 0.98.1.1 Beta | 47.4 MB (Open Source) View: MajorPrivacy Home Page | Github Project page | Screenshot Get alerted to all of our Software updates on Twitter at @NeowinSoftware
  • Recent Achievements

    • First Post
      Uranus_enjoyer earned a badge
      First Post
    • Week One Done
      Uranus_enjoyer earned a badge
      Week One Done
    • Week One Done
      jfam earned a badge
      Week One Done
    • First Post
      survivor303 earned a badge
      First Post
    • Week One Done
      CHUNWEI earned a badge
      Week One Done
  • Popular Contributors

    1. 1
      +primortal
      430
    2. 2
      +FloatingFatMan
      239
    3. 3
      snowy owl
      212
    4. 4
      ATLien_0
      211
    5. 5
      Xenon
      157
  • Tell a friend

    Love Neowin? Tell a friend!