Thread View: borland.public.cppbuilder.nativeapi
2 messages
2 total messages
Started by Jim Donachiue
Mon, 24 Mar 2003 20:15
Remy Lebeau (TeamB)
Author: Jim Donachiue
Date: Mon, 24 Mar 2003 20:15
Date: Mon, 24 Mar 2003 20:15
50 lines
2578 bytes
2578 bytes
Having problems with replying with Lotus Notes installled...
In any case, I must communicate both ways with VB app and I have the HWND.
I was under the impression I need to use:
const WM_JM_CTTR_COMM = RegisterWindowMessage("JobMasterExtMsgA");
struct TWM_JM_CTTR_Comm
{
unsigned Msg;
UINT wParam;
LONG lParam;
} ;
//MESSAGE LONG OnJobMasterExtMsgA (UINT wParam, LONG lParam);
//MESSAGE LONG OnJobMasterExtMsgA (TWM_JM_CTTR_Comm);
MESSAGE LONG OnJobMasterExtMsgA (TMessage &AMess);
BEGIN_MESSAGE_MAP
VCL_MESSAGE_HANDLER(WM_JM_CTTR_COMM, TMessage, OnJobMasterExtMsgA)
END_MESSAGE_MAP(TForm)
but when I compile I get an error E2313 Constant expression required for the
line:
VCL_MESSAGE_HANDLER(WM_JM_CTTR_COMM, TMessage, OnJobMasterExtMsgA)
Any ideas?
"Jim Donachiue" <jdonachiue@bjservices.ca> wrote in message
news:3e7f6162$1@newsgroups.borland.com...
> I am using C++ Builder version 4 and I am trying to
> cummunicate with a VB app.
Communication is what way exactly? Will you be sending the message to the
VB app, or the other way around? Please be more specific.
If the former, than do you have the HWND for the VB app? You'll need to
obtain that because you can use SendMessage(). If you do have it, then just
call RegisterWindowMessage() and pass the return value as the uMsg parameter
of SendMessage().
If the latter, then you need to call RegisterWindowMessage() at program
startup, store the return value to a variable, then have your form override
the inherited WndProc() method to test messages for that value.
Gambit
Re: Remy Lebeau (TeamB)
Author: Remy Lebeau (TeamB)
Date: Mon, 24 Mar 2003 21:21
Date: Mon, 24 Mar 2003 21:21
18 lines
1652 bytes
1652 bytes
"Jim Donachiue" <jdonachiue@bjservices.ca> wrote in message news:3e7f677e@newsgroups.borland.com... > BEGIN_MESSAGE_MAP > VCL_MESSAGE_HANDLER(WM_JM_CTTR_COMM, TMessage, OnJobMasterExtMsgA) > END_MESSAGE_MAP(TForm) You can't use RegisterWindoweMessage() with a MESSAGE_MAP. The compiler expects the MESSAGE_MAP values to be compile-time constants, thus they need to be known to the compiler ahead of time. But RegisterWindowMessage() return a dynamic run-time value that is not known until the application is actually running, thus the compiler has nothing to compile with. That is why I mentioned earlier that you'll have to override your form's inherited WndProc() method in order to intercept the registered message. Gambit
Thread Navigation
This is a paginated view of messages in the thread with full content displayed inline.
Messages are displayed in chronological order, with the original post highlighted in green.
Use pagination controls to navigate through all messages in large threads.
Back to All Threads