Wow I am confused. SendMessage API. (Resolved)
Okie doke, I am so darn confused as to why this piece of code is causing a segmentation fault.
Code:
char MyMsg[]="This is a message.\0";
char * pMyMsg=&MyMsg[0];
SendMessage(hwnd_MyListBox,LB_ADDSTRING,0,*pMyMsg);
The MSDN says that the LPARAM is supposed to be a pointer.
However when I use it without Dereferencing it
Code:
SendMessage(hwnd_MyListBox,LB_ADDSTRING,0,pMyMsg);
It tells me that it is expecting a long int.
It will compile the first way but then causes the fault.
Thanks for all help past/present/future.