本文整理汇总了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;
}
示例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;
}
示例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();
}
}
示例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();
}
示例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);
}
}