Drag-and-Drop onto Application Icon?

I have an MFC MDI app that registers a number of file types using 
RegisterShellFileTypes(). I've also called EnableShellOpen() and 
DragAcceptFiles(). If I launch the app and double-click a file registered to 
that app, the app opens the file as it should. If I drag a registered file 
onto the Main Frame window, it opens fine.

If the app has not yet been launched, dragging a file onto its icon launches 
it and opens the file, as expected.

However, if I drag a registered file onto the application icon or onto its 
shortcut when the app has already been launched, nothing happens. The app 
comes to the foreground, but the file does not open. As far as I can tell, I 
get no message to handle; no WM_DDE_EXECUTE, nothing.

Note also that left-clicking the file and selecting the app from the Open 
With list works fine, but right-click-dragging the file onto the app icon and 
selecting the Open With item does not.

Any idea what might be going on here?
nomad3715 (29)
5/17/2006 10:47:01 AM
vc.mfc 33608 articles. 0 followers. Follow

3 Replies

Similar Articles

[PageSpeed] 34

I have just tried that with my own app, everything works just fine. Do
you force single instance run only? If so, you will have to pass new
parameters  yourself.

Igor Green
Compare It! + Synchronize It! - files and folders comparison never was

grigsoft1 (42)
5/17/2006 10:55:50 AM
Thanks for the response. Yes, I do enforce single-instance run, and you're 
right, the system is trying to launch another instance of the app, which 
promptly quits. So, do you have a pointer to some suggestions as to how to 
redirect the DDE message? Should the new instance of the app do it as it 
dies, or is there some way to adjust the Registry to accommodate this?
nomad3715 (29)
5/17/2006 12:15:02 PM
Actually, I think I've figured it out. I'm just going to forward the command 
line information from the new instance (which is about to commit suicide) to 
the original instance. That should do it. If you have a better way, please 
let me know.

Otherwise, thanks!
nomad3715 (29)
5/17/2006 1:08:02 PM

Similar Artilces:

Drag and drop with CRichEditCtrl
I have an application that makes heavy use of the rich edit control. One of the things I needed to do was to customize text when it is pasted or dropped onto the rich edit control. This wasn't too hard to do: I have an object implementing IRichEditOleCallback attached to the rich edit, and in the QueryAcceptData() method I modify the data as needed before adding it to the control. My problem comes with drag and drop, specifically with the "move" drop operation. Following the MSDN documentation, my QueryAcceptData() method returns S_FALSE to indicate that it's processed the d...

Drop Down list with colours
Hi, Is there any way in Excel to create a drop down list which contains colours? For example to show RAG status (i.e. Red Amber Green). At the moment I can only show text in the drop down list. Would anyone know a way of working around this? Thanks. Thanks Roger, and Chip, for replying. I was playing around with it and found that I could conditionally format the cell depending on the text selected - so if I choose "RED" it goes red. It's just about enough to work for what I intend to use it for, but I'll experiment with your suggestion in case I need to develop thi...

Drag n' Drop emails to a Java application
Hi, We are developing a Java application where we want to import information received in e-mails. The email client are Outlook 2003 (at least for now). The best way would be to be able to drag the e-mail to the Java app and then access/parse the e-mail in the Java app. I have searched the web but can not find anything useful. Do I have to use COM and/or OLE for doing such operations? Please help me!! Best Regards Joacim ...

Drop-down data not appearing in exported XML
I'm exporting data as XML from an Excel spreadsheet. Cells with plain text in them work fine, but cells with a selection from a drop-down list do not. The XML file shows everything is there, except data from cells with drop-down selections. No error message generated, just no trace of the data. Any suggestions? thanks kc Fixed the problem. Found out that the drop-downs were actually objects placed on top of the cell, the options were not coded into the cells themselves. "Kristi" <kristi@NOSPAMinscriber.com> wrote in message news:MaCdnWD2xtF6CtveRVn-qQ@golden.net... > ...

Drop Downs and lookups from other sheets
I have a workbook where the front sheet is a display page and the three sheets behind are reserved for data tables. What I want to do is have one cell in the front page which is a drop down and selects names from one of the tables on the other sheets. From there I can use Vlookup to populate the info from the tables on the front page based on that name. The problem is I can't seem to get this list of names from another sheet. Every time I try, I get an error. How would I do this? thanks! Hi,. first insert a name for your list in the other sheet, go to insert, name, ...

Drop down list #8
I created a drop down list using the data, validation menu. It works well. However, I only have two items in the list and I am wondering if there is a better way to alternate between them. With the drop down list it takes a couple of clicks. First you select the cell, then you click to drop down the list, then you highlight the item, then you click on it. Is there a way to select the alternate item with fewer clicks? Don, You need only click the cell, click the dropdown button, then click the desired item. Three clicks. This event-fired sub will alternate between "Choice a&qu...

Pasting Onto Filtered Data
Excel should develop a paste special function that allows you to paste data onto filtered data without effecting hidden cells. At the very minimum, a warning that data is being pasted on hidden cells during a paste onto filtered data would be helpful. ---------------- This post is a suggestion for Microsoft, and Microsoft responds to the suggestions with the most votes. To vote for this suggestion, click the "I Agree" button in the message pane. If you do not see the button, follow this link to open the suggestion in the Microsoft Web-based Newsreader and then click "I ...

Accessing tables in MFC application
Hi, I have a MFC application built on VC++ 2005.There are a few data stored in the table format in the application. I do not have source code access of the application and is given to me as exe. I want to access the data stored in the table cells . How can i do it.Please help me with answers on how i can do it or with some tutorials I can look for. regards, jis Unless the program exports automation interfaces to allow access, I think it is reasonably safe to assume there is no solution to this problem. "Table format" says nothing useful. What does Spy++ say about the table? ...

dragging array UDFs
Hi I built an array function and it is working well. However when I dra it to other cel regions I got the message "VALUE". The exact formul and the code is below. Thanks for any help. Eduardo Exact formula: {=samLMR(B5:B20;0;0)} Code: x is a sorted array. Public Function samLMR(x As Variant, Optional a As Double = 0# Optional b As Double = 0#) As Variant Dim xmom() As Double Dim xm() As Double Dim sum(8) As Double Dim R As Integer Dim C As Integer Dim ReturnColumn As Boolean R = Selection.Rows.Count C = Selection.Columns.Count n = x.Count n = n - nfails If R < C Then nm...

My Drag Image Flickers
Hi guys, My drag image flickers, I understand the cause of this (I think) but I don't know how to fix it. I use this to auto-scroll during a drag and drop: // in OnTimer() m_pDragImage->DragShowNolock(FALSE); SendMessage(WM_VSCROLL,MAKEWPARAM(SB_LINEDOWN,0),NULL); m_pDragImage->DragShowNolock(TRUE); So since I'm hiding it, then showing it again, it flickers. Can I fix this ? Thanks, Robert A. ...

How to insert icon into control list
I'm going to list keys of a configuration file into a control list so it should have a column as icon. Since every key has an attribute (e.g. system key, non-system and ... ) so I like to insert an icon for each key in regard with its attribute. any comments on this? Regards, At first You can set ImageList to that ListView Ctrl.. then when you put some item into the list, you might use LVITEM struncture.. There is iImage member in that structure.. You can set what Image you wanna put.. depending on its attribute.. "JSmith" <jsmithmitra@yahoo.com> wrote in message ne...

how do I set up a header or a footer in the dropping down menu to.
I am trying to set up a footer that I can use throughout many workbooks, just not the sheets. Is there a way do this by setting it up as a predetermined footer or header in the drop down menu You can use a template for new workbooks and new sheets that includes the headers and footers you want. See Help for more information. But this will affect only new workbooks and worksheets, not existing ones. For them, you'll have to change each one manually. On Tue, 19 Oct 2004 12:03:05 -0700, Chrisanna <Chrisanna@discussions.microsoft.com> wrote: >I am trying to set up a footer that ...

Drag and Drop Emails
Version: 2008 Operating System: Mac OS X 10.5 (Leopard) Email Client: Exchange Within entourage, when I drag and drop an email from my inbox to another folder, it &quot;copy/pastes&quot; it instead of moving it permanently so it stays in the original location where I was trying to move it from. Seems the only way around this is to right click on the email and select &quot;Move to&quot; and then select a folder (but I have dozens of folders and this is not quick at all). <br><br>Is there a way to change my settings so when I drag and drop emails, it's a &am...

Test Application for Direct Show Filter
Dear Team, I builded simple direct show source filter, MySource.dll as a subproject and included in the OS image. My registry settings are as follows: [HKEY_CLASSES_ROOT\Filter\{CDD3577F-7141-4F5B-818C-EC82509E0776}] @="Custom Audio Filter" [HKEY_CLASSES_ROOT\CLSID\{CDD3577F-7141-4F5B-818C-EC82509E0776}] @="Custom Audio Filter" "Merit"=dword:00600000 [HKEY_CLASSES_ROOT\CLSID\{CDD3577F-7141-4F5B-818C- EC82509E0776}\InprocServer32] @="MySource.DLL" "ThreadingModel"="Both" I can see the setting using remote regis...

Integration of Projectserver 2007 with customized applications
-- Hi, different data of employees like payroll of employees in HRMS SYSTEM which is using MYSQL Database . in which salaries of employees ,increment , decrement,bonuses e.t.c are exist. and other system which using oracle databases also keep employees different info. now we want to do costing and budgeting in project professional 2007 with project server 2007. I want when i add employees from Active directory into project server 2007 then the information from these others systems also get in project server 2007. like increment , salary,decrement , bonuses and oth...

"Server Error in '/' Application" when adding a new Contact
Since applying roll 2 5 weeks ago, we started getting the error below when adding a new contact inside an existing customer. Can anybody help? the error is as follows: Server Error in '/' Application -------------------------------------------------------------------------------- The parameter is incorrect. Description: An unhandled exception occurred during the execution of the current web request. Please review the stack trace for more information about the error and where it originated in the code. Exception Details: System.ArgumentException: The parameter is incorrect. So...

Trying to drop MSCRMDistribution table
I'm trying to delete the CRM tables from SQL, but keep getting "Error 3724: Cannot drop the database because it is being used for replication.". I ran sp_removedbreplication against all of them, and I was able to delete the first three, but the MSCRMDistribution table is still there. The database icon in Enterprise Manager does not have a hand underneath, so I'm not sure why I'm getting this error. How can I drop this table? In case anyone is wondering why I'm doing this, I attempted to install CRM earlier this week, but things went astray with the IIS setti...

Drag Capabilities #2
Guys, I seem to have lost that little plus sign that appears in the right hand bottom corner of the cell that allows for dragging formatting and content onto other cells. Help in the this would be greatly appreciated. Regards, Subodh Help is available in Excel Help. Try the term "fill handle". -- David Biddulph <subodh.mallya@gmail.com> wrote in message news:02f26450-f3a3-4b84-a5f2-a80c1513dd14@v39g2000pro.googlegroups.com... > Guys, > > I seem to have lost that little plus sign that appears in the right > hand bottom corner of the cell that allows for draggin...

drag and drop
I am running Word 07 with Vista. I've lost my "drag and drop" function for moving text in my recent documents. I can select text, but when I click a second time to get the "dragging" arrow, nothing happens and I can't move the text. The option to enable this function under "Advanced" IS checked. I can still cut and paste. I am a freelance editor and have recently installed some templates with macros and add-ins, and I have attached one of them to my normal.dotx for regular use. However, I can't 100% for sure link the problem to that (timi...

Can Word print onto paper forms?
Programs like Pdfill and Form Pilot allow you to scan a paper form into a text editor, add text fields then print only the text field onto the original paper form. Can Word do this? Word has the ability to Print Data only for Forms so you could insert the scanned image behind the text and then insert FormFields in the relevant places. While it can be worth doing if the form is going to be re-used (saving it as a template), it is not really worth the trouble for a once off. -- Hope this helps. Please reply to the newsgroup unless you wish to avail yourself of my services...

How To Show Drag Image while Dragging Item?
I use MFC 4.2. There are 2 CListCtrls in my app. I am implementing a drag and drop function from one list to another. How to show the drag image when I still choose which item that will accept the drop? Thank you. You can use a CImageList and store a drag image. Look at functions like CImageList ::BeginDrag, CImageList::BeginDrag | CImageList::EndDrag | CImageList::DragMove | CImageList::DragLeave. -Seetharam This article may be interesting to you. It's a little older, but it is still useful information: http://www.codeguru.com/cpp/controls/listview/dragdrop...

Bizarre Appointment glitch -- Account icon appearing for Users, pre-save
Before saving the appointment, all Users input in the Required field have an Account icon next to it. After save, the correct icon is showing. A bizarre inconvenience, but has created some frustrating user experience, especially for users trying to understand the difference between users, contacts, and accounts. Have GroupCalendar resold by c360 installed, and we asked the developers in Austria about this, thinking it might be their end. They claim it's a CRM issue. CRM 3.0 w/ VC3 patch Outlook 2003 Thank you, Van Yang Chicago, IL ...

How can I specify my own image for Dialog Icons?
Hi Folks Trying to create few software diagrams and got stuck with as to how to extend Dialog Icons to include my own images? Also how can I extend toolbar buttons to have my own images? I see "Blank button" but could not figure as to how to ass my own image to it. TIA Nayan ...

views of icons with names
I'm new to OneNote. Not sure what to say just yet. Trying to like the program, think the potential certainly exists. I'm finding the page view to be less than ideal. I've created a page to hold all the various documents in a project: word, excel, and powerpoint at the moment. I don't care for the view, the way it shows all the documents on the page. The information doesn't mean much to me. The icons are huge, the words are small and few. Almost none of the titles of the documents can be seen unless I right click on them. Hence I can't tell much looking at...

Populating a drop down list (attempt # 2)
Hi, I have a drop down list (list of clients) that the user can select from. I have a second drop down list, where I want the servers that belong to the client that was selected from the first drop down list (above) to be displayed. The second drop down box uses the following SQL: SELECT tbl_Perm_ServerName.ServID, tbl_Perm_ServerName.Client, tbl_Perm_ServerName.ServName FROM tbl_Perm_ServerName WHERE (((tbl_Perm_ServerName.Client)=[forms]![frm_ServBackupNam]![cmb_Client])) ORDER BY tbl_Perm_ServerName.ServName; When I run this SQL, it show the clients in both dropdown lists - can any...