Click here to Skip to main content
Licence 
First Posted 16 Sep 2004
Views 144,069
Bookmarked 47 times

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

By | 20 Jul 2006 | Article
A shortcut menu extension (and drag drop menu extension) that makes it eaiser to use WinDiff.

Sample Image - wdcmx100.jpg

Preface

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.

Introduction

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.

History

  • 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.

License

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

Member

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.


Sign Up to vote   Poor Excellent
Add a reason or comment to your vote: x
Votes of 3 or less require a comment

Comments and Discussions

 
You must Sign In to use this message board. (secure sign-in)
 
Search this forum  
 FAQ
    Noise  Layout  Per page   
  Refresh
GeneralEnhancements Pinmemberlester espiritu6:52 22 Oct '08  
GeneralBrowseForFolder tip works great! Pinmemberholastefan17:34 25 Jul '06  
GeneralRe: BrowseForFolder tip works great! PinmemberShaun Harrington0:12 26 Jul '06  
JokeWinPORN PinmemberJeremy L-T21:52 24 Jul '06  
GeneralRe: WinPORN PinmemberShaun Harrington3:14 25 Jul '06  
GeneralDragDrop implement for CPropertyPage Pinmembercpp_prgmer1:02 21 Feb '06  
Hi,
 
I am sorry if I am submitting a query at the wrong place. I need to implement dragdrop in my CPropertyPage, for which i have added this->DragAcceptFiles(TRUE); in the sheet.
Now it does accept dragged files.
 
Now I need to read the dropped files for which I am struggling to recieve the event.
I have added the OnDropFiles(HDROP hDropInfo) virtual function to both CPropertySheet as well as CPropertyPage but neither of the functions are being called.
 
Am I on the right track? Where does the function need to be called? Why does it not work in my case? Could someone guide me on how to implement dragdrop for CWnd, if the above method is wrong, else explain me the call mechanism. Cry | :((
GeneralSend To PinmemberzPilott18:20 2 Sep '05  
GeneralRe: Send To PinsussAnonymous5:40 6 Sep '05  
GeneralRe: Send To PinmemberzPilott7:04 6 Sep '05  
Generalthanks Pinmemberackka5:21 29 Sep '04  
GeneralRe: thanks PinmemberShaun Harrington6:30 29 Sep '04  
GeneralWindiff! PinmemberTVman22:31 28 Sep '04  
GeneralRe: Windiff! PinmemberShaun Harrington6:29 29 Sep '04  
GeneralDrag Drop Handler... PinmemberShaun Harrington16:30 28 Sep '04  
GeneralRe: Drag Drop Handler... Pinmemberhiforce2:47 12 Nov '04  
GeneralRe: Drag Drop Handler... PinmemberShaun Harrington3:49 15 Nov '04  
GeneralBeyond Compare PinsussAnonymous23:30 16 Sep '04  
GeneralRe: Beyond Compare PinmemberShaun Harrington5:23 17 Sep '04  
GeneralRe: Beyond Compare PinsussAnonymous23:52 19 Sep '04  
GeneralRe: Beyond Compare PinmemberShaun Harrington5:37 20 Sep '04  
GeneralRe: Beyond Compare PinmemberShaun Harrington9:37 23 Sep '04  
GeneralRe: Beyond Compare PinsussAnonymous22:44 26 Sep '04  
GeneralRe: Beyond Compare PinmemberShaun Harrington5:18 27 Sep '04  
GeneralWinMerge PinsussAnonymous20:41 16 Sep '04  
GeneralRe: WinMerge PinmemberShaun Harrington5:13 17 Sep '04  

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.

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