visual studio 2012 - How to show Emoji such as ☔ and 😢 in a Microsoft MFC CListCtrl? -


i'm developing desktop application mfc clistctrl, build unicode.

the listctrl can correctly show !@#$%︿&*() , not emojis ☔ , 😢.

it's "virtual listctrl" , lvitem.psztext seems correctly holding in memory unicode "26 14" ☔, not showing correctly.

i'm using visual studio 2012 on windows 7. thoughts appreciated. thanks!

[edited 20140929]

thanks werner henze, have found out "segoe ui symbol" can show emoji correctly in windows 7 http://www.istartedsomething.com/20120818/microsoft-backports-windows-8-emoji-for-segoe-ui-symbol-to-windows-7/

microsoft kb2729094 titled “an update segoe ui symbol font in windows 7 , in windows server 2008 r2 available” presumed made available through windows update soon. 

however "segoe ui symbol" seems failed on korean characters(which correctly shown "segoe ui").

there few things keep in mind.

first program should use registerwindoww , not registerwindowa window instantiated unicode window. done automatically mfc provided main window classes if compiling unicode.

second must choose font capable of displaying required characters. can check font in use , maybe change code snippet (in code taken oncreate):

cfont * pfont = m_listctrl.getfont(); assert((hfont)m_fontlistlog == nullptr); logfont logfont; verify(pfont->getlogfont(&logfont)); _tcscpy(logfont.lffacename, _t("my desired font")); verify(m_font.createfontindirect(&logfont)); m_listctrl.setfont(&m_font); 

you can check font supports characters charmap.exe.

i tested font "segoe ui" , character 0x214e, not output 0x2614 because font not support it.


Comments

Popular posts from this blog

php - Submit Form Data without Reloading page -

linux - Rails running on virtual machine in Windows -

php - $params->set Array between square bracket -