WinDeclare300x198Xojo Windows Declare Version 2.3 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 r2.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 Julian Samphire 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.3 (September 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 20 chapters and contains over 500 pages with over 95 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 Screen Grab

 

 

 

 

 

 

 

 

 

 

 

 

 

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

  1. Added String values for Example 5-3
  2. Added Set application and windows icon: Example 6-11 – 32 and 64 bit compatible
  3. Added WS_OVERLAPPEDWINDOW constant on Page 173
  4. Added WS_TILEDWINDOW constant on Page 173
  5. Added WS_EX_PALETTEWINDOW constant on Page 172
  6. Added WS_EX_OVERLAPPEDWINDOW Constant on Page 172
  7. Added WM_REDRAW example to quickly update a listbox control (Example 10-4) – 32 and 64 bit compatible
  8. Updated Data Type Conversions in Appendix A – Thank you Julian Samphire
  9. Added sound recording (Example 16-1) – 32 and 64 bit compatible
  10. Added audio playback (Example 16-2) – 32 and 64 bit compatible
  11. Added additional audio playback options (Example 16-3) – 32 bit only – Waiting for 64-bit Windows debugger
  12. Added Video player (Example 16-4) – 32 and 64 bit compatible
  13. Checked, changed, and confirmed all samples for 32-bit and 64-bit compatibility
  14. Added Alias information in Chapter 1
  15. Added WString MemoryByte example (Example 1-17) – 32 and 64 bit compatible
  16. Added CString information (Example 1-10)
  17. Added PString information (Example 1-11)
  18. Changed Example1-13 screen grab
  19. Rewrote Example 1-16 to be compatible on 32-bit and 64-bit systems
  20. Changed Example 2-1 to use GetTickCount64 function
  21. Rewrote Example 2-2 example – 32-bit and 64-bit compatible
  22. Updated Example 2-3 from ANSI to Unicode
  23. Updated Example 2-5 from ANSI to Unicode
  24. Updated Example 2-7 from ANSI to Unicode
  25. Changed Old Short Data type to Int16 in Example 2-8
  26. Updated TargetWin32 to TargetWindows in Example 2-9
  27. Added GetWindowLongPtr function for 64-bit compatibility in Example 3-1
  28. Updated Example 3-2 from ANSI to Unicode
  29. All code was tested and updated to Xojo 2017 r1 files
  30. Update Example 4-1 from ANSI to Unicode and updated to MemoryBlock
  31. Changed Example 4-3 from ANSI to Unicode
  32. Updated Example 4-4 from ANSI to Unicode and is 32/64 bit compatible
  33. Updated Example 4-6 code
  34. Updated Example 4-8 code for 32-bit and 64-bit compatibility, and converted to be Unicode compatible
  35. Updated Example 5-2
  36. Updated Example 5-4 to Unicode
  37. Updated Example 5-6 for 32-bit and 64-bit compatibility
  38. Added SetWindowLongPtr for future 64-bit compatibility to Example 5-7
  39. Convert Example 6-1 from ANSI to Unicode – 32-bit and 64-bit compatible
  40. Convert Example 6-2 from ANSI to Unicode – 32-bit and 64-bit compatible
  41. Convert Example 6-3 from ANSI to Unicode – 32-bit and 64-bit compatible
  42. Convert Example 6-4 from ANSI to Unicode – 32-bit and 64-bit compatible
  43. Convert Example 6-5 from ANSI to Unicode – 32-bit and 64-bit compatible
  44. Convert Example 6-6 from ANSI to Unicode – 32-bit and 64-bit compatible
  45. Convert Example 6-7 from ANSI to Unicode – 32-bit and 64-bit compatible
  46. Convert Example 6-8 from ANSI to Unicode – 32-bit and 64-bit compatible
  47. Convert Example 7-1 from ANSI to Unicode – 32-bit and 64-bit compatible
  48. Convert Example 7-2 from ANSI to Unicode – 32-bit and 64-bit compatible
  49. Convert Example 7-3 from ANSI to Unicode – 32-bit and 64-bit compatible
  50. Convert Example 7-4 from ANSI to Unicode – 32-bit and 64-bit compatible
  51. Convert Example 7-5 from ANSI to Unicode – 32-bit and 64-bit compatible
  52. Convert Example 8-1 from ANSI to Unicode – 32-bit and 64-bit compatible
  53. Convert Example 8-2 from ANSI to Unicode – 32-bit and 64-bit compatible
  54. Convert Example 8-3 from ANSI to Unicode – 32-bit and 64-bit compatible
  55. Convert Example 10-1 from ANSI to Unicode
  56. Updated Example 10-2 from ANSI to Unicode
  57. Updated Example 10-3 from ANSI to Unicode
  58. Updated Example 13-1 from ANSI to Unicode
  59. Updated Example 13-2 from ANSI to Unicode
  60. Updated Example 13-3 from ANSI to Unicode
  61. Convert Example 15-1 from ANSI to Unicode – 32-bit and 64-bit compatible
  62. Created Audio Recorder Example 16-1 from ANSI to Unicode
  63. Created Simple Audio Player Example 16-2 from ANSI to Unicode
  64. Created Advanced Audio Player Example 16-3 from ANSI to Unicode
  65. Created Video Player Example 16-4 
  66. Updated #If TargetWin32 to newer #If TargetWindows
  67. Added more information on Structures in Chapter 1
  68. Changed many examples with numeric conversions from CStr to.ToText

 

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

Declare500 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

Play an Audio File with details:

16 3Audio

 

 

 

 

 

 

 

 

 

 

 

Added content to Version 2.2 (August 2017) are:

  1. Explanation of EX and Ptr suffix (Chapter 1)
  2. Added WOW64 definition (example 1-18), 32-bit and 64-bit compatible
  3. Added GetSystemInfo and GetNativeSystemInfo, 32-bit and 64-bit compatible (Example 2-10)
  4. Added LARGE_INTEGER data type (Appendix C)
  5. Added precision time the computer has been turned on (Example 17-1)
  6. Added precision delta time that could be used for graphics (Example 17-2)
  7. Updated RECT structure for 64-bit compatibility (Example 7-1)
  8. Update hDC conversion type to UInteger from Integer (getting negative values with Integer data type with PIXELFORMATDESCRIPTOR)
  9. Added Centre Screen Example (GetSystemMetrics and MoveWindow API) Example 5-8, 32-bit and 64-bit compatible
  10. Added Pointer and Operator code (Example 18-1) with is 32-bit and 64-bit compatible
  11. Edit and Add more Data type conversions in Appendix A
  12. Added more ByRef and ByVal information in Chapter 1 section
  13. Added INVALID_HANDLE_VALUE constant in Chapter 13
  14. Added file and subdirectory search Example 4-10, Unicode and 32-bit and 64-bit compatible
  15. Added many File contents in Appendix H

 

Added content to Version 2.3 (September 2017) are:

  1. Updated Example 6-11 SendMessageW call
  2. Updated Example 10-3 SendMessageW call
  3. Updated Example 10-4 SendMessageW call
  4. Added Struct ByRef for Pointer in ByRef and ByVal Section
  5. Added information on ANSI and Unicode (A and W Suffix) (use Unicode on all new programs)
  6. Added more conversion Data Types for TChar in Appendix A
  7. Added Comparison between Unicode Structure, Unicode MemoryBlock, ANSI Structure, and ANSI MemoryBlock code for the same declare (Example 1-19) – 32-bit and 64-bit compatible
  8. Created Multiple Display detail information in Example 19-1 – 32 bit and 64-bit compatible
  9. Created primary display working area size in Example 19-2 – 32 bit and 64 bit compatible
  10. Updated POINTAPI structure for multiple screen compatibility with Examples 7-2 through 7-5. (Integer to Int32)
  11. Added chapter on Monitors (32-bit and 64-bit Unicode compatible)
    1. Monitor Theory
    2. Multiple monitors
    3. Virtual Desktop and dimensions
    4. Monitor Number
    5. Total Monitor Screen Dimensions
    6. Working Monitor Screen Dimensions

The ebook is a pdf formatted document and all examples include Xojo code. Click to download the Table of Contents.

This is one of the many available books at Xojo Library where many Xojo resources are available.

ISBN: 978-1-927924-10-5