Google Groups no longer supports new Usenet posts or subscriptions. Historical content remains viewable.
Dismiss

Sending and Extracting char* from TMessage LPARAM

13 views
Skip to first unread message

Seeker

unread,
Aug 22, 2005, 9:05:26 AM8/22/05
to
Hi all,

I have a dll wrote in vc++ which send this message to my C++ builder
exe:

char* mMsg = "hi from the dll";
SendMessage(gHwnd,CALLBACK_MESSAGE, 0, (LPARAM) mMsg );

I want to extract the text "hi from the dll" in the c++ builder like
this:

void __fastcall TForm1::WndProc(TMessage& Message)
{

if(Message.Msg == CALLBACK_MESSAGE)
{

ShowMessage((char*)(Message.LParam)); //give me an access error
Message.Result=TRUE;
}
else
{
TForm::WndProc(Message) ;
}
}

Any help please?

0 new messages