Link to home
Start Free TrialLog in
Avatar of rushtheweb
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.
Avatar of mahesh1402
mahesh1402
Flag of India image

Each window that receives an OnDrawClipboard call should call the SendMessage Windows function to pass a WM_DRAWCLIPBOARD message on to the next window in the Clipboard-viewer chain. The handle of the next window is returned by the SetClipboardViewer member function; it may be modified in response to an OnChangeCbChain member function call.

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


ASKER CERTIFIED SOLUTION
Avatar of mahesh1402
mahesh1402
Flag of India image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial