您当前的位置:首页 > IT编程 > C++
| C语言 | Java | VB | VC | python | Android | TensorFlow | C++ | oracle | 学术与代码 | cnn卷积神经网络 | gnn | 图像修复 | Keras | 数据集 | Neo4j | 自然语言处理 | 深度学习 | 医学CAD | 医学影像 | 超参数 | pointnet | pytorch | 异常检测 | Transformers | 情感分类 | 知识图谱 |

自学教程:C++ AfxMessageBox函数代码示例

51自学网 2021-06-01 19:46:06
  C++
这篇教程C++ AfxMessageBox函数代码示例写得很实用,希望能帮到您。

本文整理汇总了C++中AfxMessageBox函数的典型用法代码示例。如果您正苦于以下问题:C++ AfxMessageBox函数的具体用法?C++ AfxMessageBox怎么用?C++ AfxMessageBox使用的例子?那么恭喜您, 这里精选的函数代码示例或许可以为您提供帮助。

在下文中一共展示了AfxMessageBox函数的28个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于我们的系统推荐出更棒的C++代码示例。

示例1: switch

//---------------------------------------------------------------------------void CXMMRCtrl::OnTimer(UINT nIDEvent) {	if( nIDEvent == m_nTimerID ){		switch(m_TimerMode){			case 0:				if( m_TimerCount ){					m_TimerCount--;					break;				}				if( m_pCom ){					m_pCom->smpFFT = m_smpFFT;					STRNCPY(m_pCom->title, m_Title, sizeof(m_pCom->title));					if( m_ComName.IsEmpty() ){						m_ComName = m_pCom->comName;					}					else {						STRNCPY(m_pCom->comName, m_ComName, sizeof(m_pCom->comName));					}					if( m_RadioName.IsEmpty() ){						m_RadioName = m_pCom->comRadio;					}					else {						STRNCPY(m_pCom->comRadio, m_RadioName, sizeof(m_pCom->comRadio));					}				}				VERIFY(m_hWnd == (HWND)GetHwnd());				if( !m_hWnd ){					AfxMessageBox(IDS_XMMR_NO_WINDOW);					return;				}				{					TCHAR bf[512];					wsprintf(bf, _T("%s -h%X"), m_InvokeCommand, (DWORD)m_hWnd);#ifdef _UNICODE					char bbf[512];					STRNCPY(bbf, bf, sizeof(bbf));					UINT r = ::WinExec(bbf, SW_SHOW);#else					UINT r = ::WinExec(bf, SW_SHOW);#endif					m_TimerMode++;					m_TimerCount = (r > 31) ? m_Timeup : 1;				}				//break;			case 1:				m_TimerCount--;				if( !m_TimerCount ){					DeleteTimer();					FireOnDisconnected(2);				}				else if( !m_bConnected && m_bInitialClose && (m_TimerCount < (m_Timeup-50)) ){					// For insurance					HWND hWnd = ::FindWindow(_T("TMmttyWd"), NULL);					if( hWnd ){						::PostMessage(hWnd, gMsgMmtty, RXM_HANDLE, (DWORD)m_hWnd);						::PostMessage(hWnd, gMsgMmtty, RXM_REQHANDLE, 0);					}				}				break;		}	}	else {			COleControl::OnTimer(nIDEvent);	}}
开发者ID:ja7ude,项目名称:XMMT,代码行数:66,


示例2: MessageBox

//.........这里部分代码省略.........	//CString str3d = "[1,2,3,4,5,](4,3,2)"	//CString str = "[1e150,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,17,18,19,20,21,22,23,24](2,3,4)";//	CString str = "[/"///////",,1e150/",/"2/"](2)";	//{	//	CString str1;	//	for (int a=0;a<2;a++)	//	{	//		for (int b=0;b<3;b++)	//		{	//			for (int c=0;c<4;c++)	//			{	//			}	//		}	//	}	//}	//	//CxArrayND nd( DT_ARRAY1D_STRING );	//nd.Parse( str );	//vector<int> vPos;	//vPos.push_back(0);	////vPos.push_back(0);	////vPos.push_back(0);	//LPARAM lpData = nd.GetDataPtr( vPos );	//CString * pData = reinterpret_cast< CString * > ( lpData );	//nd.Clear();	// Initialize OLE libraries	if (!AfxOleInit())	{		AfxMessageBox(IDP_OLE_INIT_FAILED);		return FALSE;	}	AfxEnableControlContainer();	EnableTaskBarInteraction(FALSE);	globalData.SetDPIAware ();	//globalData.bDisableAero = TRUE;	//Bar挺靠后,Slider宽度,由于Splitter最小宽度为4,所以此值不应小于4,否则与Splitter不协调。	CBCGPSlider::m_nDefaultWidth = 4;	// All registry read/write operations will be produced via CBCGPXMLSettings gateway:	CBCGPRegistrySP::SetRuntimeClass (RUNTIME_CLASS (CBCGPXMLSettings));	// Read settings:	CBCGPXMLSettings::ReadXMLFromFile (FALSE, GetExecDir() + _T("//user.xml"));	// Standard initialization	// If you are not using these features and wish to reduce the size	// of your final executable, you should remove from the following	// the specific initialization routines you do not need	// Change the registry key under which our settings are stored	// TODO: You should modify this string to be something appropriate	// such as the name of your company or organization	//SetRegistryKey(_T("PeraProcessDesigner"));	//LoadStdProfileSettings(0);  // Load standard INI file options (including MRU)	//SetRegistryBase (_T("Settings"));	RECT rectDesktop;	SystemParametersInfo(SPI_GETWORKAREA,0,(PVOID)&rectDesktop,0);
开发者ID:cugxiangzhenwei,项目名称:WorkPlatForm,代码行数:67,


示例3: AfxMessageBox

void CKeyValue::OnOK(){    BOOL bRetVal = TRUE;    // Check for duplicate selection    // Get key handler array from the document    // Check for valid pointer    if (m_pDoc != NULL && m_bDataSaved == false)    {        CStringArray* pKeyArray = m_pDoc->omStrGetKeyHandlerPrototypes();        if (pKeyArray)        {            CString omStrMsgPro   = STR_EMPTY;            UINT unKeyHandlerCount = 0;            unKeyHandlerCount = (COMMANUINT)pKeyArray->GetSize();            for (UINT nCount = 0; nCount < unKeyHandlerCount; nCount++)            {                omStrMsgPro = pKeyArray->GetAt( nCount );                CString omStrFuncName   = defKEY_HANDLER;                CString omStrKeyPressed = "";                if((*m_pcKeyVal) == defGENERIC_KEY)                {                    omStrKeyPressed = defGENERIC_KEY_HANDLER_TEXT;                }                else                {                    omStrKeyPressed = m_pcKeyVal;                }                omStrFuncName += omStrKeyPressed;                // Construct Function definiton                CString omStrFuncPrototype = defDEFAULT_KEY_HANDLER_CODE;                omStrFuncPrototype.Replace("KEYNAME", omStrKeyPressed );                if ( omStrMsgPro == omStrFuncPrototype )                {                    omStrMsgPro = defMSG_DUPL_KEY_HANDLER;                    omStrMsgPro.Replace( "KEYNAME", m_pcKeyVal );                    // Duplicate message hanlder, shout                    AfxMessageBox( omStrMsgPro, MB_OK|MB_ICONINFORMATION );                    nCount = (COMMANUINT)pKeyArray->GetSize();                    bRetVal = FALSE;                }            }        }    }    if ( bRetVal == TRUE && m_bDataSaved == false)    {        CDialog::OnOK();    }    else    {        if ( m_bDataSaved == true)        {            m_bDataSaved = false;            CDialog::OnCancel();        }        else        {            CDialog::OnOK();        }    }}
开发者ID:ThoughtProcess,项目名称:busmaster,代码行数:63,


示例4: UpdateData

void CDlgCrearUsuario::OnBnClickedOk(){	UpdateData(TRUE); 	/* Se comprueba si se ha introducido el usuario*/	if (m_strUsuario.IsEmpty())	{		AfxMessageBox(IDS_NO_USUARIO);		return;	}	/* Se comprueba que se haya introducido la contrase
C++ AfxOleInit函数代码示例
C++ AfxIsValidString函数代码示例
万事OK自学网:51自学网_软件自学网_CAD自学网自学excel、自学PS、自学CAD、自学C语言、自学css3实例,是一个通过网络自主学习工作技能的自学平台,网友喜欢的软件自学网站。