本文整理汇总了C++中CHandleMap::FromHandle方法的典型用法代码示例。如果您正苦于以下问题:C++ CHandleMap::FromHandle方法的具体用法?C++ CHandleMap::FromHandle怎么用?C++ CHandleMap::FromHandle使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类CHandleMap
的用法示例。
在下文中一共展示了CHandleMap::FromHandle方法的7个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。
示例1: afxMapHGDIOBJ
CGdiObject* PASCAL CGdiObject::FromHandle(HGDIOBJ h)
{
CHandleMap* pMap = afxMapHGDIOBJ(TRUE); //create map if not exist
ASSERT(pMap != NULL);
CGdiObject* pObject = (CGdiObject*)pMap->FromHandle(h);
ASSERT(pObject == NULL || pObject->m_hObject == h);
return pObject;
}
示例2: afxMapHDC
CDC* PASCAL CDC::FromHandle(HDC hDC)
{
CHandleMap* pMap = afxMapHDC(TRUE); //create map if not exist
ASSERT(pMap != NULL);
CDC* pDC = (CDC*)pMap->FromHandle(hDC);
ASSERT(pDC == NULL || pDC->m_hDC == hDC);
return pDC;
}
示例3: afxMapHIMAGELIST
CImageList* PASCAL CImageList::FromHandle(HIMAGELIST h)
{
CHandleMap* pMap = afxMapHIMAGELIST(TRUE);
ASSERT(pMap != NULL);
CImageList* pImageList = (CImageList*)pMap->FromHandle(h);
ASSERT(pImageList == NULL || pImageList->m_hImageList == h);
return pImageList;
}
示例4: afxMapHMENU
CMenu* PASCAL CMenu::FromHandle(HMENU hMenu)
{
CHandleMap* pMap = afxMapHMENU(TRUE); // create map if not exist
ASSERT(pMap != NULL);
CMenu* pMenu = (CMenu*)pMap->FromHandle(hMenu);
ASSERT(pMenu == NULL || pMenu->m_hMenu == hMenu);
return pMenu;
}
示例5: AfxGetModuleThreadState
CMenu * PASCAL CMenu::FromHandle( HMENU hMenu )
/*********************************************/
{
AFX_MODULE_THREAD_STATE *pState = AfxGetModuleThreadState();
ASSERT( pState != NULL );
CHandleMap *pHandleMap = pState->m_pmapHMENU;
ASSERT( pHandleMap != NULL );
return( (CMenu *)pHandleMap->FromHandle( hMenu ) );
}
示例6: AfxGetModuleThreadState
CImageList * PASCAL CImageList::FromHandle( HIMAGELIST hImageList )
/*****************************************************************/
{
AFX_MODULE_THREAD_STATE *pState = AfxGetModuleThreadState();
ASSERT( pState != NULL );
CHandleMap *pHandleMap = pState->m_pmapHIMAGELIST;
ASSERT( pHandleMap != NULL );
return( (CImageList *)pHandleMap->FromHandle( hImageList ) );
}
示例7: AfxGetModuleThreadState
CDC * PASCAL CDC::FromHandle( HDC hDC )
/*************************************/
{
AFX_MODULE_THREAD_STATE *pState = AfxGetModuleThreadState();
ASSERT( pState != NULL );
CHandleMap *pHandleMap = pState->m_pmapHDC;
ASSERT( pHandleMap != NULL );
return( (CDC *)pHandleMap->FromHandle( hDC ) );
}