本文整理汇总了C++中Dlg函数的典型用法代码示例。如果您正苦于以下问题:C++ Dlg函数的具体用法?C++ Dlg怎么用?C++ Dlg使用的例子?那么恭喜您, 这里精选的函数代码示例或许可以为您提供帮助。
在下文中一共展示了Dlg函数的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。
示例1: Dlg
void StateGraphViewerPanel::renderToSVG(const wxString &Filename)
{
auto const Res = seec::Resource("TraceViewer")
["GUIText"]["Graph"]["RenderToSVG"];
if (!CurrentGraphSVG || CurrentGraphSVG->empty()) {
wxMessageDialog Dlg(this,
towxString(Res["NoGraphMessage"]),
towxString(Res["NoGraphTitle"]));
Dlg.ShowModal();
return;
}
wxTempFile Out(Filename);
if (!Out.Write(*CurrentGraphSVG)) {
wxMessageDialog Dlg(this,
towxString(Res["GraphWriteFailedMessage"]),
towxString(Res["GraphWriteFailedTitle"]));
Dlg.ShowModal();
return;
}
if (!Out.Commit()) {
Out.Discard();
return;
}
}
示例2: Dlg
void DlgffDPjrProperties::AdminEditThumb() {
int ThumbnailIndex=ApplicationConfig->ThumbnailModels->SearchModel(ffdProject->ThumbnailName);
if ((ThumbnailIndex<0)||(ThumbnailIndex>=ApplicationConfig->ThumbnailModels->List.count())) return;
if (!ApplicationConfig->ThumbnailModels->List[ThumbnailIndex]->IsCustom) {
QString OldName=ffdProject->ThumbnailName;
QString NewName=ffdProject->ProjectThumbnail->SaveAsNewCustomModelFile(ffd_MODELTYPE_THUMBNAIL);
ui->ThumbCB->PrepareTable(true,ApplicationConfig->ThumbnailModels);
ui->ThumbCB->SetCurrentModel(ffdProject->ThumbnailName);
DlgImageComposer Dlg(ffdProject,ApplicationConfig,this);
Dlg.InitDialog();
if (Dlg.exec()==0) {
ffdProject->ProjectThumbnail->SaveModelFile(ffd_MODELTYPE_THUMBNAIL,NewName);
ApplicationConfig->ThumbnailModels->FillModelType(ffd_MODELTYPE_THUMBNAIL);
ui->ThumbCB->PrepareTable(true,ApplicationConfig->ThumbnailModels);
ui->ThumbCB->SetCurrentModel(ffdProject->ThumbnailName);
} else {
QFile(NewName).remove();
(*ApplicationConfig->ThumbnailModels->NextNumber)--;
ffdProject->ThumbnailName=OldName;
ApplicationConfig->ThumbnailModels->FillModelType(ffd_MODELTYPE_THUMBNAIL);
ui->ThumbCB->PrepareTable(true,ApplicationConfig->ThumbnailModels);
ui->ThumbCB->SetCurrentModel(ffdProject->ThumbnailName);
}
} else {
DlgImageComposer Dlg(ffdProject,ApplicationConfig,this);
Dlg.InitDialog();
if (Dlg.exec()==0) {
ffdProject->ProjectThumbnail->SaveModelFile(ffd_MODELTYPE_THUMBNAIL,ApplicationConfig->ThumbnailModels->List[ApplicationConfig->ThumbnailModels->SearchModel(ffdProject->ThumbnailName)]->FileName);
ApplicationConfig->ThumbnailModels->FillModelType(ffd_MODELTYPE_THUMBNAIL);
ui->ThumbCB->PrepareTable(true,ApplicationConfig->ThumbnailModels);
ui->ThumbCB->SetCurrentModel(ffdProject->ThumbnailName);
}
}
ThumbChanged();
}
示例3: InputStringDialog
std::vector<unicode_t> InputStringDialog( const char* FieldName, NCDialogParent* Parent, const unicode_t* Message, const unicode_t* Str )
{
if ( !FieldName )
{
clInputStrDialog Dlg( Parent, Message, Str );
return Dlg.ShowDialog();
}
clInputFieldDialog Dlg( FieldName, Parent, Message, Str );
return Dlg.ShowDialog();
}
示例4: GetSelectedItem
void ValueListCtrl::OnModify(wxCommandEvent& event)
{
long Item = GetSelectedItem();
if(Item == -1)
{
return ;
}
wxListItem ListItem;
ACE_Configuration::VALUETYPE Type = (ACE_Configuration::VALUETYPE)GetItemData(Item);
wxString Name = GetItemText(Item);
switch(Type)
{
case ACE_Configuration::STRING:
{
ACE_TString Value;
m_pConfig->get_string_value(m_Key, Name, Value);
wxString ValueText(Value.fast_rep());
ValueDlg Dlg(this, Name, ValueText);
if(Dlg.ShowModal() != wxID_OK)
{
return;
}
Value = (const char*)Dlg.GetStringValue();
m_pConfig->set_string_value(m_Key, Name, Value);
}
break;
case ACE_Configuration::INTEGER:
{
u_int Value;
m_pConfig->get_integer_value(m_Key, Name, Value);
ValueDlg Dlg(this, Name, Value);
if(Dlg.ShowModal() != wxID_OK)
{
return;
}
Value = Dlg.GetUINTValue();
m_pConfig->set_integer_value(m_Key, Name, Value);
}
break;
case ACE_Configuration::BINARY:
{
wxMessageBox("Binary modification not supported (why don't you implement it?)");
//assert(0);
}
break;
}
DisplaySection(m_Key);
}
示例5: Dlg
void CSrScriptView::OnScriptLoad()
{
CFileDialog Dlg(TRUE, ".psc", "", OFN_HIDEREADONLY | OFN_FILEMUSTEXIST, SR_SCRIPTFILE_FILTER, this);
int Result = Dlg.DoModal();
if (Result != IDOK) return;
CString Filename = Dlg.GetPathName();
CSrScriptFile* pNewScript = new CSrScriptFile;
bool fResult = pNewScript->Load(Filename);
if (!fResult)
{
delete pNewScript;
SrEditShowError("Failed to load script file '%s'!", Filename);
return;
}
pNewScript->SetIsModified(false);
m_Scripts.Add(pNewScript);
SetCurrentScript(pNewScript);
m_ScriptList.SetCurSel(AddScriptList(pNewScript));
}
示例6: Dlg
void CDlgAdminEfcEffectList::OnModify()
{
int nNo, nResult;
PCInfoEffect pInfoEffect;
CDlgAdminEfcEffect Dlg(this);
CPacketADMIN_EFC_RENEWEFFECT Packet;
nNo = m_List.GetNextItem (-1, LVNI_SELECTED);
if (nNo < 0) {
return;
}
pInfoEffect = (PCInfoEffect)m_pLibInfo->GetPtr (m_List.GetItemData (nNo));
Dlg.Init (m_pMgrData, TRUE);
Dlg.SetInfo (pInfoEffect);
nResult = Dlg.DoModal ();
if (nResult != IDOK) {
return;
}
Dlg.GetInfo (pInfoEffect);
Packet.Make (pInfoEffect->m_dwEffectID, pInfoEffect);
m_pSock->Send (&Packet);
}
示例7: Dlg
void CDlgAdminCharMotionList::OnModify()
{
int nNo, nResult;
DWORD dwMotionListID;
PCLibInfoMotion pLibInfo;
CDlgAdminCharMotion Dlg(this);
CPacketADMIN_CHAR_RENEWMOTION Packet;
nNo = m_List.GetNextItem (-1, LVNI_SELECTED);
if (nNo < 0) {
return;
}
dwMotionListID = nNo + 1;
UpdateData ();
pLibInfo = m_pMgrData->GetLibInfoMotion ();
Dlg.Init (m_pMgrData, m_dwMotionTypeID, dwMotionListID, m_nGrpIDSub);
Dlg.SetList (pLibInfo);
nResult = Dlg.DoModal ();
if (nResult != IDOK) {
return;
}
Dlg.GetList (pLibInfo);
Packet.Make (m_dwMotionTypeID, dwMotionListID, pLibInfo);
m_pSock->Send (&Packet);
}
示例8: ExtensionModuleInit
// This is an example of an exported function.
SCRIPT_PIPE_DLL_API int ExtensionModuleInit(int ix)
{
// pExecFunc = NULL;
ix;// compiler food.
wxLogDebug("Got into DLL" );
// Here is proof that the DLL was dynamically loaded and this Init function
// called.
wxDialog Dlg( (wxWindow*)NULL, (wxWindowID)-1, "mod-script-pipe - Dialog Loaded by Plug In", wxPoint(0,0));
#if 0
ShuttleGui S( &Dlg, eIsCreating );
S.StartStatic( "Scripter Initialising" );
S.StartHorizontalLay();
S.Id(wxID_CANCEL).AddButton( "Cancel" );
S.Id(wxID_OK).AddButton( "OK" )->SetFocus();
S.EndHorizontalLay();
S.EndStatic();
#endif
Dlg.Fit();
Dlg.Move( 100,100 );
int id = Dlg.ShowModal();
// return -1 for cancel, anything else for OK.
return (id==wxID_CANCEL)?-1:42;
}
示例9: Dlg
void CDlgAdminMapObject::OnModify()
{
int nResult;
DWORD dwObjectID;
PCInfoMapObject pInfo;
CPacketADMIN_MAP_RENEWMAPOBJECT Packet;
CDlgAdminMapObjectEdit Dlg(this);
nResult = m_List.GetNextItem (-1, LVNI_SELECTED);
if (nResult < 0) {
return;
}
dwObjectID = m_List.GetItemData (nResult);
pInfo = (PCInfoMapObject)m_pLibInfoMapObject->GetPtr (dwObjectID);
Dlg.Init (m_pMgrData);
Dlg.SetData (pInfo);
nResult = Dlg.DoModal ();
if (nResult != IDOK) {
return;
}
Packet.Make (Dlg.m_pInfoMapObject);
m_pSock->Send (&Packet);
}
示例10: ExcDialog
bool ExcDialog(LPCWSTR ModuleName,LPCWSTR Exception,LPVOID Adress)
{
string strAddr;
strAddr.Format(L"0x%p",Adress);
string strFunction=GetFunctionName(From);
#ifndef NO_WRAPPER
if(Module && !Module->IsOemPlugin())
#endif // NO_WRAPPER
{
strFunction+=L"W";
}
FarDialogItem EditDlgData[]=
{
{DI_DOUBLEBOX,3,1,72,8,0,nullptr,nullptr,0,MSG(MExcTrappedException)},
{DI_TEXT, 5,2, 17,2,0,nullptr,nullptr,0,MSG(MExcException)},
{DI_TEXT, 18,2, 70,2,0,nullptr,nullptr,0,Exception},
{DI_TEXT, 5,3, 17,3,0,nullptr,nullptr,0,MSG(MExcAddress)},
{DI_TEXT, 18,3, 70,3,0,nullptr,nullptr,0,strAddr},
{DI_TEXT, 5,4, 17,4,0,nullptr,nullptr,0,MSG(MExcFunction)},
{DI_TEXT, 18,4, 70,4,0,nullptr,nullptr,0,strFunction},
{DI_TEXT, 5,5, 17,5,0,nullptr,nullptr,0,MSG(MExcModule)},
{DI_EDIT, 18,5, 70,5,0,nullptr,nullptr,DIF_READONLY|DIF_SELECTONENTRY,ModuleName},
{DI_TEXT, -1,6, 0,6,0,nullptr,nullptr,DIF_SEPARATOR,L""},
{DI_BUTTON, 0,7, 0,7,0,nullptr,nullptr,DIF_DEFAULTBUTTON|DIF_FOCUS|DIF_CENTERGROUP,MSG((From == EXCEPT_KERNEL)?MExcTerminate:MExcUnload)},
{DI_BUTTON, 0,7, 0,7,0,nullptr,nullptr,DIF_CENTERGROUP,MSG(MExcDebugger)},
};
MakeDialogItemsEx(EditDlgData,EditDlg);
Dialog Dlg(EditDlg, ARRAYSIZE(EditDlg),ExcDlgProc);
Dlg.SetDialogMode(DMODE_WARNINGSTYLE|DMODE_NOPLUGINS);
Dlg.SetPosition(-1,-1,76,10);
Dlg.Process();
return Dlg.GetExitCode()==11;
}
示例11: Dlg
void CIVUI_TestDlg::OnBnClickedTest()
{
CFileDialog Dlg(TRUE);
if ( IDOK == Dlg.DoModal() )
{
CString strPath = Dlg.GetPathName();
//打开硬盘中的图形文件
HANDLE hFile=CreateFile(
strPath,
GENERIC_READ,
FILE_SHARE_READ,
NULL,
OPEN_EXISTING,
FILE_ATTRIBUTE_NORMAL,
NULL);
if (hFile==INVALID_HANDLE_VALUE)
{
return;
}
DWORD dwFileSize=GetFileSize(hFile,NULL);//获取文件字节数
if (dwFileSize == INVALID_FILE_SIZE)
return;
BYTE* pTemBuf = new BYTE[dwFileSize];
DWORD dwByteRead = 0;
BOOL bRc = ReadFile(hFile,pTemBuf,dwFileSize,&dwByteRead,NULL);//把文件读入内存缓冲区
CloseHandle(hFile);//关闭打开的文件
m_pISnapShotSender->OnSnapShotSend(0, 0, 0,pTemBuf, dwFileSize);
delete[] pTemBuf;
}
}
示例12: EditCodePageName
// Вызов редактора имени кодовой страницы
void EditCodePageName()
{
UINT Position = CodePages->GetSelectPos();
if (IsPositionStandard(Position))
return;
FARString CodePageName = CodePages->GetItemPtr(Position)->strName;
size_t BoxPosition;
if (!CodePageName.Pos(BoxPosition, BoxSymbols[BS_V1]))
return;
CodePageName.LShift(BoxPosition+2);
DialogDataEx EditDialogData[]=
{
{DI_DOUBLEBOX, 3, 1, 50, 5, {}, 0, MSG(MGetCodePageEditCodePageName)},
{DI_EDIT, 5, 2, 48, 2, {(DWORD_PTR)L"CodePageName"}, DIF_FOCUS|DIF_HISTORY, CodePageName},
{DI_TEXT, 0, 3, 0, 3, {}, DIF_SEPARATOR, L""},
{DI_BUTTON, 0, 4, 0, 3, {}, DIF_DEFAULT|DIF_CENTERGROUP, MSG(MOk)},
{DI_BUTTON, 0, 4, 0, 3, {}, DIF_CENTERGROUP, MSG(MCancel)},
{DI_BUTTON, 0, 4, 0, 3, {}, DIF_CENTERGROUP, MSG(MGetCodePageResetCodePageName)}
};
MakeDialogItemsEx(EditDialogData, EditDialog);
Dialog Dlg(EditDialog, ARRAYSIZE(EditDialog), EditDialogProc);
Dlg.SetPosition(-1, -1, 54, 7);
Dlg.SetHelp(L"EditCodePageNameDlg");
Dlg.Process();
}
示例13: Dlg
void CLogViewDlg::DoFileSaveCmd()
{
if(m_LogList.GetItemCount() <= 0)
return;
CTime curTime = CTime::GetCurrentTime();
CString strPathName;
strPathName.Format(_T("XLog_%04d_%02d_%02d_%02d_%02d_%02d"),
curTime.GetYear(),
curTime.GetMonth(),
curTime.GetDay(),
curTime.GetHour(),
curTime.GetMinute(),
curTime.GetSecond());
CFileDialog Dlg(FALSE);
Dlg.m_ofn.lpstrFilter = _T("XLog\0*.xlog\0");
Dlg.m_ofn.lpstrFile = strPathName.GetBuffer(MAX_PATH);
if(Dlg.DoModal() == IDOK)
{
strPathName.ReleaseBuffer();
strPathName = Dlg.GetPathName();
if(strPathName.Find(_T(".")) == -1)
{
strPathName += _T(".xlog");
}
if(!XSaveLogFile(strPathName, ListViewQueryLogCallback, (void*)&m_vctLogInfo))
{
AfxMessageBox(_T("Failed to Save File.\r\nCheck if the file is valid?"), MB_OK | MB_ICONWARNING);
}
}
strPathName.ReleaseBuffer();
}
示例14: Dlg
void CHDFTestDoc::OnFileOpen()
{
// TODO: Add your command handler code here
char szFileFilter[]={"*.hdf|*.hdf|*.l3m_8D_chlo|*.l3m_8D_chlo|*.l3m_8D_SST_4|*.l3m_8D_SST_4||"};
CFileDialog Dlg(true,NULL,NULL,OFN_HIDEREADONLY,szFileFilter,NULL);
if (Dlg.DoModal()!=IDOK) { return ;}
CString filename = Dlg.GetPathName() ;
if(filename.IsEmpty())
return;
//CReadHdfData *readHdf = new CReadHdfData();
phdfDataSet = new CHDFDataset();
phdfDataSet->open((LPSTR)(LPCTSTR)filename);
//phdfDataSet->ReadHDFVSData((LPSTR)(LPCTSTR)filename);¿××¢ÊÍ
//phdfDataSet->ReadHDFVData((LPSTR)(LPCTSTR)filename);¿××¢ÊÍ
phdfDataSet->ReadHDFHead();
phdfDataSet->ReadAllSdsAttr();
// readHdf->SetFilename(filename);
// readHdf->ReadHDFHead();
// readHdf->ReadSdsAttr(0);
// readHdf->ReadSdsData(0);
AfxMessageBox("¶ÁÈ¡HDFÎļþ³É¹¦£¡");
return;
}
示例15: UserIdentity
LRESULT CIdentitiesPage::OnBnClickedIdentityNew(WORD /*wNotifyCode*/, WORD /*wID*/, HWND /*hWndCtl*/, BOOL& /*bHandled*/)
{
UserIdentity *pNewIdentity = new UserIdentity();
pNewIdentity->m_ID = g_pNewPrefs->ObtainNewIdentityID();
CUserIdentityDlg Dlg(pNewIdentity);
int result = Dlg.DoModal();
if (result == 1)
{
g_pNewPrefs->m_UserIdentitiesList.Add(pNewIdentity);
int newitemnum = m_IdentityCtrl.AddString(pNewIdentity->m_Description);
if (newitemnum != LB_ERR)
{
m_IdentityCtrl.SetCurSel(newitemnum);
m_IdentityCtrl.SetItemDataPtr(newitemnum,pNewIdentity);
}
else
ATLASSERT(FALSE);
}
else
{
delete pNewIdentity;
}
return 0;
}