Click to See Complete Forum and Search --> : VC++ : Using WPARAM and LPARAM


Parashuram
August 6th, 1999, 12:22 AM
Hello,

I donot know how to use the WPARAM and LPARAM parameters which can be sent while posting application messsage usually,
the User defined messsage.

Can i send the string information in those parameters.

wind
August 6th, 1999, 03:52 AM
you can't send the the entire string by LParam or
WParam.

LParam and WParam are 32 bit parameter, you can
use LParam to send the address of the string and
than you can get the entire string;

example:

char* string = "I love Programming";
SendMessage(window.m_hwnd,WM_USERMESSAGE,0,&string);
void OnUserMessage(....LPARAM lParam..)
{
char* s=(char*) lParam;
...
}




the beautiful story made me cry.