Developing in win32 context and trying to get the input from my dropdown as a string. strText
is the correct value in type char[255]
. I'm trying to convert this char array to a string, but it fails
char strText[13];
SendMessage(dropDown, CB_GETLBTEXT, dropDownSelection, reinterpret_cast<LPARAM>(strText));
std::string test(strText); // outputs W
std::string test2("WORKS"); // outputs WORKS
thanks for any hints
** EDIT **
strText
strText 0x003beeec "M" char[13]
77 'M'
0 '\0'
79 'O'
0 '\0'
78 'N'
0 '\0'
71 'G'
0 '\0'
79 'O'
0 '\0'
68 'D'
0 '\0'
66 'B'