Click here to Skip to main content
Click here to Skip to main content

WinDiff (or WinMerge), the way you want it!

, 20 Jul 2006
Rate this:
Please Sign up or sign in to vote.
A shortcut menu extension (and drag drop menu extension) that makes it eaiser to use WinDiff.

Sample Image - wdcmx100.jpg


It is sad that I have to do this, but here we go anyway... this is not an advertisement or endorsement for WinDiff... so don't get your panties all up in a bunch and start harping on what you like or don't like about WinDiff. This project can be easily tweaked to work with any program that takes two paths as command line arguments. I just picked WinDiff because my boss uses it, it is free, and it worked the way I needed it to.


WDCMX is a derivative of CMDCMX, which I wrote way back in 1996. Everyone seems to like CMDCMX, so I figured I would share WDCMX too.

As a code example: WDCMX demonstrates an MFC based shell extension implementation. In addition, uses of GetShortFileName(), BrowseForFolder(), and GetOpenFileName() are included. A cool thing to check out is, how I use the BrowseForFolder callback to make the the tree control pre-select a directory.

As a utility: WDCMX allows you to select files (or folders) from within Explorer and pass them to WinDiff.

Using the Utility

Right-click on file and folder items from within Explorer, and select the 'WinDiff' menu item. The first item to compare is indicated by the item you right-clicked on. The second item is indicated by using the browse dialog presented to you after selecting the "WinDiff" menu item.

Using the Code

The current source archive provides a self-contained solution (WinDiffTool.sln) that includes four projects. From these four projects are built context menu handlers and dragdrop menu handlers that target WinDiff and WinMerge. Select either the Release or Debug targets, and build the solution. The deliverables are built into common "debug" and "release" directories off the base directory. You may want to change these outputs to the locations of the respective diff/merge tools for testing.

Look for GetShortFileName, BrowseForFolder, and GetOpenFileName in wdcmx_menu.cpp to see an example of how they are used.


  • Version 1.01

    Posted on July 18, 2006 - MFC is linked static... the MFC redistributables are no longer required.

  • Version 1.00 b

    Posted on September 28, 2004 - Includes the drag and drop component suggested by Jean-Francois Larvoire.

  • Version 1.00

    Posted on September 16, 2004.


This article has no explicit license attached to it but may contain usage terms in the article text or the download files themselves. If in doubt please contact the author via the discussion board below.

A list of licenses authors might use can be found here


About the Author

Shaun Harrington
Web Developer
United States United States
16yrs of GUI programming experience gained at: (most recent first) BlackBall, Veritas, Seagate Software, Arcada, Stac, Mountain, and Emerald Systems.
Languages/Scripting: C, C++, JAVA, BASIC, JAVASCRIPT, HTML, XML, PHP, and SQL
Tools: MS Visual Studio, MS Visual SourceSafe, CVS, PVCS, Bounds Checker, VMWare, ToDoList, InstallShield, and Office Applications
Libraries and API: RTL, STL, WIN32, MFC, ATL, .NET, ActiveX, DirectX, COM, DCOM, Shell Extensions, and Shell Namespaces
Strengths: Honest, communicative, keen eye for usability, good at estimating workload and completion dates, ready to take on grunt work, team player, experienced working with QA, localization, Tech Pubs, Sales, and Marketing teams.

Comments and Discussions

GeneralEnhancements Pinmemberlester espiritu22-Oct-08 7:52 
GeneralBrowseForFolder tip works great! Pinmemberholastefan25-Jul-06 18:34 
GeneralRe: BrowseForFolder tip works great! PinmemberShaun Harrington26-Jul-06 1:12 
JokeWinPORN PinmemberJeremy L-T24-Jul-06 22:52 
GeneralRe: WinPORN PinmemberShaun Harrington25-Jul-06 4:14 
GeneralDragDrop implement for CPropertyPage Pinmembercpp_prgmer21-Feb-06 2:02 
GeneralSend To PinmemberzPilott2-Sep-05 19:20 
GeneralRe: Send To PinsussAnonymous6-Sep-05 6:40 
GeneralRe: Send To PinmemberzPilott6-Sep-05 8:04 
Generalthanks Pinmemberackka29-Sep-04 6:21 
GeneralRe: thanks PinmemberShaun Harrington29-Sep-04 7:30 
GeneralWindiff! PinmemberTVman28-Sep-04 23:31 
GeneralRe: Windiff! PinmemberShaun Harrington29-Sep-04 7:29 
GeneralDrag Drop Handler... PinmemberShaun Harrington28-Sep-04 17:30 
GeneralRe: Drag Drop Handler... Pinmemberhiforce12-Nov-04 3:47 
GeneralRe: Drag Drop Handler... PinmemberShaun Harrington15-Nov-04 4:49 
GeneralBeyond Compare PinsussAnonymous17-Sep-04 0:30 
GeneralRe: Beyond Compare PinmemberShaun Harrington17-Sep-04 6:23 
GeneralRe: Beyond Compare PinsussAnonymous20-Sep-04 0:52 
GeneralRe: Beyond Compare PinmemberShaun Harrington20-Sep-04 6:37 
GeneralRe: Beyond Compare PinmemberShaun Harrington23-Sep-04 10:37 
GeneralRe: Beyond Compare PinsussAnonymous26-Sep-04 23:44 
GeneralRe: Beyond Compare PinmemberShaun Harrington27-Sep-04 6:18 
GeneralWinMerge PinsussAnonymous16-Sep-04 21:41 
GeneralRe: WinMerge PinmemberShaun Harrington17-Sep-04 6:13 
GeneralRe: WinMerge PinmemberShaun Harrington17-Sep-04 6:27 
GeneralRe: WinMerge Pinmemberthorek17-Sep-04 8:47 
GeneralRe: WinMerge PinmemberShaun Harrington17-Sep-04 10:57 
GeneralRe: WinMerge Pinmemberthorek17-Sep-04 11:27 
GeneralRe: WinMerge PinmemberShaun Harrington17-Sep-04 12:03 
GeneralCool off PinmemberPhilippe Lhoste22-Sep-04 1:38 
GeneralRe: Cool off PinmemberShaun Harrington22-Sep-04 9:18 
GeneralRe: WinMerge Pinmembermikeorama1234512-Oct-04 4:23 
GeneralRe: WinMerge PinmemberShaun Harrington12-Oct-04 12:28 
GeneralRe: WinMerge Pinmemberandrew.truckle@atkinsglobal.com29-Sep-04 1:13 
GeneralRe: WinMerge PinmemberShaun Harrington17-Sep-04 6:37 
GeneralRe: WinMerge PinmemberShaun Harrington22-Sep-04 10:15 
GeneralRe: WinMerge PinmemberShaun Harrington29-Sep-04 7:40 
Generalpath PinmemberDieter Hammer16-Sep-04 21:19 
GeneralRe: path PinmemberShaun Harrington17-Sep-04 5:53 
GeneralRe: path PinmemberSture Svangstolpe27-Sep-04 22:37 
GeneralRe: path PinmemberShaun Harrington28-Sep-04 6:30 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.

| Advertise | Privacy | Terms of Use | Mobile
Web01 | 2.8.150327.1 | Last Updated 20 Jul 2006
Article Copyright 2004 by Shaun Harrington
Everything else Copyright © CodeProject, 1999-2015
Layout: fixed | fluid