rushtheweb
asked on
HDROP issue
Hi,
I currently have some code triggered on the DrawClipboard event that looks for copied files in the clipboard format of HDROP, the code works great except for one problem; when my app is running and I copy a file in a folder using CTRL+C the code is triggered and then when I close the folder window because Im done copying my code is triggered again causing a duplicate copy. My question is, does closing a window after a copy usually trigger a DrawClipboard event? I didnt include any code but can if you think its a problem with my code. This is driving me crazy because I have no idea how to stop the duplicate entries.
I currently have some code triggered on the DrawClipboard event that looks for copied files in the clipboard format of HDROP, the code works great except for one problem; when my app is running and I copy a file in a folder using CTRL+C the code is triggered and then when I close the folder window because Im done copying my code is triggered again causing a duplicate copy. My question is, does closing a window after a copy usually trigger a DrawClipboard event? I didnt include any code but can if you think its a problem with my code. This is driving me crazy because I have no idea how to stop the duplicate entries.
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Also Each CWnd object that receives an OnChangeCbChain call should use the SendMessage Windows function to send the WM_CHANGECBCHAIN message to the
next window in the Clipboard-viewer chain (the handle returned by SetClipboardViewer). If hWndRemove is the next window in the chain, the window specified by hWndAfter becomes the next window, and Clipboard messages are passed on to it. Look at ChangeClipboardChain() and SetClipboardViewer().
MAHESH