本文整理汇总了C++中CInputDialog::DoModal方法的典型用法代码示例。如果您正苦于以下问题:C++ CInputDialog::DoModal方法的具体用法?C++ CInputDialog::DoModal怎么用?C++ CInputDialog::DoModal使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类CInputDialog
的用法示例。
在下文中一共展示了CInputDialog::DoModal方法的6个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。
示例1:
void CGh0stView::OnRenameRemark()
{
// TODO: Add your command handler code here
CString strTitle;
if (m_pListCtrl->GetSelectedCount() == 1)
strTitle.Format("更改主机(%s)的备注", m_pListCtrl->GetItemText(m_pListCtrl->GetSelectionMark(), 3));
else
strTitle = "批量更改主机备注";
CInputDialog dlg;
dlg.Init(strTitle, _T("请输入新的备注:"), this);
if (dlg.DoModal() != IDOK || dlg.m_str.GetLength()== 0)
return;
int nPacketLength = dlg.m_str.GetLength() + 2;
LPBYTE lpPacket = new BYTE[nPacketLength];
lpPacket[0] = COMMAND_RENAME_REMARK;
memcpy(lpPacket + 1, dlg.m_str.GetBuffer(0), nPacketLength - 1);
SendSelectCommand(lpPacket, nPacketLength);
POSITION pos = m_pListCtrl->GetFirstSelectedItemPosition();
while(pos)
{
int nItem = m_pListCtrl->GetNextSelectedItem(pos);
m_pListCtrl->SetItemText(nItem, 3, dlg.m_str);
}
delete[] lpPacket;
}
示例2: OnNewFolder
/**
* OnNewFolder
*
*/
void CMainFrame::OnNewFolder()
{
CFileListView * v = (CFileListView *)m_mainSplitter.GetPane(0,1);
CInputDialog dialog;
//dialog.SetWindowTextW(_T("bla")) ; // = TEXT("Folder name:");
if (dialog.DoModal() == IDOK){
// Do something
CString input(dialog.m_inputText);
v->CreateFolder(input);
TRACE1("a %s \n", input);
}
}
示例3: OnNewLayer
void CLayerSelect::OnNewLayer()
{
CInputDialog dlg;
dlg.csString="Слой1";
dlg.csTitle="Идентификатор слоя:";
if(dlg.DoModal()==IDOK)
{
CLayerItem data;
data.csName=dlg.csString;
data.bVisible=1;
nCurrentEdit=aList.Add(data);
ReLoadGrid();
}
}
示例4: OnEditLayer
void CLayerSelect::OnEditLayer()
{
CCellID curCell=m_Grid.GetFocusCell();
int nLine=curCell.row;
if(nLine<0 || nLine>=aList.GetSize())
return;
CLayerItem data=aList[nLine];
CInputDialog dlg;
dlg.csString=data.csName;
dlg.csTitle="Идентификатор слоя:";
if(dlg.DoModal()==IDOK)
{
data.csName=dlg.csString;
aList[nLine]=data;
ReLoadGrid();
}
}
示例5: OnEditInputs
void CSoundSpaceDoc::OnEditInputs()
{
CInputDialog dlg;
if (dlg.DoModal() == IDOK) SetModifiedFlag();
UpdateAllViews(NULL, INITIALIZE);
}
示例6: InputDialog
bool InputDialog (CString* pResult, const TCHAR* pLabel, const TCHAR* pTitle) {
CInputDialog Dlg;
return Dlg.DoModal(pResult, pLabel, pTitle);
}