Click here to Skip to main content
13,000,164 members (59,614 online)
Click here to Skip to main content


106 bookmarked
Posted 16 Jun 2006

WTL for MFC Programmers, Part X - Implementing a Drag and Drop Source

, 16 Jun 2006
A tutorial on using drag and drop in your WTL application.
// MyDialogs.h: interface for the CMyDialogs class.

#if !defined(AFX_MYDIALOGS_H__F4B3974A_0B75_4825_9F76_D8A385C15D43__INCLUDED_)
#define AFX_MYDIALOGS_H__F4B3974A_0B75_4825_9F76_D8A385C15D43__INCLUDED_

#if _MSC_VER > 1000
#pragma once
#endif // _MSC_VER > 1000


class CMyFileDialog : public CFileDialogImpl<CMyFileDialog>
    // Construction
    CMyFileDialog ( BOOL bOpenFileDialog,
                    _U_STRINGorID szDefExt = 0U,
                    _U_STRINGorID szFileName = 0U, 
                    _U_STRINGorID szFilter = 0U,
                    HWND hwndParent = NULL );

    // Maps

    // Overrides
    void OnInitDone ( LPOFNOTIFY lpon );

    CString m_sDefExt, m_sFileName, m_sFilter;

    LPCTSTR PrepFilterString ( CString& sFilter );

#endif // !defined(AFX_MYDIALOGS_H__F4B3974A_0B75_4825_9F76_D8A385C15D43__INCLUDED_)

By viewing downloads associated with this article you agree to the Terms of Service and the article's licence.

If a file you wish to view isn't highlighted, and is a text file (not binary), please let us know and we'll add colourisation support for it.


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

Michael Dunn
Software Developer (Senior) VMware
United States United States
Michael lives in sunny Mountain View, California. He started programming with an Apple //e in 4th grade, graduated from UCLA with a math degree in 1994, and immediately landed a job as a QA engineer at Symantec, working on the Norton AntiVirus team. He pretty much taught himself Windows and MFC programming, and in 1999 he designed and coded a new interface for Norton AntiVirus 2000.
Mike has been a a developer at Napster and at his own lil' startup, Zabersoft, a development company he co-founded with offices in Los Angeles and Odense, Denmark. Mike is now a senior engineer at VMware.

He also enjoys his hobbies of playing pinball, bike riding, photography, and Domion on Friday nights (current favorite combo: Village + double Pirate Ship). He would get his own snooker table too if they weren't so darn big! He is also sad that he's forgotten the languages he's studied: French, Mandarin Chinese, and Japanese.

Mike was a VC MVP from 2005 to 2009.

You may also be interested in...

Permalink | Advertise | Privacy | Terms of Use | Mobile
Web02 | 2.8.170624.1 | Last Updated 16 Jun 2006
Article Copyright 2006 by Michael Dunn
Everything else Copyright © CodeProject, 1999-2017
Layout: fixed | fluid