No items are imported when you select items in different directories in Windows Photo Gallery on a computer that is running Windows Vista

No items are imported when you select items in different directories in Windows Photo Gallery on a computer that is running Windows Vista

Article ID : 934546
Last Review : March 25, 2008
Revision : 1.0

SYMPTOMS

Consider the following scenario. On a computer that is running Windows Vista, you create an application that uses the Open With functionality in Windows Photo Gallery. The program uses the IDropTarget interface to import the selection. When you select items in different directories, no items are imported.

If you select a single item, this behavior does not occur. If you select multiple items, the application cannot open the images in one instance of the application.

Back to the top

CAUSE

This behavior occurs because the IDropTarget implementation does not work correctly if you select items in multiple directories. Instead of importing all the selected items into the target application, Windows Photo Gallery tries to load a new instance of the application for each item in the selection. Windows Photo Gallery passes the path of the item as a command-line argument. This behavior causes problems in Windows Photo Gallery. In the Windows Photo Gallery user interface, you do not have to know where the files are stored. Images from different directories are shown side-by-side in the window. If you try to write multidocument applications that integrate together with Photo Gallery’s Open With functionality, you experience this behavior.

Back to the top

RESOLUTION

To implement the Open With functionality in Windows Photo Gallery, use the shell’s Dynamic Data Exchange (DDE) interface. When the application uses the DDE interface, the application can import items from different directories into a single instance of the application. Additionally, to improve DDE performance, the application should include the Window’s class name as part of the DDE registration.

Back to the top

MORE INFORMATION

For more information about DDE, visit the following Microsoft Web sites:

http://msdn2.microsoft.com/en-us/library/ms648711.aspx (http://msdn2.microsoft.com/en-us/library/ms648711.aspx)
http://msdn2.microsoft.com/en-us/library/ms648770(VS.85).aspx (http://msdn2.microsoft.com/en-us/library/ms648770(VS.85).aspx)

Back to the top


APPLIES TO
• Windows Vista Ultimate
• Windows Vista Business
• Windows Vista Business N
• Windows Vista Enterprise
• Windows Vista Home Basic
• Windows Vista Home Basic N
• Windows Vista Home Premium
• Windows Vista Starter

Back to the top

Keywords: 
kbtshoot kbexpertiseadvanced kbprb KB934546

Back to the top

 

Microsoft Knowledge Base Article

This article contents is Microsoft Copyrighted material.
Microsoft Corporation. All rights reserved. Terms of Use | Trademarks


You can follow any responses to this entry through the RSS 2.0 feed. You can leave a response, or trackback from your own site.

AddThis Social Bookmark Button

Leave a Reply

*
To prove that you're not a bot, enter this code
Anti-Spam Image