User forums > Help
Dynamic Data Exchange with codeblocks
(1/1)
exkise:
Hello !
I'm currently trying to communicate with Code::Blocks. I've read this page which tells us that it is possible to send command to codeblocks via Dynamic Data Exchange.
Maybe it is a lack of knowledge from me, but I find that the documentation is not really helping.
I went to the msdn page about using DDE but I'm not familliar with this protocol either.
I've seen this code example from msdn :
--- Code: --- static BOOL fInInitiate = FALSE;
char *szApplication;
char *szTopic;
atomApplication = *szApplication == 0 ?
NULL : GlobalAddAtom((LPSTR) szApplication);
atomTopic = *szTopic == 0 ?
NULL : GlobalAddAtom((LPSTR) szTopic);
fInInitiate = TRUE;
SendMessage((HWND) HWND_BROADCAST, // broadcasts message
WM_DDE_INITIATE, // initiates conversation
(WPARAM) hwndClientDDE, // handle to client DDE window
MAKELONG(atomApplication, // application-name atom
atomTopic)); // topic-name atom
fInInitiate = FALSE;
if (atomApplication != NULL)
GlobalDeleteAtom(atomApplication);
if (atomTopic != NULL)
GlobalDeleteAtom(atomTopic);
--- End code ---
Using this non-talking sample and other code part from different place, I couldn't manage to get codeblocks to respond to my WM_DDE_INITIATE message.
Could you, please, tell me what do I have to send to get codeblocks to anwser me ?
Any help could be usefull :)
oBFusCATed:
What do you want to use the DDE for?
exkise:
Well, that's a weird question, I'd like to use the commands described in the doc ^^
oBFusCATed:
Looking at the code I suppose you have to set the topic to "CodeBlocksDDEServer".
You can check for yourself in src/src/app.cpp.
exkise:
Thanks, I'll look at that.
If I manage to get something to work properly, I'll post an example of working code.
Navigation
[0] Message Index
Go to full version