Drag and drop with delayed rendering

Environment: Win2003, VS.NET 2003, unmanaged VC++

Hello,
I'm trying to implement drag and drop feature into my client application.
This application shows a ListView control, where the various items represent
file which are located on a remote server. To be copied outside the client
area they first need to be retieved from the server on a self-developed
channel. That's because I need to employ delayed rendering.
Here is what I do:
I catch the win message with OnBeginDrag when the operation starts. Inside
OnBeginDrag I instantiate an object derived from COleDataSource where I
override OnRenderGlobalData. Then I call DelayRenderData specifying global
memory as clipboard format and DoDragDrop. Into the overridden method
OnRenderGlobalData I retrieve the files I need and I prepare the necessary
memory structure. Until here everything is ok.
The problem is that when I drag an object for example on the desktop the
method OnRenderGlobalData is repeatedly called 3 timed and when I drop it is
called 7 times. Instead, I would expect to have it called just once when I
drop the object on a valid target.

Do you have any idea about why this OnRenderGlobalData is called many times,
and always with the same FORMATETC paramenter?


Thanks in advance

-- 
Fritz



0
fritz8203 (1)
11/16/2004 6:03:44 PM
vc.mfc 33608 articles. 0 followers. Follow

0 Replies
544 Views

Similar Articles

[PageSpeed] 18

Reply:

Similar Artilces:

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 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...

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 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 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 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...

Delay commit on a bound form?
Typically when you first enter data in any bound control on a bound form, a new record is created; is there any way for me to delay this process, for instance until a button is pressed? I don't want to use any funky undo magic. Thanks! robert.waters wrote: > Typically when you first enter data in any bound control on a bound > form, a new record is created; is there any way for me to delay this > process, for instance until a button is pressed? I don't want to use > any funky undo magic. > > Thanks! Correction. A new record is "started". It won't...

Outlook displays delayed email
Hi all, I've been trying to find a solution to this problem for the past few weeks. Hope you guys could help me. I'm using Microsoft Outlook 2003 and have an IMAP account. The total size of all emails is ~580MB. This is the problem: When someone sends an email, the email is received on the email server. Outlook takes a few hours to display emails (despite clicking on Sending/Receiving button several times). However web mail displays it immediately. Yesterday, the latest email for the past 2 weeks have suddenly disappeared but the old emails are still there. Emails are still on the s...

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. ...

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...

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...

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 ...

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 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...

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...

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...

Deploy a DDL trigger to prevent dropping tables for mulitple datab
The SQL 2005 server I am using has mulitple databases. The database MyDB is one of them. I make a DDL trigger to prevent deleting columns in tables in MyDB. Here is the script to make the trigger: CREATE TRIGGER Safety ON DATABASE FOR ALTER_TABLE AS RAISERROR ('Table schema cannot be modified in database. You must disable Trigger "Safety" to drop or alter tables!', 16, 1); ROLLBACK ; The trigger works well for MyDB. Whenever deleting a column in a table inside MyDB, the transaction is not allowed. Now, I want to set up the same trigger not only mon...

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...

Visio drags...
After you Draw text box(or any other draw etc tool), you HAVE to click pointer tool if I want to select an arrow(or anything else, or drag multiple objects for that matter). Else it wants to draw more textboxes. after drawing a Text box If, I click on that same text box or another arrow, it should understand that I want to simply SELECT that thing. Left clicking on an existing textbox(and other things) makes it go in edit mode.(different from Publisher and other s/w, where it goes in edit mode AND shows a drag/resize box) So to drag resize in Visio, I have to right click it, press Escap...

Cannot drag a shape
Hello, I'm using Visio 2003. I cannot drag a shape from the shapes Windows unto the drawing. However I can copy and paste it there. But once it's there, I can only resize it but not drag it anywhere. Any ideas? Seems like there is a protection or shape lock somewhere. I've been through all the menus and couldn't figure it out. Thanks in advance. On Tue, 13 May 2008 13:57:02 -0700, Ju-Man <JuMan@discussions.microsoft.com> wrote: >Hello, >I'm using Visio 2003. I cannot drag a shape from the shapes Windows unto the >drawing. However I can copy and paste i...

Drop dow list complication
In cell A1 I have a drop down list with 15 options. I have 15 seperate named lists which correspond to the options in the first list. In cell B1, I want another dropdown list which corresponds to the option chosen in A1. Using nested if statements in the B1 "list source" window, I can only get up to 7 corresponding lists. I tried using a vlookup, but the value is not recognized as a Name, therefore it is invalid as a list source. Is there any way around this? This might help http://www.contextures.com/xlDataVal02.html Regards, peo Sjoblom "Ryan" wrote: > I...

Drag and Drop from 2007 Excel and Word File Open and File Save win
One one of our Windows XP SPK3 computers were running Office 2007. When ever your using Word or Excel and you use either the File Open or File Save commands and the Windowed Dialog Box appears with your file and folder listings it will not let you move or drag and drop a file from one location to another. Lets say you have 3 Sub Folders in My Documents ( Folder 1, Folder 2 and Folder 3 each containing files.) You notice while in the File / Open or File / Save Dialog Box window that their are several files which currently reside in the My Documents folder but should be in say ...

strange issue with drag and drop target window
hi there i am implementing drag n drop in my app using the COleDataSource/ COleDropSource/COleDropTarget classes everything is going well, but there is one strange thing going on one of my target windows is a plain ole CWnd-derived window, which has some child buttons created on it dynamically - i register a COleDropTarget object for the CWnd-derived parent window, but *not* for any of the child button windows when i try to drag onto this window, the COleDropTarget instance that was registered for the window only gets its OnDragEnter/OnDragOver/ OnDragLeave/OnDrop methods called when the m...

How to drag data in cells without dragging the formats
As I wrote in the subject box, how can I just drag the data without changing the borders and formats etc. in the original and destination cells? I know the hold down the control button trick, but for the people that don't even want to do that, is there a way to drag and drop the normal way? Teach then to rightclick on the autofill button and drag. When they let go, they'll see a bunch of options. (and someday, they may want a different one!) David P. wrote: > > As I wrote in the subject box, how can I just drag the data without changing > the borders and formats etc. i...

Dragging Across
I am trying to drag information across a row but skip a column inbetween. for example my data is in columns A1,B1,C1,D1, E1 and i want to be able to put my cursor on a random cell in row 1 and have it bring back cell A1, then a blank cell, then cell B1, then another blank cell, then C1 and a blank, and so on. Everytime I do it, I get A1, then blank then C1, then blank, then E1...and i cant figure it out!! -Yasmeen If you're also starting in column A, then this formula will work: =IF(MOD(COLUMN(),2)=0,"",INDEX(1:1,(COLUMN()+1)/2)) Bob Umlas Excel MVP "Yasmeen" &...