Click here to Skip to main content
15,918,889 members
Home / Discussions / C / C++ / MFC
   

C / C++ / MFC

 
QuestionRe: help Pin
David Crow22-Aug-07 2:56
David Crow22-Aug-07 2:56 
GeneralRe: help Pin
Russell'22-Aug-07 3:04
Russell'22-Aug-07 3:04 
GeneralRe: help Pin
Russell'22-Aug-07 3:07
Russell'22-Aug-07 3:07 
AnswerRe: help Pin
Russell'22-Aug-07 1:47
Russell'22-Aug-07 1:47 
GeneralRe: help Pin
toxcct22-Aug-07 3:11
toxcct22-Aug-07 3:11 
GeneralRe: help Pin
Russell'22-Aug-07 3:22
Russell'22-Aug-07 3:22 
AnswerRe: help Pin
PJ Arends22-Aug-07 6:28
professionalPJ Arends22-Aug-07 6:28 
QuestionOLE Drag and Drop not starting Pin
Roger Allen22-Aug-07 0:01
Roger Allen22-Aug-07 0:01 
I am trying to get OLE drag and drop to work in one of my applications. According to all the documentation I can find the minimum I need to be able to drag an object from my app into a OLE drag target would be:
<br />
    HGLOBAL hData = GlobalAlloc(GMEM_MOVEABLE,20);<br />
    if (hData != NULL)<br />
    {<br />
        char *pChar = (char *)GlobalLock(hData);<br />
        strcpy(pChar,"This is a test");<br />
        GlobalUnlock(hData);<br />
        COleDataSource source;<br />
        <br />
        source.CacheGlobalData(<br />
                CF_TEXT,<br />
                hData);<br />
        DROPEFFECT de = source.DoDragDrop(DROPEFFECT_COPY | DROPEFFECT_MOVE);<br />
    }<br />

Which should allow me to drag text from my window to an ole enabled drop target. The above code is called in my OnLButtonDown handler. Everything seems to be ok until the COleDataSource::DoDragDrop function calls ::DoDragDrop() (OleDrop1.cpp line 181), which should return when the operation completes. But it returns immediately with DROPEFFECT_NONE which should not be the case. The way COleDataSource::DoDragDrop is written wont let me examine the return code for the function so I can see why its failing.

Has anyone got any ideas as to what the cause of the problem could be? My heads getting sore banging against a wall here Frown | :(

If you vote me down, my score will only get lower

AnswerRe: OLE Drag and Drop not starting Pin
Roger Allen22-Aug-07 0:24
Roger Allen22-Aug-07 0:24 
QuestionDBException [modified] Pin
sanjutvm21-Aug-07 23:55
sanjutvm21-Aug-07 23:55 
QuestionAggregating the ActiveX control Pin
ss43121-Aug-07 23:37
ss43121-Aug-07 23:37 
QuestionHow to draw Arc in eVC++ (WinCE) Pin
himuskanhere21-Aug-07 23:31
himuskanhere21-Aug-07 23:31 
AnswerRe: How to draw Arc in eVC++ (WinCE) Pin
ThatsAlok21-Aug-07 23:52
ThatsAlok21-Aug-07 23:52 
GeneralRe: How to draw Arc in eVC++ (WinCE) Pin
himuskanhere22-Aug-07 0:21
himuskanhere22-Aug-07 0:21 
GeneralRe: How to draw Arc in eVC++ (WinCE) Pin
himuskanhere22-Aug-07 1:17
himuskanhere22-Aug-07 1:17 
AnswerRe: How to draw Arc in eVC++ (WinCE) Pin
Nelek22-Aug-07 1:26
protectorNelek22-Aug-07 1:26 
AnswerRe: How to draw Arc in eVC++ (WinCE) Pin
Iain Clarke, Warrior Programmer22-Aug-07 3:20
Iain Clarke, Warrior Programmer22-Aug-07 3:20 
QuestionSocket Programming. Pin
GauranG Shah21-Aug-07 23:00
GauranG Shah21-Aug-07 23:00 
AnswerRe: Socket Programming. Pin
ThatsAlok21-Aug-07 23:10
ThatsAlok21-Aug-07 23:10 
QuestionExecuting a script on a server asynchronously Pin
Sean OConnor21-Aug-07 22:58
Sean OConnor21-Aug-07 22:58 
AnswerRe: Executing a script on a server asynchronously [modified] Pin
Sean OConnor22-Aug-07 0:33
Sean OConnor22-Aug-07 0:33 
QuestionChanging IE options from VC Pin
pc_dev21-Aug-07 22:55
pc_dev21-Aug-07 22:55 
AnswerRe: Changing IE options from VC Pin
ThatsAlok21-Aug-07 23:09
ThatsAlok21-Aug-07 23:09 
QuestionRe: Changing IE options from VC Pin
David Crow22-Aug-07 2:32
David Crow22-Aug-07 2:32 
AnswerRe: Changing IE options from VC Pin
ThatsAlok22-Aug-07 21:27
ThatsAlok22-Aug-07 21:27 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.