last update

14-May-2008

Xeffort Extras

Customizable Toolbar

Hidden DOS

Radio Buttons

ListView Multi-Column Sorting

XExpression

OpenGL

Modeless Dialog App

Xeffort "Date Picker" Example

Date Utilities

XP-Style Controls

Keystroke Explorer

Xeffort Testimonial


Xeffort Extras by Mike Gaitens


This site presents some additions to Jugoslav Dujic's Xeffort Framework and Library.  

Xeffort Extras
I am pleased to announce that the utility routines in the XFTextra module have formally become part of Xeffort as of Release 23, and thus have been removed from this site.

User-Customized Toolbar
(added 14-May-08)

This example project features a dockable toolbar that can be completely customized by the program user.  The program user can:

  • invoke the Windows Customize Toolbar dialog either by double-clicking in an unused portion of the toolbar or by using a menu pick.
  • shift-drag buttons within or off of the toolbar.
  • save/restore the user's custom toolbar setup.
  • revert the toolbar to a programmer-defined default layout.
  • eliminate the toolbar.

The OnSize handler in this program demonstrates coexistence of a dockable toolbar, a status bar, and a view window.

The project also contains the system Standard, View, and History images as bitmaps.  Having these images now available as individual bitmaps allows you to see what they look like, modify them as you wish, and include only the ones of interest rather than the complete sets.

Download this rather well-commented project.



Run a DOS command in stealth mode
(added 14-May-08)

Like SYSTEMQQ, this function launches a single-line DOS command and waits for it to complete.  Typically, the given command line will invoke a batch (.BAT) file.  Unlike SYSTEMQQ, this function hides the command window and captures all output in a file without need for the DOS redirection operator.  [Development of this function required considerable trial-and-error; I don't claim to understand it all.]  Download the result.

 

Radio Buttons
(modified 24-Oct-07)

Download module Radio source and documentation to get single-line routines that get/set a group (or multiple groups) of auto-radio buttons.  These routines require that each set of radio buttons by properly grouped (in the resource editor) so it can be handled as a single entity.  See the documention for grouping instructions.

 

Multi-Column Sorting of ListView Control
(added 20-Oct-05)

Download MCXListView.f90 containing a new function MCLV_Sort that replaces (and was modeled after) XLV_OnColumnClick. Programmer instructions are included in the source code. User instructions follow:

Click the column header text of the column that is to be the primary sort key. The rows of the ListView table will be sorted such that this primary column is in ascending order. If you wish descending order, click the same column header again. If the contents of the primary column you chose are unique, i.e., each row contains a different value, then no further sorting applies.

However, you can further sort rows where the primary column contains duplicate values, by shift-clicking the header text of the column that is to serve as the secondary sort key.  [Shift-clicking means hold down a Shift or Ctrl keyboard key while you click the header text.] Then the rows will become sorted by the primary key and where the primary values are equal, by the secondary key in ascending order.  To specify descending order on the secondary key, shift-click the secondary header again.

To further sort rows where both primary and secondary column values are equal, you can shift-click another column to establish a tertiary sort key, etc.

The rules may be summarized as:

  • Re-clicking (or re-shift-clicking) the same column header toggles the ascending/descending sort direction for that column.
  • Shift-clicking a column header establishes an additional sort key that can be used to break any ties that remain after the previous sort keys have been applied.
  • Clicking a column header with neither a Shift nor Ctrl key depressed establishes a new primary sort column and erases the list of any previously established secondary sort columns.

After clicking column headers, small bitmaps will appear to indicate the columns chosen for sorting and the sort direction.

 

Modeless Dialog Application Template
(added 30-Apr-06)

Jugoslav's AppWizard will generate a Modal Dialog application that includes comments as to how to convert it to a modeless dialog.  If you wish to use a modeless dialog, you can save a little work by downloading this module, change its first line to the name assigned to the modal dialog, then use it to replace the modal dialog source file.


Xeffort and the "Date and Time Picker" Control
(added 2
1-Aug-05)

Here is a small example Xeffort project that uses a pair of "Date Picker" controls to establish a date range.  These controls are very versatile and were assigned the "show none" style which allows the user to signify "date immaterial" or "date unknown".  (If a user-supplied date were mandatory, you would clear this style and keep the variable named VALID .true.). 

Before a program can use a Date Picker control, the control class must be registered via InitCommonControlsEx (see routine CCLOAD).  This registration must be done once and done early, before any dialog using the control is loaded.  Communication with the Date Picker controls is done via straightforward XCtlSendMessage.

Download the sample project.

Date Utilities
(added 2
1-Aug-05)

Download a Fortran module containing routines that convert Gregorian dates to/from Julian (for easy date arithmetic) and routines to display dates and days per the user's locale settings.  These routines do not employ Xeffort.

For information about calendars of all types, visit John Walker's excellent Calendar Converter.

 

XP-Style Controls
(added
24-Sep-05)

Xeffort uses the ComCtl32.dll library to render controls, e.g., pushbuttons, check boxes, etc.  Microsoft ships Windows XP with two versions of this library -- Version 5 which renders the controls in "classic" style (rectangular pushbuttons, etc.) and Version 6 which renders controls in the new "XP-style" (pushbuttons have rounded corners, garish colors, etc.).  You can read the Microsoft documentation here

Version 5 is the default.  To render controls in XP-style, employ Version 6 by  downloading the file named "MyProg.exe.manifest".  This is a text file in XML format.

NOTE:  Wherever you see the text string "MyProg", replace it with the name of the program you are developing, i.e., the name of your .exe file.  Therefore, you change the filename of the file downloaded above (the ".exe.manifest" portion must remain), and you also change the 6th line in this file.  Once these changes are made, all you need do is distribute the resulting "YourProgam.exe.manifest" file along with "YourProgam.exe" file and insure both files are placed in the same directory.

As an alternative to distributing a separate file, you can incorporate the manifest within your program's resources.  Here is a crude but effective way of placing the manifest within your program.  In the downloaded zip containing the manifest, there is a small text file named "rcinc.txt".  Edit this file to replace the "MyProg" string with the name of your program.  Paste the edited file into your project's resource (.rc) file, placing near the Bitmap or Icon section of the resource file.  Then re-build your executable; this executable will be valid for all versions of Windows.  Controls will have the XP-style when your program is being run under Windows XP, and the classic style when it is run on the older versions of Windows.

 

Key Code Explorer
(added 17-Oct-05)

Download a small Xeffort application that displays the all the codes associated with a key press.  The zip contains both the executable and the CVF 6.6C project source.  

 

Xeffort Testimonial

I like Xeffort because it gives me most of the power of the Windows API without most of the hassle of the Windows API.  It makes available to the Fortran programmer sophisticated control windows such as the ListView, Toolbar, Statusbar, MDI, etc.  Without Xeffort, any of these would be a major pain to implement.  Xeffort beginners should visit Jugoslav Dujic's site and download Xeffort.   Jugoslav has structured Xeffort for three levels of users:  additional QuickWin features; a replacement for Visual Fortran's DFLOGM dialog management routines; and for full-featured Windows applications.  While Xeffort benefits all three levels, it really shines with Windows applications, which is our concentration.   To develop a Windows application, you start by running the Xeffort Application Wizard.  The Application Wizard produces a running prototype program that you then customize for your application.  

Learning full-featured Xeffort programming may appear daunting, but it's less than a tenth the effort required to learn the Microsoft API.  The Xeffort interface is wonderfully consistent.  All you need do is modify prototyped functions and create subroutines for callbacks.  

Try Xeffort; after you complete your first application with it, I believe you'll become a convert.




E-mail me

1