A better front end to WinDiff


Building the Right Environment to Support AI, Machine Learning and Deep Learning

Run windiff screenshot

Environment: VC5.0 SP3, VC6.0, Win95, NT4

If you have ever used WinDiff you will be aware of how poor the user interface for specifying the files or directories is. To this end I developed a simple application that acts as a front end to WinDiff and allows you to drag and drop files or directories, or browse for files and directories using the file and directory chooser dialogs.

The program also remembers it's last screen location, the files last compared and the whether or not the dialog was expanded or contracted. The sample demonstrates collapsable dialogs, window position persistance, and also demonstrates a variation of Chris Losinger's great CDropEdit class (in this case a drop-file combobox).

New features

  • Extensive use has been made of Davide Calibro's flat buttons, thanks to Daniel Lyons who felt my original UI was a bit boring and gave it a major facelift. Thanks Daniel!
  • The combo's accept dropped files (previously used drop edit controls) and are auto-completing. They store the last 10 files entered and the drop width is modified each time a file is added in order to display as much as possible.
  • Directory pickers start from the last directory visited.
  • My ComboBoxEx class has been renamed - hopefully this will fix the VC6 compilation problem.

Thanks to:

  • Chris Losinger - Drop Edit
  • Vladimir Kvashin, Girish Bharadwaj and Lars Klose - Directory picker class
  • Davide Calibro - Flat buttons
  • Daniel Lyons - UI work and a new approach to collapsable dialogs.
  • Klaus - suggested setting the initial directory of the directory pickers. No idea why I didn't do that in the first place!

Download executable - 20 KB

Download source - 41 KB

Last Updated: November 10, 1998


  • Use "FindStringExact" instead of "FindString"

    Posted by Legacy on 02/18/2004 12:00am

    Originally posted by: Henry

    I also thought that I was having trouble with long file names with spaces in it. However my problem was that the
    check for duplicate routine uses "FindString" instead of
    "FindStringExact". I was getting false duplicates, so some
    of my directory selections were disapppearing. When I
    changed to "FindStringExact", the problem disappeared

  • problem with windiff and long file names

    Posted by Legacy on 11/01/2002 12:00am

    Originally posted by: paul driscoll

    one problem I have found is that windiff does not like having directory compares if the directory names contain spaces in it !

  • Am I missing something?

    Posted by Legacy on 07/26/2002 12:00am

    Originally posted by: Billy VonRUple

    The "compare files" button does not invoke a "directory compare" when directories have been selected, and there does not appear to be a "compare directories" button.

    Am I missing something?

    Maybe my version of WinDiff is too old...

  • Easy to install and use

    Posted by Legacy on 01/11/2002 12:00am

    Originally posted by: David Manz

    Nice work, this makes using WinDiff much better.

  • Windiff UI

    Posted by Legacy on 11/08/2001 12:00am

    Originally posted by: Anand Hariharan

    I used the directory picker class from this project and am thankful to the people responsible for it. Its an amazing class.


  • Windiff

    Posted by Legacy on 01/23/2001 12:00am

    Originally posted by: Lew Mullen

    The filename field is too short;
    it isn't even long enough
    for the example on the web page.

  • Very inventive!!!

    Posted by Legacy on 02/28/2000 12:00am

    Originally posted by: Duc Truong

    I love it when you can change a program's UI when you don't have the source code. I did it once a long time ago with a Vietnamese DOS text editor that didn't allow user to hilite item in their menu of about 20 item. It was written by the Vietnamese Professional Society for their members to use only. I got a free copy for attending one of their monthly meeting. I liked the program but didn't like the UI part of the menu, so I decided to add more functionalities to their menu.

    What I did is to intercept the keyboard service routine before spawning the text editor. In my new keyboard ISR, I first check the the key user has typed in. If it's not F1, I simply call the original keyboard ISR and return. But if it's F1 which is the key to get help menu, I will own the menu since I don't return from ISR. Note that the only place I can change the text editor's UI is from within the new keyboard ISR. In this new ISR, If user hit any of the arrow key I would hilite the appropriate item. And when the user presses return to select the item, I swap that return's ASCII code with the ASCII of ESC and return from the interrupt. This fake ESC key returns control to the text editor and make it believe that the user just hit ESC to get out of the menu.

    The tricky part is to execute the command the user just selected since I don't have control of the program no more when I'm out of the new keyboard ISR. It took me a while to realize that there's another interrupt service routine that would help me gain control of the program again. That is the timer interrupt service. After use hit enter to select an item on menu I would store the ASCII code of the command in an identifier and set flag before returning. And in my new timer ISR, I constantly check for this flag. If it's set, I will reset the flag but will not execute the command right away since the editor need some time to redraw the screen. Instead, I skip a couple of timer interrupts to allow time for the editor to go back into keyboard polling mode again. After this idle time, in the next timer interrupt, I will squeeze the ASCII code to the keyboard buffer and then calls the original keyboard interrupt. This is the original keyboard interrupt which is now more like a function because I've intercepted it at the beginning of the program before spawing the text editor. However, this "so-called" function will still look into the keyboard buffer and sees the ASCII of the command and hand it to the text editor. And that's it, once again the text editor was fooled into thinking user has selected that specific command and it would execute it. I've been using that text editor for about ten years now to type in my favorite poems.

    I just touched your Windiff UI a little to have it spawn a MP3 Player at the request of my uncle who's too lazy to open the file from the MP3 Player's menu. It works fine.

    Once again, the Windiff UI is both stylist and useful.

    Thanks for the hard work!

    Duc Truong

  • Hmmm...

    Posted by Legacy on 04/21/1999 12:00am

    Originally posted by: mihai

    If you call CreateSempahore in InitInstance, the result will be: first instance, no problem, for second instance, the CreateS... will return Semaphore already exsist.
    That's is the best way.
    Sincerely, Mihai

  • Great Piece of Work

    Posted by Legacy on 12/06/1998 12:00am

    Originally posted by: M.A.Tanveer

    This has really come in handy for me in my day to day development activities, what with ten people in my team.
    Thanks to all those involved and requesting them for more such Goodies,

  • WinDiff ActiveX control

    Posted by Legacy on 11/13/1998 12:00am

    Originally posted by: Ryan Schneider

    When poking around in my ActiveX stuff, I noticed a WinDiff control. Didn't really look into it much, but there might be something there for you if you're planning on updating this article.

    Just thought I'd mention it..


  • You must have javascript enabled in order to post comments.

Leave a Comment
  • Your email address will not be published. All fields are required.

Most Popular Programming Stories

More for Developers

RSS Feeds

Thanks for your registration, follow us on our social networks to keep up-to-date