Version 3.0 (Dec 2018) of the Windows API Declare Book has been released and it contains many added examples and updates.
The goals of this major update are:
Minimize the use of Aliases
Make all examples compatible with ANSI, Unicode, 32-bit, adn 64-bit computers. There were a few requests to support some old Windows XP machines.
Many functions were added to support the ANSI and new examples included in the book
Added the functions and methods to a module for easier portability across Windows Operating System platforms
Added many more constants
Added lots of structures
Finished adding more native Windows controls
Added many Target Windows conditional statements to prevent Windows specific code to run on other Operating Systems
All examples work in Xojo 2018 R3
Removed ByVal prefixes as this is the default setting
Cleaned up code to be easier understood
Added 30 new examples
Over 66 updates
Standardized the writing of declare methods
More API declares were added
All of the previous screen grabs showing ChooseColor, playing a video, and playing an audio file are also ANSI, Unicode, 32-bit, and 64-bit are supported.
The API Windows calendar control was added:
Controlling the native Windows API keyboard was added:
…and many other controls were added.
This is a new book that is over 900 pages with more than 140 example programs in 25 chapters. The low price of $14.99 has been set to make this book available for programmers to learn advanced API programming.
This is a PDF formatted document and all examples include Xojo code. The Table of Contents can be viewed at Http://scispec.ca
Added new CheckBox API example (Example 6-13) that is ANSI, Unicode, 32-bit and 64-bit compatible
PDF Bookmarks have been added to make topic browsing easier
Added LCID data type conversion in Appendix A
Added Example 25-1: On-Screen Keyboard, ANSI, Unicode, 32-bit, and 64-bit compatible
Added Example 25-2: Move On-Screen Keyboard, ANSI, Unicode, 32-bit, and 64-bit compatible
Added Example 23-5: PRINTER_INFO_2 with ANSI and Unicode DEV_MODE structures: Compatible with ANSI, Unicode, 32-bit, and 64-bit programs
Added Example 23-6: PRINTER_INFO_1 with compatibility for ANSI, Unicode, 32-bit, and 64-bit projects
Added Example 4-11: GetFileInfo, compatible with ANSI, Unicode, 32-bit and 64-bit projects
Added GetSysColorBrush for hbrBackground Window refresh (Example 6-12) that is compatible with ANSI, Unicode, 32-bit and 64-bit projects
Add a CheckBox API control (Example 6-13) that is compatible with ANSI, Unicode, 32-bit and 64-bit projects
Added Static control window class styles (Appendix AP) constants
Added the ability to show a static image (Example 6-14) that is compatible with ANSI, Unicode, 32-bit and 64-bit projects
Added Static control messages in Appendix AQ
Added ICC Control Class Constants (used in Example 6-15) shown in Appendix AR
Added Trackbar message constants shown in Appendix AS
Added month control style constants in Appendix AT
Added Calendar control message constants in Appendix AU
Added Calendar notification codes in Appendix AV
Added API calendar control (Example 6-16) that is compatible with ANSI, Unicode, 32-bit and 64-bit projects
Added snippet to populate a Structure from a memory address (Example 24-8)
Added GetMBFromAddress method (Example 24-9)
Added Tooltip control in Example 6-17 which is compatible with ANSI, Unicode, 32-bit and 64-bit projects
Added an UpDown control in Example 6-18 which is compatible with ANSI, Unicode, 32-bit and 64-bit projects
Added a GroupBox and Radio buttons example that is compatible with ANSI, Unicode, 32-bit and 64-bit projects (Example 6-19)
Added a ComboBox example which is ompatible with ANSI, Unicode, 32-bit and 64-bit projects (Example 6-20)
Added a Tab Control in Example 6-21 which is compatible with ANSI, Unicode, 32-bit and 64-bit projects
Added a Listbox Control in Example 6-22 which is compatible with ANSI, Unicode, 32-bit and 64-bit projects
Added a Bezier drawing example in Example 7-6 which is compatible with ANSI, Unicode, 32-bit and 64-bit projects
Added PointsArrayToMB in Example 24-11 which is compatible with ANSI, Unicode, 32-bit and 64-bit projects
Added TOKEN_PRIVILEGES structure, OpenProcessToken function, LUID_AND_ATTRIBUTES structure, LUID structure, LookupPrivilegeValue function, and AdjustTokenPrivileges function to Example 9-1 which are compatible with ANSI, Unicode, 32-bit and 64-bit projects
Updated Example 3-3: GetWindow, FindWindow, and GetWindowText functions for ANSI and Unicode
Updated Example 5-1: GetWindow, FindWindow, and GetWindowText functions for ANSI and Unicode
Updated Example 5-4: GetWindowText functions for ANSI and Unicode
MAX_PATH constant is 260 on ANSI and 520 with Unicode (Example 4-11)
Fixed grammatical and spelling mistakes
Updated Example 2-2 GetVersionInformation for ANSI, Unicode, 32-bit, and 64-bit compatibility, and added functionality.
Updated Example 2-3 to also be compatible with ANSI and Unicode for 32-bit and 64-bit systems.
Updated Example 2-5 for ANSI, Unicode, 32-bit, and 64-bit compatibility
Modified GetSysColor function (Example 2-6) for ANSI, Unicode, 32-bit, and 64-bit compatibility
Updated GetLocaleInfo (Example 2-7) for ANSI, Unicode, 32-bit, and 64-bit compatibility
Added SYSTEMTIME structure in Example 2-8 for GetLocalTime
Added compatibilility for ANSI and Unicode API calls for GetUserName (Example 2-9)
Added Wow64 compatiblity for Example 2-10 and the calls are now automatically peformed
Updated Example 3-2 to be compatible with both Unicode and ANSI GetModuleFileName API calls in 32-bit and 64-bit.
Updated Example 3-1 to be compatible with both Unicode and ANSI GetWindowLongPtr API calls in 32-bit and 64-bit.
GetWindowLong example 3-1 is not a preferred method for 64-bit executables
Updated GetDiskFreeSpace (Example 4-1) to be compatible with ANSI, Unicode, 32-bit, and 64-bit systems
Updated GetFileAttributes (Example 4-2) to be compatible with ANSI, Unicode, 32-bit, and 64-bit systems
Updated CreateDirectory, CreateFile, WriteFile, CloseHandle, and DeleteFile API calls (Example 4-3) to be compatible with ANSI, Unicode, 32-bit, and 64-bit systems
Updated CopyFile API calls (Example 4-4) to be compatible with ANSI, Unicode, 32-bit, and 64-bit systems
Changed Example 4-7 to use the proper UInt64 datatype
Updated SHQueryRecycleBin API calls (Example 4-8) to be compatible with ANSI, Unicode, 32-bit, and 64-bit systems. Added functional SHQueryRBInfo structure.
Updated GetVolumneInformation API calls (Example 4-9) to be compatible with ANSI, Unicode, 32-bit, and 64-bit systems. Added GetVolumeInfo structure, and GetVolumeInfo file flags.
Updated FindFirstFile and FindNextFile API calls (Example 4-10) to be compatible with ANSI, Unicode, 32-bit, and 64-bit systems. Modified StringWidth to be compatible with Xojo 2018 R3.
Corrected GetClassInfoExW and GetClassInfoExA structures, along with adding GetClassInfoEx_ClassStyle bit flag checking method for Example 5-3 which is compatible with ANSI, Unicode, 32-bit, and 64-bit systems. Also changed data display from a label to a TextArea control.
Updated SHQueryRecycleBin API calls (Example 4-8) to be compatible with ANSI, Unicode, 32-bit, and 64-bit systems. Added functional SHQueryRBInfo structure.
Updated GetForegroundWindow, GetWindowText, and GetWindowTextLength API calls (Example 5-4) to be compatible with ANSI, Unicode, 32-bit, and 64-bit systems.
Updated FlashWindow API call (Example 5-5) to be compatible with ANSI, Unicode, 32-bit, and 64-bit systems.
Updated GetKeyboardLayout API call (Example 5-6) to be compatible with ANSI, Unicode, 32-bit, and 64-bit systems.
Updated SetLayeredWindowAttributes and SetWindowLongPtr with SetWindowLong API calls (Example 5-7) to be compatible with ANSI, Unicode, 32-bit, and 64-bit systems.
Updated MoveWindow API call with proper data types in Example 5-8.
Updated Example 2-4 with Xojo GetSystemMetrics method with API call.
Many changes to create a Windows API simple window example (Example 6-1) to be compatible with ANSI, Unicode, 32-bit, and 64-bit systems.
Updated the common window example (Example 6-2) to be compatible with ANSI, Unicode, 32-bit, and 64-bit systems.
Updated the left-mouse-click example (Example 6-3) to be compatible with ANSI, Unicode, 32-bit, and 64-bit systems.
Updated Cursors (Example 6-4) with APIÂ’s for LoadCursor, SetCursor, Constants, and required updates to RegisterClassExA and RegisterClassExW that effects all other examples in Chapter 6. Now ANSI, Unicode, 32-bit, and 64-bit compatible.
Updated Menu creation (Example 6-5) with LoadCursor, Including a menu name, AppendMenu, SetMenu, and DestroyMenu API calls. Compatible with all Windows systems.
Updated Add Buttons Example 6-6 to be compatible with ANSI, Unicode, 32-bit, and 64-bit systems.
Updated Create a Label Example 6-7 with updated SetWindowText method. Compatible with ANSI, Unicode, 32-bit, and 64-bit systems.
Updated Create a TextBox Example 6-8 to be compatible with ANSI, Unicode, 32-bit, and 64-bit systems.
Updated APIMessageBox Example 6-9 to be compatible with ANSI, Unicode, 32-bit, and 64-bit systems.
Updated screen grab for Example 2-11.
Removed WString and CString from tagWNDCLASSEXA and tagWNDCLASSEXW to Ptr, which made window creation stable.
Updated drawing text to be compatible with ANSI, Unicode, 32-bit, and 64-bit systems in Example 7-1.
Updated drawing a line to be compatible with ANSI, Unicode, 32-bit, and 64-bit systems in Example 7-2.
Updated drawing a rectangle and ellipse to be compatible with ANSI, Unicode, 32-bit, and 64-bit systems in Example 7-3.
Updated drawing with pens to be compatible with ANSI, Unicode, 32-bit, and 64-bit systems in Example 7-4.
Updated drawing with a brush to be compatible with ANSI, Unicode, 32-bit, and 64-bit systems in Example 7-5.
Updated drawing with pictures be compatible with ANSI, Unicode, 32-bit, and 64-bit systems in Example 8-1.
Updated mask picture drawing to be compatible with ANSI, Unicode, 32-bit, and 64-bit systems in Example 8-2.
Updated drawing a mask at runtime with pictures be compatible with ANSI, Unicode, 32-bit, and 64-bit systems in Example 8-3.
Updated getting a Screen Grab to be compatible with ANSI, Unicode, 32-bit, and 64-bit systems in Example 8-4.
Updated Example 9-2 with a more-compatible SetSuspendState method.
Update code from Example 11-1 from legacy AbsolutePath to NativePath
Updated ShellExecute code from Example 13-1 to be compatible with both ANSI and Unicode on 32-bit and 64-bit systems.
Updated Example 14-1 with a new GetKeyState method and Declaration
Updated Example 14-2 with new GetAsyncKeyState Method and Declaration
Updated API colour picker to be compatible with ANSI, Unicode, 32-bit, and 64-bit systems in Example 15-1.
Updated mciSendString A and W functions for Example 16-1, 16-2, 16-3, 16-4 to be compatible with ANSI, Unicode, 32-bit, and 64-bit.
Updated QueryPerformanceCounter and QueryPerformanceFrequency with proper data types and made drag-and-drop methods for portability (Examples 17-1 and 17-2)
Updated CopyMemoryRead, CopyMemoryWrite, GetProcessHeap, HeapAlloc, and HeapFree with proper data types and made drag-and-drop methods for portability (Examples 18-1)
Updated API DisplayDevice to be compatible with ANSI, Unicode, 32-bit, and 64-bit systems in Example 19-1.
Created workaround for Rectangle structure incompatibility issue to be compatible with ANSI, Unicode, 32-bit, and 64-bit systems in Example 19-2.
Updated data types in Example 20-1
Updated Example 20-2 to be compatible with ANSI, Unicode, 32-bit, and 64-bit systems
Updated Example 10-1 to be compatible with ANSI, Unicode, 32-bit and 64-bit projects
Eugene, I don’t need this book right now, but it’s a very good idea, and I wanted to take this opportunity to congratulate you and thank you for all your work! I had bought your book on JSON and it was very clear, very effective. I noted to buy more books.
I often think of you when I work with MBS plugins. Christian does a fabulous job for the community, he is very reliable and has been for a long time. But the documentation of its plugins is often discouraging, while some are almost indispensable.
In short, I encourage you to study the idea of writing one or more books about these plugins, especially the most used ones. For example, a book on MBScurl or MBSdynaPDF would be excellent and would be very successful I think! Anyway, I’ll buy them immediately!
I gotta ask… is this update available for previous 2.x owners or do we need to buy the new version separately.
I just want to know if I should wait a bit longer for an email with the download link to the update or go straight ahead and buy the new one.
Thanks for the great book!
Thanks for letting me know about the link. I updated the book and forgot to update the link. Here is the updated link to the Table of Contents for Microsoft Word.