本文整理汇总了C++中UT_UTF8String::appendUCS2方法的典型用法代码示例。如果您正苦于以下问题:C++ UT_UTF8String::appendUCS2方法的具体用法?C++ UT_UTF8String::appendUCS2怎么用?C++ UT_UTF8String::appendUCS2使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类UT_UTF8String
的用法示例。
在下文中一共展示了UT_UTF8String::appendUCS2方法的1个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。
示例1: HIWORD
BOOL AP_Win32Dialog_Styles::_onCommand(HWND hWnd, WPARAM wParam, LPARAM lParam)
{
WORD wNotifyCode = HIWORD(wParam);
WORD wId = LOWORD(wParam);
HWND hWndCtrl = (HWND)lParam;
switch (wId)
{
case AP_RID_DIALOG_STYLES_TOP_BUTTON_APPLY:
{
const gchar * szStyle = getCurrentStyle();
if(szStyle && *szStyle)
{
getView()->setStyle(szStyle);
}
}
m_answer = a_OK;
return 1;
case AP_RID_DIALOG_STYLES_TOP_BUTTON_CLOSE:
case IDCANCEL:
m_answer = a_CANCEL;
EndDialog(hWnd,0);
return 1;
case IDOK:
{
const XAP_StringSet * pSS = m_pApp->getStringSet ();
WCHAR stylename[MAX_EBX_LENGTH+1];
// Verfiy a name value for the style
// TODO - Verify unique name value
GetDlgItemTextW(hWnd,AP_RID_DIALOG_STYLES_NEWMODIFY_EBX_NAME,stylename,MAX_EBX_LENGTH);
/*_win32DialogNewModify.getControlText( AP_RID_DIALOG_STYLES_NEWMODIFY_EBX_NAME,
m_newStyleName,
MAX_EBX_LENGTH );*/
UT_UTF8String str;
str.appendUCS2((const UT_UCS2Char*)stylename,0);
strcpy(m_newStyleName,str.utf8_str());
if( !m_newStyleName || !strlen(m_newStyleName) )
{
getFrame()->showMessageBox( pSS->getValue (AP_STRING_ID_DLG_Styles_ErrBlankName),
XAP_Dialog_MessageBox::b_O,
XAP_Dialog_MessageBox::a_OK);
return 1;
}
//strcpy (m_newStyleName, (AP_Win32App::s_fromWinLocaleToUTF8(m_newStyleName)).utf8_str());
}
m_answer = a_OK;
EndDialog(hWnd,0);
return 1;
case AP_RID_DIALOG_STYLES_TOP_COMBO_LIST:
if( wNotifyCode == CBN_SELCHANGE )
{
switch(_win32Dialog.getComboSelectedIndex(AP_RID_DIALOG_STYLES_TOP_COMBO_LIST))
{
case 0:
m_whichType = USED_STYLES;
break;
case 1:
m_whichType = ALL_STYLES;
break;
case 2:
m_whichType = USER_STYLES;
break;
}
_populateWindowData();
}
return 1;
case AP_RID_DIALOG_STYLES_TOP_LIST_STYLES:
if (wNotifyCode == LBN_SELCHANGE)
{
UT_uint32 nData = -1;
const char* name;
const PD_Style * pcStyle = NULL;
int row = _win32Dialog.getListSelectedIndex(AP_RID_DIALOG_STYLES_TOP_LIST_STYLES);
nData = _win32Dialog.getListDataItem( AP_RID_DIALOG_STYLES_TOP_LIST_STYLES, row);
if (row!=LB_ERR)
{
getDoc()->enumStyles(nData, &name, &pcStyle);
m_selectedStyle = name;
m_nSelectedStyleIdx = nData;
// refresh the previews
_populatePreviews(false);
}
//.........这里部分代码省略.........