Hi
I'm having real problems with lines of text, getting 'can't convert errors' when passing text to SendMessage functions and problems with converting when passing to other functions. I have tried wstring and TCHAR but both give problems when converting to LPARAM (and other way around) for SendMessage.
What would be the best format to use? Should I use Unicode character set or not (maybe it would be better without it because it sometimes gave me chinese characters but without it I'm having problems with 'converting errors')? And in what type of format should I hald the text?
To give an idea of my program. It takes a text file (takes strings and puts them into a vector. I don't know its the right thing to do?) and displays it in a listbox(I have buttons to delete lines from the listbox and send lines over USB). I also have functions to send messages to another listbox for debugging purposes.
Should I convert text I get from SendMessage to char or string? Or should I leave it as LPARAM.
In the end, I plan to send text from the listbox over USB to a LIN modem (not started hat part yet). What would be the best text type to use for my purposes?
I don't think I really get the L... formats. I'm tring to take a line from one listbox and put it to another but I only get a long line og strange symbols(similar to G).
I don't know why but it works when I do it all in 'LRESULT CALLBACK WndProc(HWND hWnd, UINT message, WPARAM wParam, LPARAM lParam)' function.
I have no idea why it wouldn't work call another function (send listbox HWND and item nr to it). Any ideas?