Original Post
Hi! Im trying to send over the value of a float variable from one application to another. The Win32 application who send the message: In the Win32 applications Winproc that gets the message: The messagebox print "0.0", that isn't the correct value sent. Anyone know why?
float* g_pfTest = new float; <- global pointer
*g_pfTest = 22.4; <- just a test value
SendMessage(g_hwndOtherProgram, WM_USER+1, (WPARAM) 0, (LPARAM) g_pfTest );
switch (message)
{
case WM_USER+1:
float t = *(float*) lParam;
char text[40];
sprintf(text, "%0.3f", (float) t);
MessageBox(hwnd, text, 0, 0);
break;
}