Weird outputs from SendMessage on 64-bit Windows
I'm sort of new to Windows GUI programming. I got some code which works fine on 32-bit Windows but go weird on 64-bit Win7 (same exe).
LWG_CEDIT_GET( m_hwnd, IDC_EDIT_NUM_TEST, g_tmp_str, 4096 );
where LWG_CEDIT_GET is defined as:
#define LWG_CEDIT_GET(h,id,v,m) \ ((*((U32*)(v))=(m)),SendMessage(GetDlgItem((h),(id)),EM_GETLINE,0,(LPARAM)(char*)(v))
On WinXP 32, this gives me g_tmp_str="1" (of course I inputted '1' into the textfield in dialog). But, on Win7 64, this gives me g_tmp_str=""(Oops, the weird character can't be shown in stackoverflow, whatever, odd char. =49'1' =16'').
Generally speaking, 32bit exe program can work flawlessly on Win7 64, so, why my program failed? Thanks.
Edit 1: IsWindowsUnicode(m_hwnd) returns FALSE.
See my last comments of the topic.