nick1
January 15th, 2004, 09:32 AM
My application gets some data form the database and should display it in various controls.
The problem is that those data contains some unicode characters that are shown as question marks in edit boxes and comboboxes.
For example string like this: "Abß/ß2m"
is shown as "Ab?/?2m"
I operate with wchar_t* data. When loading into the list view control it's ok. The code looks like this:
wchar_t* str = NULL;
// initialize str
// ....
LVITEMW item;
item.mask = LVIF_TEXT;
item.iItem = i;
item.iSubItem = 0;
item.pszText = str;
// ....
::SendMessage(hListWnd, LVM_INSERTITEMW, 0, (LPARAM)&item);
But when loading the same text into edit box:
wchar_t* str = NULL;
// initialize ..
SetDlgItemTextW(m_hWnd, IDC_NAME_EDIT, str);
or a combobox:
wchar_t* wch ;
// ...
::SendMessageW(hComboWnd, CB_ADDSTRING, 0, (LPARAM)wch);
all 'ß' characters are shown as '?'.
Could you please advice me any solution?
Thank You.
The problem is that those data contains some unicode characters that are shown as question marks in edit boxes and comboboxes.
For example string like this: "Abß/ß2m"
is shown as "Ab?/?2m"
I operate with wchar_t* data. When loading into the list view control it's ok. The code looks like this:
wchar_t* str = NULL;
// initialize str
// ....
LVITEMW item;
item.mask = LVIF_TEXT;
item.iItem = i;
item.iSubItem = 0;
item.pszText = str;
// ....
::SendMessage(hListWnd, LVM_INSERTITEMW, 0, (LPARAM)&item);
But when loading the same text into edit box:
wchar_t* str = NULL;
// initialize ..
SetDlgItemTextW(m_hWnd, IDC_NAME_EDIT, str);
or a combobox:
wchar_t* wch ;
// ...
::SendMessageW(hComboWnd, CB_ADDSTRING, 0, (LPARAM)wch);
all 'ß' characters are shown as '?'.
Could you please advice me any solution?
Thank You.