Sign In Start Free Trial
Account

Add to playlist

Create a Playlist

Modal Close icon
You need to login to use this feature.
  • Book Overview & Buying D Cookbook
  • Table Of Contents Toc
D Cookbook

D Cookbook

By : Adam Ruppe
5 (9)
close
close
D Cookbook

D Cookbook

5 (9)
By: Adam Ruppe

Overview of this book

Table of Contents (21 chapters)
close
close
D Cookbook
Credits
Foreword
About the Author
About the Reviewers
www.PacktPub.com
Preface
2
Index

Calling the Windows API functions


The Windows API provides a rich set of functionalities for applications. The entire Windows API is directly accessible from D. Here, we'll demonstrate this by popping up an information message box and a file chooser dialog box using the standard Win32 API functions.

Getting ready

First, make sure you have correctly installed the DMD compiler for Windows. If you want to build 64-bit applications, you must download and install Visual Studio (any version that supports C++ development, including Express) first because dmd on 64-bit Windows uses the Microsoft linker and libraries for better cross-language compatibility.

You'll also want to create or download the Windows API bindings since the Windows bindings that come with dmd are quite incomplete. You can create your own, as required, by copying and pasting the function and struct prototypes from MSDN.

If you are on 32 bit, you might also want to get the newer .lib files from Microsoft and convert them to the OMF...

Visually different images
CONTINUE READING
83
Tech Concepts
36
Programming languages
73
Tech Tools
Icon Unlimited access to the largest independent learning library in tech of over 8,000 expert-authored tech books and videos.
Icon Innovative learning tools, including AI book assistants, code context explainers, and text-to-speech.
Icon 50+ new titles added per month and exclusive early access to books as they are being written.
D Cookbook
notes
bookmark Notes and Bookmarks search Search in title playlist Add to playlist font-size Font size

Change the font size

margin-width Margin width

Change margin width

day-mode Day/Sepia/Night Modes

Change background colour

Close icon Search
Country selected

Close icon Your notes and bookmarks

Confirmation

Modal Close icon
claim successful

Buy this book with your credits?

Modal Close icon
Are you sure you want to buy this book with one of your credits?
Close
YES, BUY

Submit Your Feedback

Modal Close icon
Modal Close icon
Modal Close icon