The problem is below:
SendMessage(hwnd_SSMAIN_PARENTCONTAINER_RTFCONTROL,WM_SETTEXT,(WPARAM)0,(LPARAM&)webfilebuffer.str());
- hwnd_SSMAIN_PARENTCONTAINER_RTFCONTROL is an handle to an rtf control
- webfilebuffer is type stringstream
and compiles fine within dev c++ with an older version of gcc.
I just now updated to code blocks and used the import command from the file menu for dev c++ projects.
Now within code blocks I get this error for the send message above:
E:\Projects\PWS Source Studio 7-18-12\open-save-new dialog.h|94|error: invalid cast of an rvalue expression of type 'std::basic_stringstream::__string_type {aka std::basic_string}' to type 'LPARAM& {aka long int&}'|
I just now started to use the newer version of the gcc MinGW.
I looked this error up online and found nothing about it, if I just look up "invalid cast of an rvalue expression of type " instead of "invalid cast of an rvalue expression of type 'std::basic_stringstream::__string_type {aka std::basic_string}' to type 'LPARAM& {aka long int&}'|"
I find a couple of things on google which I tried to do that line above but it seems like no matter what I try to do it doesn't work.
From the looks of it I can no longer convert the str to lparam and that it will only accept lparam for now own ie it must be something like LPARAM something;
instead of string something; and then converting that to lparam for send message to accept this.
Can someone please explain to me what is going on and what I need to do to get this to work?
Thank you