This article is part of the drag and drop interface samples.
- Serializing ASCII Data
- Modeless child dialog
- Modeless sibling dialog
- The drag source
- The MFC drop target
- The TBTextTarget class
Download source files - 44 Kb
To create the modeless dialog as sibling, follow this link.
Follow these steps:
In the destructor of the parent window, proof if the dialog has been closed and release the memory:
- Create a new dialog resource and use the Class Wizard for making a new
CDialog based class for it; let's call it
- In your
CFormView-derived class, add a (private) member variable of type
CDropDialog* as a container for the modeless dialog class, let's call it m_pModeless. In the constructor of your view, make sure you initialize m_pModeless to NULL
- In your appropriate message handler, let's call it
OnModeless, do the following:
<FONT color=#000080>if</FONT> (m_pModeless)
<FONT color=#000080>if </FONT>(::IsWindow(m_pModeless->GetSafeHwnd()))
<FONT color=#000080>delete</FONT> m_pModeless;
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