I'm trying to populate a char array with the text in a text box. Here's my code:
Error C2664: 'SendMessageA' : cannot convert parameter 4 from 'char *(*)' to 'long'
//in my global variable declares:
//in my message handler, case WM_CREATE:
Txt1=CreateWindowEx(0,"Edit","Text Box",WS_CHILD | WS_VISIBLE, 15,90,90,15,hwnd,NULL,hInstMain,NULL);
//the offending code, called when a cmd btn is pushed:
I'm sure I'm missing something simple I just don't see it. Thanks in advance for any help.
SendMessage(Txt1, WM_GETTEXT, (WPARAM)iMaxChar, (LPARAM)buffTxt1);
Thanks, Uraldor. I noticed the (WPARAM)/(LPARAM) in the MSDN library and didn't even think to try it! :rolleyes:
Like I said, I had a feeling I was missing something simple.