char szBuff [100] ;
sprintf_s(szBuff , 100, "This is an Item!");
ComboBox_AddString(hCbox, szBuff);
In this way in the CBox appear a row of *square*.
Thanks.
MarinoCpp
If this doesn't help, make sure your combobox has the CBS_HASSTRINGS
style set.
Timo
--
www.TimoSoft-Software.de - Unicode controls for VB6
"Those who sacrifice freedom for safety deserve neither."
"Demokratie ist per Definition unsicher. Ihr Schutz entsteht aus der
Überzeugung, dass die demokratischen Kräfte überwiegen und sich – auf
demokratischem Wege – durchsetzen."
Great, this work!
But now I've another problem.
I must insert in the TCHAR string some string codified as char8, like this:
char* author = func(); //where func is not modifiable
_stprintf_s(szBuff, 100, TEXT("Realized by %s"), author);
and this don't work :(
How can I solve this issue?
Another question, if I would make a totally ANSI program how could do I?
(I'm a c++ and win32 newbie!)
Thanks
MarinoCpp
Hello
- Either your whole project is using char's: in "Project | Properties |
Configuration properties | General" set "Character set" to "Not set" so
that char will work with ComboBox_AddString
- or you only need char for this variable and force the functions used
to be char8 putting an 'A' at the end of the functions (I am not using
ComboBox_AddString, only SendMessage to do the same thing, but I guess
that ComboBox_AddStringA exists and it is the version of
ComboBox_AddString that works with char).
Hope this help
Cathy
> - or you only need char for this variable and force the functions used
> to be char8 putting an 'A' at the end of the functions (I am not using
> ComboBox_AddString, only SendMessage to do the same thing, but I guess
> that ComboBox_AddStringA exists and it is the version of
> ComboBox_AddString that works with char).
Thanks!! I've solved with SendMessageA
:)
MarinoCpp