I am trying to use listbox.Addstring();
in MFC application which will take LPCTSTR
.
I am passing a variable of char
array that's 33 chars long.
ListBox.AddString(Adapter_List->pScanList->network[0].szSsid);
SzSsid
is declared as char szSsid[33];
I am facing two problems:
1) if I typecast to LPCTSTR
like
ListBox.AddString( (LPCTSTR ) Adapter_List->pScanList->network[0].szSsid );
I am not getting correct output - there are some Chinese characters displaying. I know it's some unicode problem but I am not knowledgeable about unicode.
2) if I dont typecast I get an error
Cannot convert char[33] to LPCTSTR
I am trying to build an MFC application which will display all access points. In szSsid
I am able to see access point names.