0

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 ?

NirMH
  • 4,769
  • 3
  • 44
  • 69
Omar Natour
  • 101
  • 10

1 Answers1

1

(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.

ScottMcP-MVP
  • 10,337
  • 2
  • 15
  • 15