Click here to Skip to main content
15,903,012 members
Home / Discussions / C / C++ / MFC
   

C / C++ / MFC

 
GeneralRe: Application freezes while loading DLLs Pin
Member 5343577-May-04 4:52
Member 5343577-May-04 4:52 
GeneralProblem with Scroll Bar Pin
Azghar Hussain7-May-04 3:18
professionalAzghar Hussain7-May-04 3:18 
GeneralUnicode Listbox Pin
Demian Panello7-May-04 3:12
Demian Panello7-May-04 3:12 
GeneralRe: Unicode Listbox Pin
Jens Doose7-May-04 3:17
Jens Doose7-May-04 3:17 
GeneralRe: Unicode Listbox Pin
Demian Panello7-May-04 3:57
Demian Panello7-May-04 3:57 
GeneralRe: Unicode Listbox Pin
Jens Doose7-May-04 4:04
Jens Doose7-May-04 4:04 
GeneralRe: Unicode Listbox Pin
Demian Panello7-May-04 5:03
Demian Panello7-May-04 5:03 
GeneralRe: Unicode Listbox Pin
Jens Doose10-May-04 0:08
Jens Doose10-May-04 0:08 
I compiled a small sample app.
And RChin got the trick right from the beginning.
The font is the problem.
A ListBox uses the MS Sans Serif font, which obviously does not support Unicode.

Set the font to a different type, the it will work, like the following MFC sample code:

<br />
<br />
  CFont *pFont = m_ctrlList.GetFont();<br />
  LOGFONT lf = {0};<br />
  pFont->GetLogFont( &lf );<br />
  ::lstrcpyn( lf.lfFaceName, _T("Tahoma"), sizeof( lf.lfFaceName ) / sizeof( lf.lfFaceName[ 0 ] ) );<br />
<br />
  m_font.CreateFontIndirect( &lf );<br />
  m_ctrlList.SetFont( &m_font );<br />
<br />


That should do the trick...

Jens
GeneralRe: Unicode Listbox Pin
RChin7-May-04 3:24
RChin7-May-04 3:24 
GeneralThe future of VC and MFC Pin
joooooooe7-May-04 2:32
joooooooe7-May-04 2:32 
GeneralRe: The future of VC and MFC Pin
toxcct7-May-04 2:35
toxcct7-May-04 2:35 
GeneralRe: The future of VC and MFC Pin
Navin7-May-04 2:52
Navin7-May-04 2:52 
GeneralRe: The future of VC and MFC Pin
jmkhael7-May-04 3:06
jmkhael7-May-04 3:06 
GeneralRe: The future of VC and MFC Pin
Nitron7-May-04 8:31
Nitron7-May-04 8:31 
GeneralRe: The future of VC and MFC Pin
RChin7-May-04 3:31
RChin7-May-04 3:31 
GeneralRe: The future of VC and MFC Pin
toxcct7-May-04 3:44
toxcct7-May-04 3:44 
GeneralRe: The future of VC and MFC Pin
RChin7-May-04 4:08
RChin7-May-04 4:08 
GeneralRe: The future of VC and MFC Pin
toxcct7-May-04 4:10
toxcct7-May-04 4:10 
GeneralRe: The future of VC and MFC Pin
RChin7-May-04 4:15
RChin7-May-04 4:15 
GeneralRunning a program in the taskbar Pin
Dev5787-May-04 1:43
Dev5787-May-04 1:43 
GeneralRe: Running a program in the taskbar Pin
Jens Doose7-May-04 1:49
Jens Doose7-May-04 1:49 
GeneralRe: Running a program in the taskbar Pin
Garth J Lancaster7-May-04 2:00
professionalGarth J Lancaster7-May-04 2:00 
QuestionHow does fscanf in C/C++ work? Pin
cshs1007-May-04 1:21
cshs1007-May-04 1:21 
AnswerRe: How does fscanf in C/C++ work? Pin
Iain Clarke, Warrior Programmer7-May-04 1:37
Iain Clarke, Warrior Programmer7-May-04 1:37 
GeneralRe: How does fscanf in C/C++ work? Pin
Anonymous7-May-04 1:40
Anonymous7-May-04 1:40 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.