How to pass string using SendMessage
Hi all,
In my SDI application,i am trying send a custom message from dialog box to CScrollView.Along with that message i need to pass a string Value.I know how to send the String using SendMessage.But how to retrieve the string in the destination function,Bcos the parameter LPARAM is of LONG_PTR.How can i convert this into string,Here is my code..
CString DelVar;
SendMessage(WM_MYCHANGEVARIABLE,NULL,(LPARAM)&DelVar);
In the Destination,
LRESULT CTestView::OnMyChangeVariable(WPARAM,LPARAM)
Now My string is in LPARAM,How could i access it,Can any Pls help on this,
Shiva..
Re: How to pass string using SendMessage
Just cast the LPARAM pointer back to a CString pointer when you get that message.