本文整理汇总了C++中EndWaitCursor函数的典型用法代码示例。如果您正苦于以下问题:C++ EndWaitCursor函数的具体用法?C++ EndWaitCursor怎么用?C++ EndWaitCursor使用的例子?那么恭喜您, 这里精选的函数代码示例或许可以为您提供帮助。
在下文中一共展示了EndWaitCursor函数的20个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于我们的系统推荐出更棒的C++代码示例。
示例1: BeginWaitCursor
bool CModDoc::PasteEnvelope(INSTRUMENTINDEX nIns, EnvelopeType nEnv)
//----------------------------------------------------------------------
{
CMainFrame *pMainFrm = CMainFrame::GetMainFrame();
if (nIns < 1 || nIns > m_SndFile.m_nInstruments || !m_SndFile.Instruments[nIns] || !pMainFrm) return false;
BeginWaitCursor();
if (!pMainFrm->OpenClipboard())
{
EndWaitCursor();
return false;
}
HGLOBAL hCpy = ::GetClipboardData(CF_TEXT);
LPCSTR p;
bool result = false;
if ((hCpy) && ((p = (LPSTR)GlobalLock(hCpy)) != nullptr))
{
std::string data(p, p + GlobalSize(hCpy));
GlobalUnlock(hCpy);
CloseClipboard();
result = StringToEnvelope(data, m_SndFile.Instruments[nIns]->GetEnvelope(nEnv), m_SndFile.GetModSpecifications());
}
EndWaitCursor();
return result;
}
开发者ID:Sappharad,项目名称:modizer,代码行数:25,代码来源:Modedit.cpp
示例2: GetPathName
void CDIPDemoDoc::OnFileReopen()
{
// 重新打开图像,放弃所有修改
// 判断当前图像是否已经被改动
if ( IsModified() )
{
// 提示用户该操作将丢失所有当前的修改
if ( MessageBox ( NULL,
L"重新打开图像将丢失所有改动!是否继续?",
L"系统提示", MB_ICONQUESTION | MB_YESNO ) == IDNO )
{
// 用户取消操作,直接返回
return;
}
}
CString strPathName;
// 获取当前文件路径
strPathName = GetPathName();
// 更改光标形状
BeginWaitCursor();
if ( !m_Image.AttachFromFile ( strPathName ) )
{
EndWaitCursor();
AfxMessageBox ( L"打开文件时出错!请确保正确的位图(*.bmp)文件类型。" );
return;
}
// 判断读取成功否
if ( !m_Image.m_lpData )
{
// 失败,可能非BMP格式
CString strMsg;
strMsg = L"读取图像时出错!可能是不支持该类型的图像文件!";
// 提示出错
MessageBox ( NULL, strMsg, L"系统提示",
MB_ICONINFORMATION | MB_OK );
// 返回
return;
}
Init(); //对图像的尺寸和调色板信息进行初始化
// 初始化脏标记为FALSE
SetModifiedFlag ( FALSE );
// 刷新
UpdateAllViews ( NULL );
// 恢复光标形状
EndWaitCursor();
// 返回
return;
}
开发者ID:Stroot,项目名称:DIPDemo,代码行数:53,代码来源:DIPDemoDoc.cpp
示例3: EndWaitCursor
void CAcctHierDlg::OnOrgPpkgscomp()
{
m_iBuildComponents = TRUE;
m_rbEquipView.SetCheck( DISABLE );
m_rbListView.SetCheck( DISABLE );
m_rbPpkgsView.SetCheck( DISABLE );
m_rbPpkgsComp.SetCheck( ENABLE );
m_rbAlaCarteView.SetCheck( DISABLE );
/* CAMqa83432,83195*/
int nCountPpkgscomp;
int nCountAcct;
int nCountPpkgs;
if (galHierCountAcctSelection(m_hAPI,
m_iHierId,
&nCountAcct,
&m_lpError ) == GAL_FAILURE )
{
EndWaitCursor();
CGuiMsg::GuiMessage(GUIMSG_ERROR_COUNTING_ACCOUNT);
return;
}
if (galHierCountPkgSelection(m_hAPI,
m_iHierId,
&nCountPpkgs,
&m_lpError ) == GAL_FAILURE )
{
EndWaitCursor();
CGuiMsg::GuiMessage(GUIMSG_ERROR_COUNTING_PACKAGE);
return;
}
if (galHierCountPkgCompSelection(m_hAPI,
m_iHierId,
&nCountPpkgscomp,
&m_lpError ) == GAL_FAILURE )
{
EndWaitCursor();
CGuiMsg::GuiMessage(GUIMSG_ERROR_COUNTING_PACKAGE_COMPONENTS);
return;
}
m_iMaxAlaProducts = nCountAcct + nCountPpkgs+ nCountPpkgscomp + 1;
DeleteObjects();
BuildAcct();
BuildPkgs();
m_iBuildComponents = FALSE;
}
开发者ID:huilang22,项目名称:Projects,代码行数:49,代码来源:accthierdlg.cpp
示例4: BeginWaitCursor
// The following example illustrates the most common case
// of displaying the hourglass cursor during some lengthy
// processing of a command handler implemented in some
// CCmdTarget-derived class, such as a document or view.
void CMyView::OnBeginSleepEnd()
{
BeginWaitCursor(); // display the hourglass cursor
// do some lengthy processing
Sleep(3000);
EndWaitCursor(); // remove the hourglass cursor
}
开发者ID:terryjintry,项目名称:OLSource1,代码行数:11,代码来源:ccmdtarget-class_1.cpp
示例5: dlgOpen
void CMainWizard::OnScImportSettings(void)
{
CString strFilter;
CString strTitle;
CProcessPrivileges processPrivileges;
enum { fdwFlags = OFN_HIDEREADONLY | OFN_PATHMUSTEXIST };
strFilter.LoadString(IDS_SETTINGS_FILTER);
#if (_MFC_VER < 0x0700)
CFileDialogEx dlgOpen(TRUE, _T("hive"), AfxGetAppName(), fdwFlags, strFilter);
#else
CFileDialog dlgOpen(TRUE, _T("hive"), AfxGetAppName(), fdwFlags, strFilter);
#endif // _MFC_VER
strTitle.LoadString(IDS_TITLE_IMPORT);
dlgOpen.m_ofn.lpstrTitle = strTitle;
if (dlgOpen.DoModal() == IDOK)
{
BeginWaitCursor();
CWinApp* pApp = AfxGetApp();
ASSERT_VALID(pApp);
processPrivileges[SE_RESTORE_NAME] = SE_PRIVILEGE_ENABLED;
HKEY hAppKey = pApp->GetAppRegistryKey();
::RegRestoreKey(hAppKey, dlgOpen.GetPathName(), REG_FORCE_RESTORE);
::RegCloseKey(hAppKey);
processPrivileges[SE_RESTORE_NAME] = 0;
EndWaitCursor();
}
}
开发者ID:zephyrer,项目名称:update-it,代码行数:28,代码来源:MainWizard.cpp
示例6: dlgSaveAs
void CMainWizard::OnScExportSettings(void)
{
CString strFilter;
CString strTitle;
CProcessPrivileges processPrivileges;
enum { fdwFlags = OFN_OVERWRITEPROMPT | OFN_PATHMUSTEXIST | OFN_HIDEREADONLY };
strFilter.LoadString(IDS_SETTINGS_FILTER);
#if (_MFC_VER < 0x0700)
CFileDialogEx dlgSaveAs(FALSE, _T("hive"), AfxGetAppName(), fdwFlags, strFilter);
#else
CFileDialog dlgSaveAs(FALSE, _T("hive"), AfxGetAppName(), fdwFlags, strFilter);
#endif // _MFC_VER
strTitle.LoadString(IDS_TITLE_EXPORT);
dlgSaveAs.m_ofn.lpstrTitle = strTitle;
if (dlgSaveAs.DoModal() == IDOK)
{
BeginWaitCursor();
CWinApp* pApp = AfxGetApp();
ASSERT_VALID(pApp);
processPrivileges[SE_BACKUP_NAME] = SE_PRIVILEGE_ENABLED;
HKEY hAppKey = pApp->GetAppRegistryKey();
::RegSaveKey(hAppKey, dlgSaveAs.GetPathName(), NULL);
::RegCloseKey(hAppKey);
processPrivileges[SE_BACKUP_NAME] = 0;
EndWaitCursor();
}
}
开发者ID:zephyrer,项目名称:update-it,代码行数:28,代码来源:MainWizard.cpp
示例7: ASSERT
void CTypeLibTreeView::OnTreeItemExpanding(NMHDR* pNMHDR, LRESULT* pResult)
{
*pResult = 0 ;
NM_TREEVIEW* pnmtv = (NM_TREEVIEW*)pNMHDR;
if ((pnmtv->action != TVE_EXPAND && pnmtv->itemNew.lParam) ||
(pnmtv->itemNew.state & TVIS_EXPANDEDONCE))
return ;
CTreeItem* pItem = (CTreeItem*)pnmtv->itemNew.lParam ;
if (pItem == NULL)
return ;
ASSERT(pItem->IsKindOf(RUNTIME_CLASS(CTreeItem)));
BeginWaitCursor() ;
m_tree.SetRedraw( FALSE ) ;
*pResult = !pItem->Expand( pnmtv->itemNew.hItem ) ;
// No children
if (*pResult == TRUE)
{
TV_ITEM item ;
item.cChildren = 0 ;
item.mask = TVIF_CHILDREN ;
item.hItem = pnmtv->itemNew.hItem ;
m_tree.SetItem( &item ) ;
}
m_tree.SetRedraw( TRUE ) ;
EndWaitCursor() ;
}
开发者ID:jetlive,项目名称:skiaming,代码行数:32,代码来源:tlbtree.cpp
示例8: GetDocument
void CIMDisplayView::OnCrop()
{
CIMDisplayDoc* pDoc = GetDocument();
ASSERT_VALID(pDoc);
SetupUndo();
BeginWaitCursor();
try {
CRect trackRect;
m_tracker.GetTrueRect(trackRect);
Geometry newGeo( trackRect.Width(), trackRect.Height(), trackRect.left, trackRect.top );
pDoc->GetImage().crop( newGeo );
}
catch(Exception e)
{
DoDisplayError("OnCrop",e.what());
}
EndWaitCursor();
UpdateTheView();
}
开发者ID:CliffsDover,项目名称:graphicsmagick,代码行数:26,代码来源:IMDisplayView.cpp
示例9: BeginWaitCursor
void CDibView::OnEditPaste()
{
HDIB hNewDIB = NULL;
if (OpenClipboard())
{
BeginWaitCursor();
hNewDIB = (HDIB) CopyHandle(::GetClipboardData(CF_DIB));
CloseClipboard();
if (hNewDIB != NULL)
{
CDibDoc* pDoc = GetDocument();
pDoc->ReplaceHDIB(hNewDIB); // and free the old DIB
pDoc->InitDIBData(); // set up new size & palette
pDoc->SetModifiedFlag(TRUE);
SetScrollSizes(MM_TEXT, pDoc->GetDocSize());
OnDoRealize((WPARAM)m_hWnd,0); // realize the new palette
pDoc->UpdateAllViews(NULL);
}
EndWaitCursor();
}
}
开发者ID:dani102,项目名称:Tema-2,代码行数:26,代码来源:dibview.cpp
示例10: BeginWaitCursor
void NewVersionDlg::OnShowWindow(BOOL bShow, UINT nStatus)
{
CDialog::OnShowWindow(bShow, nStatus);
int iTotalTextLength = ctlDetails.GetWindowTextLength();
ctlDetails.SetSel(iTotalTextLength, iTotalTextLength);
BeginWaitCursor();
CString sResult;
CWebAccess webAccess;
webAccess.Get("www.milow.net/site/projects/parnrar/pnrVersions.xml", sResult);
if (sResult != "")
{
MSXML::IXMLDOMDocumentPtr domVersions;
if (CoCreateInstance( MSXML::CLSID_DOMDocument, 0, CLSCTX_INPROC_SERVER, MSXML::IID_IXMLDOMDocument, (void**)&domVersions ) != S_OK)
{
ctlDetails.ReplaceSel("Error: Failed to create DOMDocument object");
goto CLEANUP;
}
domVersions->loadXML(sResult.GetBuffer(0));
CString sXml = static_cast<char *>(domVersions->xml);
if (sXml == "")
{
ctlDetails.ReplaceSel("Error: Failed to download version information");
goto CLEANUP;
}
MSXML::IXMLDOMElementPtr eVer = domVersions->selectSingleNode("/Versions/Version");
CString sVer = static_cast<char *>(_bstr_t(eVer->getAttribute("number")));
if (sVer == theApp.GetMyVersion())
{
ctlDetails.ReplaceSel("You are currently running the latest version of Par-N-Rar");
goto CLEANUP;
}
//Get all info about later versions
CString sText = "You are currently running v" + theApp.GetMyVersion();
sText += "\n";
sText += "The latest version is v" + sVer;
sText += "\n\n";
MSXML::IXMLDOMNodeListPtr nlVersions = domVersions->selectNodes( "/Versions/Version");
for (long l=0; l<nlVersions->length; l++)
{
eVer = nlVersions->Getitem(l);
sVer = static_cast<char *>(_bstr_t(eVer->getAttribute("number")));
if (sVer == theApp.GetMyVersion())
break;
sText += "****************************************************\nVersion " + sVer;
sText += ": \n";
sText += static_cast<char *>(eVer->text);
sText += "\n\n";
}
ctlDetails.ReplaceSel(sText);
}
CLEANUP:
Resize();
EndWaitCursor();
}
开发者ID:GDXN,项目名称:Par-N-Rar,代码行数:60,代码来源:NewVersionDlg.cpp
示例11: BeginWaitCursor
BOOL CCertRemoveSelectDlg::RefreshCertificateList()
/*++
Routine Description:
Refresh certificate list view from internal license list.
Arguments:
None.
Return Values:
BOOL.
--*/
{
BeginWaitCursor();
BOOL ok = ::LvRefreshObArray( &m_listCertificates, &g_removeColumnInfo, &m_licenseArray );
EndWaitCursor();
return ok;
}
开发者ID:mingpen,项目名称:OpenNT,代码行数:27,代码来源:remdlg.cpp
示例12: BeginWaitCursor
void CRepositoryBrowser::Refresh()
{
BeginWaitCursor();
if (m_nExternalOvl >= 0)
SYS_IMAGE_LIST().SetOverlayImage(m_nExternalOvl, OVERLAY_EXTERNAL);
m_RepoTree.DeleteAllItems();
m_RepoList.DeleteAllItems();
m_TreeRoot.m_ShadowTree.clear();
m_TreeRoot.m_sName = "";
m_TreeRoot.m_bFolder = true;
TVINSERTSTRUCT tvinsert = {0};
tvinsert.hParent = TVI_ROOT;
tvinsert.hInsertAfter = TVI_ROOT;
tvinsert.itemex.mask = TVIF_DI_SETITEM | TVIF_PARAM | TVIF_TEXT | TVIF_IMAGE | TVIF_SELECTEDIMAGE | TVIF_STATE;
tvinsert.itemex.pszText = L"/";
tvinsert.itemex.lParam = (LPARAM)&m_TreeRoot;
tvinsert.itemex.iImage = m_nIconFolder;
tvinsert.itemex.iSelectedImage = m_nOpenIconFolder;
m_TreeRoot.m_hTree= m_RepoTree.InsertItem(&tvinsert);
ReadTree(&m_TreeRoot);
m_RepoTree.Expand(m_TreeRoot.m_hTree, TVE_EXPAND);
FillListCtrlForShadowTree(&m_TreeRoot);
m_RepoTree.SelectItem(m_TreeRoot.m_hTree);
EndWaitCursor();
}
开发者ID:3F,项目名称:tortoisegit-mdc,代码行数:28,代码来源:RepositoryBrowser.cpp
示例13: BeginWaitCursor
void CDlg::OnBnClickedButton5()
{
//Товар-склад
COleVariant vC;
short i;
BeginWaitCursor();
HMODULE hMod;
BOOL bFndC;
CString strFndC;
bFndC = FALSE;
strFndC = _T("");
if(IsEnableRec(ptrRs1)){
i = 0;
vC = GetValueRec(ptrRs1,i);
vC.ChangeType(VT_BSTR);
strFndC = vC.bstrVal;
strFndC.TrimLeft();
strFndC.TrimRight();
bFndC = TRUE;
}
hMod=AfxLoadLibrary(_T("OrdStrg.dll"));
typedef BOOL (*pDialog)(CString,_ConnectionPtr,CString,BOOL);
pDialog func=(pDialog)GetProcAddress(hMod,"startOrdStrg");
(func)(m_strNT, ptrCnn,strFndC,bFndC);
// m_SlpDay.SetDate(t1);
AfxFreeLibrary(hMod);
EndWaitCursor();
}
开发者ID:03bekjob,项目名称:Strg,代码行数:31,代码来源:Dlg.cpp
示例14: BeginWaitCursor
void CVideoWnd::CreateTransparent(LPCTSTR pTitle, RECT rect, HBITMAP BitmapID)
{
CTransparentWnd::CreateTransparent( pTitle, rect, BitmapID);
BeginWaitCursor();
//FrameGrabber
if (!m_FrameGrabber.GetSafeHwnd())
{
//m_FrameGrabber.Create(0,9,this);
int ret = m_FrameGrabber.Create(0,9,this);
//ret = 0;
if (ret)
{
double delayPeriod = 1000 / m_iRefreshRate;
//SetTimer(0x1, DEFAULT_PERIOD, NULL);
SetTimer(0x1, (int) delayPeriod, NULL);
m_iStatus = 1;
}
else {
m_textstring.LoadString(IDS_STRING_NOWEBCAM);
}
}
EndWaitCursor();
}
开发者ID:aisnote,项目名称:camstudio-clone,代码行数:30,代码来源:VideoWnd.cpp
示例15: catch
void CLoginDlg::DispLatestUser()
{
try
{
if( m_SQLDirect.ExecuteSQL("SELECT * FROM uSysInfo")==SQL_SUCCESS)
{
int nRet=m_SQLDirect.Fetch();
if(!nRet)
{
m_strUser=m_SQLDirect.GetCol(1);
CWnd* pWnd;
pWnd=GetDlgItem(IDC_EDT_PWD); //IDC_EDT_USER IDC_EDT_PWD
pWnd->SetFocus();
}
else
{
CWnd* pWnd;
pWnd=GetDlgItem(IDC_EDT_USER);
pWnd->SetFocus();
}
}
}
catch(CDBException *e){
e->ReportError();
EndWaitCursor();
return ;
}
}
开发者ID:xiaoyugm,项目名称:chtproject,代码行数:30,代码来源:LoginDlg.cpp
示例16: BeginWaitCursor
void CStockView::OnInitialUpdate()
{
BeginWaitCursor();
CDBSampleDoc* pDoc = static_cast<CDBSampleDoc*>(GetDocument());
m_pSet = &(pDoc->m_StockSet);
m_pSet->m_pDatabase = pDoc->m_DBSampleSet.m_pDatabase;
// Set the current Product ID as the parameter
m_pSet->m_ProductIDparam = pDoc->m_DBSampleSet.m_ProductID;
// Filter on the Product ID field
m_pSet->m_strFilter = "ProductID = ?";
CRecordView::OnInitialUpdate();
if (m_pSet->IsOpen())
{
CString strTitle = m_pSet->m_pDatabase->GetDatabaseName();
CString strTable = m_pSet->GetTableName();
if (!strTable.IsEmpty())
strTitle += _T(":") + strTable;
GetDocument()->SetTitle(strTitle);
}
EndWaitCursor();
}
开发者ID:salomarx,项目名称:Visual-studio-2008-for-C-plus,代码行数:26,代码来源:StockView.cpp
示例17: BeginWaitCursor
void T38AI8AO::OnCbnSelchangeRangecombo()
{
bPauseMultiRead=TRUE;
BeginWaitCursor();
CString strTemp;
int lRow = m_msflexgrid_input.get_RowSel();
int lCol = m_msflexgrid_input.get_ColSel();
int sel=m_comboxRange.GetCurSel();
m_comboxRange.ShowWindow(FALSE);
if (product_register_value[RANGE_INPUT1+lRow-1]==sel)
{
return;
}
int ret=write_one(g_tstat_id,RANGE_INPUT1+lRow-1,sel);
if (ret>0)
{
product_register_value[RANGE_INPUT1+lRow-1]=sel;
}
else
{
AfxMessageBox(_T("Fail"));
}
InitialDialog();
EndWaitCursor();
bPauseMultiRead=FALSE;
}
开发者ID:jay-github,项目名称:T3000_Building_Automation_System,代码行数:27,代码来源:T38AI8AO.cpp
示例18: ReportSaveLoadException
BOOL CDibDoc::OnOpenDocument(LPCTSTR lpszPathName)
{
CFile file;
CFileException fe;
if (!file.Open(lpszPathName, CFile::modeRead | CFile::shareDenyWrite, &fe))
{
ReportSaveLoadException(lpszPathName, &fe,
FALSE, AFX_IDP_FAILED_TO_OPEN_DOC);
return FALSE;
}
DeleteContents();
BeginWaitCursor();
// replace calls to Serialize with ReadDIBFile function
TRY
{
m_hDIB = ::ReadDIBFile(file);
}
CATCH (CFileException, eLoad)
{
file.Abort(); // will not throw an exception
EndWaitCursor();
ReportSaveLoadException(lpszPathName, eLoad,
FALSE, AFX_IDP_FAILED_TO_OPEN_DOC);
m_hDIB = NULL;
return FALSE;
}
开发者ID:jetlive,项目名称:skiaming,代码行数:28,代码来源:dibdoc.cpp
示例19: BeginWaitCursor
void CDrumScheduleResultView::OnUpdate(CView* /*pSender*/, LPARAM /*lHint*/, CObject* /*pHint*/)
{
BeginWaitCursor();
m_wndSpread.SetReDraw(FALSE);
DisplayDrumScheduleResult();
m_wndSpread.SetReDraw(TRUE);
EndWaitCursor();
}
开发者ID:radtek,项目名称:e-load,代码行数:8,代码来源:DrumScheduleResultView.cpp
示例20: BeginWaitCursor
void CFoulerDoc::OnEditClearAll()
{
BeginWaitCursor();
ClearData();
m_pLeftView->Refresh();
m_pRightView->Refresh();
EndWaitCursor();
}
开发者ID:WisemanLim,项目名称:femos,代码行数:8,代码来源:FoulerDoc.cpp
注:本文中的EndWaitCursor函数示例由纯净天空整理自Github/MSDocs等源码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。 |
请发表评论