本文整理汇总了C++中StrApp::Load方法的典型用法代码示例。如果您正苦于以下问题:C++ StrApp::Load方法的具体用法?C++ StrApp::Load怎么用?C++ StrApp::Load使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类StrApp
的用法示例。
在下文中一共展示了StrApp::Load方法的5个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。
示例1: SetDialogValues
/*----------------------------------------------------------------------------------------------
Set the values for the dialog controls based
----------------------------------------------------------------------------------------------*/
void TeStylesDlg::SetDialogValues()
{
// Fill list combobox.
StrApp staTemp;
::SendMessage(m_hwndList, CB_RESETCONTENT, 0, 0);
staTemp.Load(kstidTesdListBasic);
::SendMessage(m_hwndList, CB_ADDSTRING, 0, (LPARAM)staTemp.Chars()); // 0
staTemp.Load(kstidTesdListAll);
::SendMessage(m_hwndList, CB_ADDSTRING, 0, (LPARAM)staTemp.Chars()); // 1
staTemp.Load(kstidTesdListCustom);
::SendMessage(m_hwndList, CB_ADDSTRING, 0, (LPARAM)staTemp.Chars()); // 2
// Select the value in the combo box that represents the selected level.
int nSelect;
if (m_nCustomStyleLevel == 0)
nSelect = ksttBasic;
else if (m_nCustomStyleLevel > 10)
nSelect = ksttAll;
else
nSelect = ksttCustom;
::SendMessage(m_hwndList, CB_SETCURSEL, nSelect, 0);
SuperClass::SetDialogValues();
}
示例2: AppendOffsetInfo
void AppendOffsetInfo(StrApp & strDesc, int mpOffset, bool & fFirst)
{
if (mpOffset && mpOffset != knNinch)
{
StrApp strFmt;
if (mpOffset < 0)
strFmt.Load(kstidLoweredFmt);
else
strFmt.Load(kstidRaisedFmt);
StrApp strAmt;
StrAppBuf strb;
AfUtil::MakeMsrStr (abs(mpOffset) , knpt, &strb);
StrApp strT;
strT.Format(strFmt.Chars(), strb.Chars());
AppendDescPart(strDesc, strT, fFirst);
}
}
示例3: stu
/*----------------------------------------------------------------------------------------------
Return the what's-this help string for the Date Dialog ellipsis button.
@param pt not used.
@param pptss Address of a pointer to an ITsString COM object for returning the help string.
@return true.
----------------------------------------------------------------------------------------------*/
bool AfDeFeEdBoxBut::DeButton::GetHelpStrFromPt(Point pt, ITsString ** pptss)
{
AssertPtr(pptss);
StrApp str;
str.Load(kstidEllipsisBtnDateWhatsThisHelp); // No context help available
ITsStrFactoryPtr qtsf;
qtsf.CreateInstance(CLSID_TsStrFactory);
StrUni stu(str);
CheckHr(qtsf->MakeString(stu.Bstr(), m_pdee->UserWs(), pptss));
return true;
}
示例4: AppendUnderlineInfo
// Append to strDesc appropriate info about underline if any.
void AppendUnderlineInfo(StrApp & strDesc, COLORREF clrUnder, int unt, bool & fFirst)
{
StrApp strColor;
if (clrUnder != (COLORREF)knNinch)
strColor.Load(g_ct.GetColorRid(g_ct.GetIndexFromColor(clrUnder)));
StrApp strFmt;
switch (unt)
{
case kuntDotted:
strFmt.Load(kstidDottedUnderFmt);
break;
case kuntDashed:
strFmt.Load(kstidDashedUnderFmt);
break;
case kuntStrikethrough:
strFmt.Load(kstidStrikethroughUnderFmt);
break;
case kuntSingle:
strFmt.Load(kstidSingleUnderFmt);
break;
case kuntDouble:
strFmt.Load(kstidDoubleUnderFmt);
break;
default:
return;
}
StrApp strT;
strT.Format(strFmt.Chars(), strColor.Chars());
AppendDescPart(strDesc, strT, fFirst);
}
示例5: Init
/*----------------------------------------------------------------------------------------------
Set up the crawler to work on a given database.
@param stuServerName - name of the database server
@param stuDatabase - name of the database
@param pstrmLog - pointer to the log stream (may be NULL)
@param padvi3 - pointer to the progress report object (defaults to NULL)
----------------------------------------------------------------------------------------------*/
bool DbStringCrawler::Init(StrUni stuServerName, StrUni stuDatabase, IStream * pstrmLog,
IAdvInd3 * padvi3)
{
m_qstrmLog = pstrmLog;
m_stuServerName = stuServerName;
m_stuDatabase = stuDatabase;
m_qadvi3 = padvi3;
try
{
m_qode.CreateInstance(CLSID_OleDbEncap);
// Get the IStream pointer for logging. NULL returned if no log file.
StrUni stuMasterDb(L"master");
CheckHr(m_qode->Init(m_stuServerName.Bstr(), stuMasterDb.Bstr(), m_qstrmLog,
koltMsgBox, koltvForever));
CreateCommand();
}
catch (...)
{
// Cannot connect to master database.
StrApp strMsg;
strMsg.Load(kstidCannotGetMasterDb);
::MessageBox(NULL, strMsg.Chars(), m_strProgDlgTitle.Chars(), MB_OK | MB_ICONERROR);
return false;
}
if (m_qadvi3)
m_qadvi3->SetRange(0, 100);
#ifndef NO_AFMAINWINDOW
if (!m_fDontCloseMainWnd)
{
m_fNeedRelaunch = true;
// In closing the final window, FwTool is going to call
// AfApp::DecExportedObjects() which would normally post a quit message to
// the application if there is only one window open. We don't want it to
// quit yet, so we need to temporarily add an extra count until we get our
// new window open.
AfApp::Papp()->IncExportedObjects();
// Now close the current database with all its windows.
AfApp::Papp()->CloseDbAndWindows(m_stuDatabase.Chars(), m_stuServerName.Chars(), false);
// Give users time to log off, then force them off anyway:
ComBool fDisconnected;
try
{
IDisconnectDbPtr qdscdb;
qdscdb.CreateInstance(CLSID_FwDisconnect);
// Set up strings needed for disconnection:
StrUni stuReason(kstidReasonDisconnectStrCrawl);
// Get our own name:
DWORD nBufSize = MAX_COMPUTERNAME_LENGTH + 1;
achar rgchBuffer[MAX_COMPUTERNAME_LENGTH + 1];
GetComputerName(rgchBuffer, &nBufSize);
StrUni stuComputer(rgchBuffer);
StrUni stuFmt(kstidRemoteReasonStrCrawl);
StrUni stuExternal;
stuExternal.Format(stuFmt.Chars(), stuComputer.Chars());
qdscdb->Init(m_stuDatabase.Bstr(), stuServerName.Bstr(), stuReason.Bstr(),
stuExternal.Bstr(), (ComBool)false, NULL, 0);
qdscdb->DisconnectAll(&fDisconnected);
}
catch (...)
{
fDisconnected = false;
}
if (!fDisconnected)
{
// User canceled, or it was impossible to disconnect people. This will leave us in
// possibly a funny state, and nothing will be changed, but at least we'll open up
// a new window on the app.
return false;
}
}
#endif
return true;
}