Windows Declare Book - Major update to 2.1

Windows Declare Version 2.1 has just been finished with more examples, more constants, more data, more explanations, updates from ANSI to Unicode, all Windows 10 compatible, both 32-bit and 64-bit compatible, and updated to Xojo 2017 r1.1. Version 1.x of the Declares book has been impressive and has had many updates for programmers. With the release of Xojo 64-bit debugger coming soon, the declares also needed updating.

Xojo provides a RAD (Rapid Application Development) environment because it protects the user from the Operating System. Xojo has many helpful functions, and declares add to this existing toolbox.Tapping into the Operating System directly with Declares opens up almost all of the options available for a program - but you are also out of the protection of the safe IDE (Integrated Development Environment) of Xojo. With the ability to change anything with the program or operating system, improper code also provides the ability of a crash. This is written for intermediate and advanced programmers of Xojo.

Thanks to for work on the 64-bit version of the ChooseColor example and for his comprehensive list of Xojo Data Type Conversions.

All examples have been converted to both 32-bit and 64-bit versions. This book is Version 2.1 (June 2017).

This book provides many examples that are converted from C++ functions to Xojo. Although there are many Visual Basic examples that can be converted, vb declare example are becoming outdated, have different parameters, or contain misinformation. For these reasons converting from C++ to Xojo is a long-lasting alternative and which this book provides many descriptions, reasons, references, and working examples for Xojo declares.There are more than 15 chapters and contains over 400 pages with over 80 example programs.

Examples include creating controls, a new window, GDI, Pens, brushes, Structures, Files, LoWord, Audio, play video, and much more. Many screenshots have been added to show the results of the code with an index to help find topics quickly.

Screen grab of the ChooseColor Dialogue Box example 15-1:

ChooseColor Dialogue Box example in chapter 15

Added content to Versions 2.0 and 2.1 (June 2017) are:

Added String values for Example 5-3
Added Set application and windows icon: Example 6-11 – 32 and 64 bit compatible
Added WS_OVERLAPPEDWINDOW constant on Page 173
Added WS_TILEDWINDOW constant on Page 173
Added WSEXPALETTEWINDOW constant on Page 172
Added WSEXOVERLAPPEDWINDOW Constant on Page 172
Added WM_REDRAW example to quickly update a listbox control (Example 10-4) – 32 and 64 bit compatible
Updated Data Type Conversions in Appendix A – Thank you
Added sound recording (Example 16-1) – 32 and 64 bit compatible
Added audio playback (Example 16-2) – 32 and 64 bit compatible
Added additional audio playback options (Example 16-3) – 32 bit only – Waiting for 64-bit Windows debugger
Added Video player (Example 16-4) – 32 and 64 bit compatible
Checked, changed, and confirmed all samples for 32-bit and 64-bit compatibility
Added Alias information in Chapter 1
Added WString MemoryByte example (Example 1-17) – 32 and 64 bit compatible
Added CString information (Example 1-10)
Added PString information (Example 1-11)
Changed Example1-13 screen grab
Rewrote Example 1-16 to be compatible on 32-bit and 64-bit systems
Changed Example 2-1 to use GetTickCount64 function
Rewrote Example 2-2 example – 32-bit and 64-bit compatible
Updated Example 2-3 from ANSI to Unicode
Updated Example 2-5 from ANSI to Unicode
Updated Example 2-7 from ANSI to Unicode
Changed Old Short Data type to Int16 in Example 2-8
Updated TargetWin32 to TargetWindows in Example 2-9
Added GetWindowLongPtr function for 64-bit compatibility in Example 3-1
Updated Example 3-2 from ANSI to Unicode
All code was tested and updated to Xojo 2017 r1 files
Update Example 4-1 from ANSI to Unicode and updated to MemoryBlock
Changed Example 4-3 from ANSI to Unicode
Updated Example 4-4 from ANSI to Unicode and is 32/64 bit compatible
Updated Example 4-6 code
Updated Example 4-8 code for 32-bit and 64-bit compatibility, and converted to be Unicode compatible
Updated Example 5-2
Updated Example 5-4 to Unicode
Updated Example 5-6 for 32-bit and 64-bit compatibility
Added SetWindowLongPtr for future 64-bit compatibility to Example 5-7
Convert Example 6-1 from ANSI to Unicode – 32-bit and 64-bit compatible
Convert Example 6-2 from ANSI to Unicode – 32-bit and 64-bit compatible
Convert Example 6-3 from ANSI to Unicode – 32-bit and 64-bit compatible
Convert Example 6-4 from ANSI to Unicode – 32-bit and 64-bit compatible
Convert Example 6-5 from ANSI to Unicode – 32-bit and 64-bit compatible
Convert Example 6-6 from ANSI to Unicode – 32-bit and 64-bit compatible
Convert Example 6-7 from ANSI to Unicode – 32-bit and 64-bit compatible
Convert Example 6-8 from ANSI to Unicode – 32-bit and 64-bit compatible
Convert Example 7-1 from ANSI to Unicode – 32-bit and 64-bit compatible
Convert Example 7-2 from ANSI to Unicode – 32-bit and 64-bit compatible
Convert Example 7-3 from ANSI to Unicode – 32-bit and 64-bit compatible
Convert Example 7-4 from ANSI to Unicode – 32-bit and 64-bit compatible
Convert Example 7-5 from ANSI to Unicode – 32-bit and 64-bit compatible
Convert Example 8-1 from ANSI to Unicode – 32-bit and 64-bit compatible
Convert Example 8-2 from ANSI to Unicode – 32-bit and 64-bit compatible
Convert Example 8-3 from ANSI to Unicode – 32-bit and 64-bit compatible
Convert Example 10-1 from ANSI to Unicode
Updated Example 10-2 from ANSI to Unicode
Updated Example 10-3 from ANSI to Unicode
Updated Example 13-1 from ANSI to Unicode
Updated Example 13-2 from ANSI to Unicode
Updated Example 13-3 from ANSI to Unicode
Convert Example 15-1 from ANSI to Unicode – 32-bit and 64-bit compatible
Created Audio Recorder Example 16-1 from ANSI to Unicode
Created Simple Audio Player Example 16-2 from ANSI to Unicode
Created Advanced Audio Player Example 16-3 from ANSI to Unicode
Created Video Player Example 16-4
Updated #If TargetWin32 to newer #If TargetWindows
Added more information on Structures in Chapter 1
Changed many examples with numeric conversions from CStr to.ToText

Play a Video (MPEG screen grab of video shown):

Play an Audio File with details:

ISBN: 978-1-927924-10-5

The ebook is a pdf formatted document and all examples include Xojo code. The Table of Contents can be downloaded at http://Scispec.ca under the heading books. This is one of the many available books at Xojo Library where many Xojo resources are available.

Got it. Impressive work Eugene. Wonder how you do it every time.

Thanks for the kind words. The examples usually come from my projects, and I probably use my own material the most :slight_smile:

Is there a similar book for macOS?

There is MacOS declare information at: iDelcare by Charles Yeomans, and it is starting to get outdated. The Xojo Forum is a good place to find MacOS Declares.

Unfortunately, I do not know of a MacOS declare book for Xojo.