本文整理汇总了C++中TSTR::ToUTF8方法的典型用法代码示例。如果您正苦于以下问题:C++ TSTR::ToUTF8方法的具体用法?C++ TSTR::ToUTF8怎么用?C++ TSTR::ToUTF8使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类TSTR
的用法示例。
在下文中一共展示了TSTR::ToUTF8方法的1个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。
示例1: RollupDialogProc
//.........这里部分代码省略.........
case CC_SPINNER_BUTTONDOWN:
{
int id = LOWORD(wParam);
switch (id)
{
case IDC_ANIMATION_SPIN:
case IDC_ACTION_SPIN2:
theHold.Begin();
return TRUE;
default:
return FALSE;
}
}
break;
case CC_SPINNER_BUTTONUP:
{
if (!HIWORD(wParam))
{
theHold.Cancel();
break;
}
int id = LOWORD(wParam);
switch (id)
{
case IDC_ANIMATION_SPIN:
case IDC_ACTION_SPIN2:
if (th->getCoreHelper())
th->getCoreHelper()->setState(th->animationIDSpin->GetIVal(), 0.0);
theHold.Accept(GetString(IDS_DS_PARAMCHG));
return TRUE;
default:
return FALSE;
}
}
case CC_SPINNER_CHANGE:
{
int animID;
int id = LOWORD(wParam);
TimeValue t = 0; // not really needed...yet
switch (id)
{
case IDC_ANIMATION_SPIN:
case IDC_ACTION_SPIN2:
if (!HIWORD(wParam))
theHold.Begin();
//actionID = th->actionIDSpin->GetIVal();
//th->animationIDSpin->SetValue(animID, FALSE);
//th->actionIDSpin->SetValue(actionID, FALSE);
animID = th->animationIDSpin->GetIVal();
if (th->getCoreHelper())
th->getCoreHelper()->setState(animID, 0.0);
if (!HIWORD(wParam))
theHold.Accept(GetString(IDS_DS_PARAMCHG));
return TRUE;
default:
return FALSE;
}
}
case WM_COMMAND:
switch (LOWORD(wParam))
{
case IDC_CAL_CFG_URL:
switch (HIWORD(wParam))
{
case EN_SETFOCUS:
DisableAccelerators();
break;
case EN_KILLFOCUS:
EnableAccelerators();
break;
case EN_CHANGE:
int len = (int)SendDlgItemMessage(hDlg, IDC_CAL_CFG_URL, WM_GETTEXTLENGTH, 0, 0);
TSTR temp;
temp.Resize(len + 1);
SendDlgItemMessage(hDlg, IDC_CAL_CFG_URL, WM_GETTEXT, len + 1, (LPARAM)temp.data());
#if MAX_PRODUCT_VERSION_MAJOR > 14
th->setURL(temp.ToUTF8().data());
#else
th->setURL((char *)temp);
#endif
break;
}
break;
}
return FALSE;
default:
return FALSE;
}
return FALSE;
}