本文整理汇总了C++中FString::AllocSysString方法的典型用法代码示例。如果您正苦于以下问题:C++ FString::AllocSysString方法的具体用法?C++ FString::AllocSysString怎么用?C++ FString::AllocSysString使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类FString
的用法示例。
在下文中一共展示了FString::AllocSysString方法的3个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。
示例1: ShowAddLabelDlg
STDMETHODIMP CFHtmlEventDispatcher::ShowAddLabelDlg(BSTR bstrLabel, BSTR* bstrRetVal)
{
USES_CONVERSION;
FString StrRes = g_MainFrame->m_Container->m_pStatus->ShowAddLabelDlg(OLE2T(bstrLabel));
*bstrRetVal = StrRes.AllocSysString();
return S_OK;
}
示例2: BrowseForFolder
STDMETHODIMP CFHtmlEventDispatcher::BrowseForFolder(VARIANT vtFolder, BSTR* vtOutFolder)
{
USES_CONVERSION;
FString FStrOut;
int nRes = IDCANCEL;
nRes = g_pAppManager->Conf_BrowseForFolder(OLE2T(vtFolder.bstrVal), FStrOut);
if (nRes == -1)
{
//return initial path if user canceled the folder dialog
FStrOut = OLE2T(vtFolder.bstrVal);
}
*vtOutFolder = FStrOut.AllocSysString();
return S_OK;
}
示例3: ExecCmd
STDMETHODIMP CFHtmlEventDispatcher::ExecCmd(BSTR bstrCmd, VARIANT vtParam1, VARIANT vtParam2, BSTR* bstrResult)
{
USES_CONVERSION;
FString StrCmd = OLE2T(bstrCmd);
FString StrResult;
if (StrCmd == "GotoRSS")
{
g_MainFrame->GoToRSS(VariantToUINT(vtParam1));
}
else
if (StrCmd == "SelectServer")
g_pAppManager->SelectServer();
else
if (StrCmd == "SetFeedAutoDownload")
g_Objects._RSSManager->SetChannelAutoDownload(VariantToUINT(vtParam1), VariantToUINT(vtParam2) == 0 ? FALSE: TRUE);
else
if (StrCmd == "SetFeedAsRead")
g_Objects._RSSManager->MarkAsViewed(VariantToUINT(vtParam1));
else
if (StrCmd == "PauseResumeAll")
{
if (g_Objects._DownloadManager.IsAllPaused())
{
g_Objects._DownloadManager.ResumeAll();
StrResult = "0";
}
else
{
g_Objects._DownloadManager.PauseAll();
StrResult = "1";
}
}
else
if (StrCmd == "IsAllPaused")
{
StrResult = g_Objects._DownloadManager.IsAllPaused() ? "1" : "0";
}
else
if (StrCmd == "GetSelectedChannelId")
{
StrResult.Format("%u", g_AppSettings.m_dwLastChannelId);
}
else
if (StrCmd == "RSSRemoveChannelByURL" && vtParam1.vt == VT_BSTR)
{
g_Objects._RSSManager->RemoveChannel(OLE2T(vtParam1.bstrVal));
StrResult = "1";
}
else
if (StrCmd == "SaveSubSize")
{
ULONG FontSize = VariantToUINT(vtParam1);
if (FontSize > 0)
{
_RegSetStr("SubFontSize", ULongToStr(FontSize), PLAYER_REG_KEY);
}
}
else
if (StrCmd == "RSSSaveChannelSettings")
{ //param1 = channelID, param2 = object
if (vtParam2.vt == VT_DISPATCH)
{
FDispObject pObj;
pObj.SetDispatch(vtParam2.pdispVal);
CComVariant vtMaxDownloads;
CComVariant vtChannelName;
pObj.GetProperty("maxDownloads", &vtMaxDownloads);
pObj.GetProperty("channelName", &vtChannelName);
ChannelOptions options;
options.m_dwMaxDownloadsPerFeed = vtMaxDownloads.uintVal;
options.m_ChannelName = vtChannelName.bstrVal;
options.m_Filter.m_Contains = pObj.GetPropertyStr("filterContains");
options.m_Filter.m_NotContains = pObj.GetPropertyStr("filterNotContains");
g_Objects._RSSManager->SetChannelOptions(VariantToUINT(vtParam1), options);
}
}
else
if (StrCmd == "ShowCommentsWnd")
{
g_MainFrame->ShowCommentsWnd();
}
else
if (StrCmd == "GetLastLabel")
{
StrResult = _RegStr("LastLabelStr"); //Saved by SetLastLabel
}
else
if (StrCmd == "SetLastLabel") //Used by GetLastLabel / CollectionWindow
{
_RegSetStr("LastLabelStr", OLE2T(vtParam1.bstrVal));
g_MainFrame->m_Container->m_pStatus->OnLabelChanged(OLE2T(vtParam1.bstrVal));
}
else
if (StrCmd == "SetCollectionFlags") //Show Queued/In progress, etc
{
g_MainFrame->m_Container->m_pStatus->OnFlagsChanged(VariantToUINT(vtParam1));
}
//.........这里部分代码省略.........