
i
i
i
i
i
i
i
i
400 15. Using Multimedia in VR
mentation. Because it is nicely self-contained, the facility can be added to any
Windows application with little difficulty. We won’t go into great detail, since
it takes us away from our main theme, but Listings 15.4 and 15.5 present a
C++ class and its methods to implement drag and drop. If you put this code
into a separate file, you can include it with all your programs and make use of
it by adding the code from Listing 15.6 in the appropriate places.
STDMETHODIMP CDropTarget::QueryInterface(REFIID riid, void
**
ppv){
if(ppv == NULL)return E_POINTER;
if(riid == IID_IDropTarget || riid == IID_IUnknown) {
AddRef(); ...