Ada Programming For Windows2000 Simple pleasure of my life - The Windcatcher Garden Windows XP Welome to my Ada Home Page. My name is Jeff Loh. Besides promoting the ease of use of Ada in Windows programming, this new web page is the result of the upgrade of my operating system from Windows 98 to Windows 2000 and the Aonix Ada compiler. Win4Ada code does not work in the new environment due to subtle differences between them. With the lessons learnt from Win4Ada, the new bindings have been written from scratch with various bugs and design flaws fixed. NOTES: Compiling all the source code blindly will result in compilation errors because of missing packages. These are not included because each of us has a favourite way of doing things. Substituting your own routines will not affect bindings. For example: 1. Various sorting algorithms. 2. LowercaseWideString -- converting to lower case equivalent. 3. awStrings -- acess type to Wide_String for dynamic handling. 4. Buffered_Input_Wide_Text_Line -- reading a line of characters from a file. Please email me if you really need them or need an explanation of what they do. As always, all comments are welcomed. Again I have to thank Stephen Leake for his Windex bindings which without the understanding of the underlying principles and the authors Rector & Newcomer for writing their book Win32 Programming, this binding would not be possible at all. 1. Dynamic Menus The main change is in redefining the menu definition fields. Some of the fields had become obsolete. Recent files handling, accelerators and adding menu items to the system menu are now supported. Icons and bitmaps are yet to be done as they do not contribute extra expressivity. Toolbars are used to achieve the same result. 2. ListBoxes and Combo Boxes Much of the internal coding has been changed but the functionality remained as before. Adding files, folders etc are now supported since Windows 2000 can handle long file names. This is for completeness sake. ShBrowseForFolder is more flexible. 3. Buttons Displaying an icon for push buttons (Owner draw) is now supported.. 4. Statusbars Icons can now be displayed in the statusbar parts and tooltips work as expected.. 5. Progressbars Vertical and smooth styles and setting of progress color are now supported. 6. Trackbars Tooltips (showing the current position of the thumb) are now supported. 7. ShBrowseForFolder Major changes are made due to the new features added in Windows 2000. As the create button is supported by the new system (using the new explorer style), most of the old code is now obsolete. Somehow the create new folder button could not be hidden using the no new folder button field in the browseinfo record. However this is easily solved by using the old style or an explicit call to hide the button. A more frustrating problem is that hidden items in the treeview would not scroll into view using arrow keys as there is no vertical scrollbar to do so. After much experimenting and by accident, resizing the main window would reset whatever internal workings to the correct value. Hence the call to the seemingly superfluous resize operation. Source Code Included in the Examples folder are illustrations on using modeless dialog boxes and tab controls (partial). At the same time there are higher level abstractions of some commonly used controls. For example, a dialog box containing an OK button and the hooks to extend the dialog box with more controls. Toolbars The Registry - 06 Feb 01 Animation Controls - 10 Feb 01 Hot Keys - 20 Feb 01 Header Controls - 05 Mar 02 Main Window Code Generator - 08 Aug 02, Updated 25 Jul 03 Up Down Controls - 22 Aug 02 Common Color Dialog Box - 14 Nov 02 NOTICE: As of 05 May 2004, Win2000 code is no longer maintained as I had moved over to WindowsXP. |
||||