本文整理汇总了C++中UnicodeString::t_str方法的典型用法代码示例。如果您正苦于以下问题:C++ UnicodeString::t_str方法的具体用法?C++ UnicodeString::t_str怎么用?C++ UnicodeString::t_str使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类UnicodeString
的用法示例。
在下文中一共展示了UnicodeString::t_str方法的3个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。
示例1: loadStreams
bool KarisanStreamerConfig::loadStreams()
{
StreamNames *stream_names = new StreamNames() ;
bool ret ;
getStreamNames(stream_names) ;
if(stream_names->Count <= 0)
return(false) ;
for(int idx = 0 ; idx < stream_names->Count ; idx++) {
UnicodeString stream = stream_names->Strings[idx] ;
StreamConfig *stream_config = new StreamConfig() ;
stream_config->setName(stream.t_str()) ;
loadStream(stream_config) ;
_allstreams->insert(pair<int, StreamConfig *>(idx, stream_config)) ;
}
delete stream_names ;
return(true) ;
}
示例2: _tWinMain
WINAPI _tWinMain(HINSTANCE, HINSTANCE, LPTSTR, int)
{
HWND h = FindWindowA(UnicodeString("TMainForm").t_str(), UnicodeString("Прибор динамического рассеяния").t_str());
if (h)
{
if (ParamCount() > 0)
{
UnicodeString str = ParamStr(1);
if (FileExists(str))
{
/*
char *buff = new char[str.Length()+1];
strcpy(buff, str.t_str());
*/
TCopyDataStruct data;
data.dwData = 0;
data.cbData = str.Length()+1;
data.lpData = str.t_str();
SendMessageA(h, WM_COPYDATA, 0, LPARAM(&data));
}
}
ShowWindow(h, SW_MAXIMIZE);
BringWindowToTop(h);
return 0;
}
try
{
Application->Initialize();
Application->MainFormOnTaskBar = true;
Application->Title = "ПДР";
Application->CreateForm(__classid(TMainForm), &MainForm);
Application->CreateForm(__classid(TOptionsForm), &OptionsForm);
Application->CreateForm(__classid(TGradForm), &GradForm);
Application->CreateForm(__classid(TAddGradForm), &AddGradForm);
Application->CreateForm(__classid(TReportForm), &ReportForm);
Application->CreateForm(__classid(TAdd2ReportForm), &Add2ReportForm);
Application->CreateForm(__classid(TReportEditForm), &ReportEditForm);
Application->CreateForm(__classid(TAutoProgressForm), &AutoProgressForm);
Application->CreateForm(__classid(TGraphApproxForm), &GraphApproxForm);
Application->CreateForm(__classid(TRecThreadStartForm), &RecThreadStartForm);
Application->CreateForm(__classid(TStatusRecForm), &StatusRecForm);
Application->CreateForm(__classid(TAdjustAngleAperForm), &AdjustAngleAperForm);
Application->CreateForm(__classid(TTestRecForm), &TestRecForm);
Application->Run();
}
catch (Exception &exception)
{
//Application->ShowException(&exception);
MainForm->Memo1->Lines->Add(exception.Message);
}
catch (...)
{
try
{
throw Exception("");
}
catch (Exception &exception)
{
Application->ShowException(&exception);
}
}
return 0;
}
示例3: m_ToolSaveClick
void __fastcall TFScheduler::m_ToolSaveClick(TObject *Sender)
{
UnicodeString filename;
int count = m_ls->Items->Count;
if (count!=0)
{
TSaveDialog * save = new TSaveDialog(NULL);
save->Filter = "Arquivos de texto (*.txt)|*.txt";
save->FilterIndex = 0;
save->DefaultExt = "txt";
save->Options << ofOverwritePrompt;
if (save->Execute())
{
filename = save->FileName;
}
if (!filename.IsEmpty())
{
FILE * fileStatus;
fileStatus = fopen(filename.t_str(),"w");
fprintf(fileStatus,"\nArquivo de Log do Escalonador\n");
fprintf(fileStatus,"Fila Circular com Prioridades Estáticas\n");
fprintf(fileStatus,"---------------------------------------\n\n");
fprintf(fileStatus,"Gerência de Processos:\n\n");
UnicodeString item;
int rows = m_status->RowCount;
for (int i = 0; i < rows; i++)
{
for (int j = 0; j < 4; j++)
{
UnicodeString tab = "\t";
if (i==0 && j==2) tab="\t\t";
if (i>=1 && j==1) tab="\t\t";
item += m_status->Cells[j][i] + tab;
}
item += "\n";
fprintf(fileStatus,item.t_str());
item = "";
}
fprintf(fileStatus,"\nStatus de Processos:\n\n");
int rowList = m_ls->Items->Count;
UnicodeString titleItem = m_ls->Column[0]->Caption + "\t" +
m_ls->Column[1]->Caption + "\n";
fprintf(fileStatus,titleItem.t_str());
for (int i = 0; i < rowList; i++)
{
UnicodeString itemList = m_ls->Items->Item[i]->Caption;
UnicodeString subitemList = m_ls->Items->Item[i]->SubItems->Text;
UnicodeString lineItem = itemList + "\t\t" + subitemList;
fprintf(fileStatus,lineItem.t_str());
}
fclose(fileStatus);
MessageBox(NULL,"Arquivo gerado com sucesso.","Escalonador",MB_OK|MB_ICONINFORMATION);
}
}
}