I'm using Visual C++ /MFC and I'm sending a message as SendMessage(GetParent(hDlg) ,MY_MESSAGE , 0 , LPARAM(x) );
How could I change the value of x
inside the hDlg
parent callback function ?
For example if I send the message SendMessage(hWnd , WM_GETTEXT ,0 , LPARAM(buffer);
the buffer is returned full of the text . How did the buffer changed it's value ?
(buffer) is a pointer to some memory that has already been allocated. The WM_GETTEXT operation can use that pointer to put data into the allocated memory. You can do the same thing if your (x) variable is a pointer to some memory that has already been allocated.