当前位置: 首页>>代码示例>>C++>>正文


C++ CObArray::GetUpperBound方法代码示例

本文整理汇总了C++中CObArray::GetUpperBound方法的典型用法代码示例。如果您正苦于以下问题:C++ CObArray::GetUpperBound方法的具体用法?C++ CObArray::GetUpperBound怎么用?C++ CObArray::GetUpperBound使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在CObArray的用法示例。


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

示例1:

extern "C" DWORD PASCAL EXPORT STDFUFILES_DestroyImage(PHANDLE pHandle)
{
	AFX_MANAGE_STATE(AfxGetStaticModuleState());

	BOOL bFound=FALSE;
	DWORD dwRet=STDFUFILES_NOERROR;

	for (int i=0;i<=g_Images.GetUpperBound();i++)
	{
		if ((HANDLE)g_Images.GetAt(i)==*pHandle)
		{
			CImage *pImage=(CImage *)(*pHandle);
			
			delete pImage;
			*pHandle=0;
			bFound=TRUE;
			g_Images.RemoveAt(i);
			break;
		}
	}

	if (!bFound)
		dwRet=STDFUFILES_BADPARAMETER;
	return dwRet;
}
开发者ID:tianxq,项目名称:fly_controller,代码行数:25,代码来源:STDFUFiles.cpp

示例2: CImage

extern "C" DWORD PASCAL EXPORT STDFUFILES_DuplicateImage(HANDLE hSource, PHANDLE pDest)
{
	AFX_MANAGE_STATE(AfxGetStaticModuleState());
	
	DWORD dwRet=STDFUFILES_NOERROR;
	BOOL bFound=FALSE;

	for (int i=0;i<=g_Images.GetUpperBound();i++)
	{
		if ((HANDLE)g_Images.GetAt(i)==hSource)
		{
			bFound=TRUE;
			break;
		}
	}

	if (!bFound)
		dwRet=STDFUPRT_BADPARAMETER;
	else
	{
		CImage *obImage=new CImage((CImage*)hSource);
		if (obImage->GetImageState())
		{
			g_Images.Add(obImage);
			*pDest=(HANDLE)obImage;
		}
		else
		{
			delete obImage;
			dwRet=STDFUFILES_BADFORMAT;
		}
	}
	return dwRet;
}
开发者ID:tianxq,项目名称:fly_controller,代码行数:34,代码来源:STDFUFiles.cpp

示例3: DestroyDynamicBars

//------------------------------------------------------------------------
void CMRCFrameWndSizeDock::DestroyDynamicBars()
// Destroys the dynamic bars in an application
//------------------------------------------------------------------------
{
	CPtrList & listControlBars = m_listControlBars;
	
	CObArray arrBars;
	CMRCSizeControlBar* pBar;
	
	// pass through the list and build an array of bars to destroy
	POSITION pos = listControlBars.GetHeadPosition();
	while (pos != NULL)
	{
		pBar = (CMRCSizeControlBar *) listControlBars.GetNext(pos);
		ASSERT(pBar != NULL);
		if (pBar->IsKindOf(RUNTIME_CLASS(CMRCSizeControlBar)) &&
				(pBar->m_Style & SZBARF_AUTOTIDY) != 0)
			arrBars.Add(pBar);
	}

	// now destroy these bars...
	for (int i = arrBars.GetUpperBound(); i >= 0; i--)
	{
		pBar = (CMRCSizeControlBar *) arrBars[i];
		pBar->DestroyWindow();
	}
}
开发者ID:Joincheng,项目名称:lithtech,代码行数:28,代码来源:FRAMEWND.CPP

示例4: ExitInstance

int CSTDFUFILESApp::ExitInstance() 
{
	int i;
	for (i=0;i<=g_Images.GetUpperBound();i++)
	{
		CImage *pImage=(CImage*)g_Images.GetAt(i);

		delete pImage;
	}
	g_Images.RemoveAll();
	for (i=0;i<=g_DFUFiles.GetUpperBound();i++)
	{
		CDFUFile *pFile=(CDFUFile*)g_DFUFiles.GetAt(i);
		delete pFile;
	}
	g_DFUFiles.RemoveAll();
	return CWinApp::ExitInstance();
}
开发者ID:tianxq,项目名称:fly_controller,代码行数:18,代码来源:STDFUFiles.cpp

示例5: ArrangeFloatingBars

//-----------------------------------------------------------------------------
void CMRCMDIFrameWndSizeDock::ArrangeFloatingBars(DWORD dwOrient)
//-----------------------------------------------------------------------------
{
	CObArray arrWnd;
	GetFloatingBars(arrWnd);
	ASSERT (this->IsKindOf(RUNTIME_CLASS(CMDIFrameWnd)));
 	ASSERT(m_hWndMDIClient != NULL);
	// Use the MDI Client window - not the normal client area
	CWnd * pMDIClientWnd = CWnd::FromHandle(m_hWndMDIClient);
	ArrangeWindowsInWindow (pMDIClientWnd, arrWnd, dwOrient);

	// clear all the MOVED flags for sizeable windows...
	for (int i = arrWnd.GetUpperBound(); i >= 0; i--)
	{
        CSizableMiniDockFrameWnd * pFloatFrame = (CSizableMiniDockFrameWnd *) arrWnd[i]; 
        
		ASSERT(pFloatFrame->IsKindOf(RUNTIME_CLASS(CMiniDockFrameWnd)));
		pFloatFrame->ModifyStyle(CBRS_MOVED_BY_USER, 0);
	}
}
开发者ID:Joincheng,项目名称:lithtech,代码行数:21,代码来源:FRAMEWND.CPP


注:本文中的CObArray::GetUpperBound方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。