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


C++ UINT函数代码示例

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


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

示例1: BufferVideoData

bool OBS::BufferVideoData(const List<DataPacket> &inputPackets, const List<PacketType> &inputTypes, DWORD timestamp, VideoSegment &segmentOut)
{
    VideoSegment &segmentIn = *bufferedVideo.CreateNew();
    segmentIn.ctsOffset = ctsOffset;
    segmentIn.timestamp = timestamp;

    segmentIn.packets.SetSize(inputPackets.Num());
    for(UINT i=0; i<inputPackets.Num(); i++)
    {
        segmentIn.packets[i].data.CopyArray(inputPackets[i].lpPacket, inputPackets[i].size);
        segmentIn.packets[i].type =  inputTypes[i];
    }

    if((bufferedVideo.Last().timestamp-bufferedVideo[0].timestamp) >= UINT(App->bufferingTime))
    {
        segmentOut.packets.TransferFrom(bufferedVideo[0].packets);
        segmentOut.ctsOffset = bufferedVideo[0].ctsOffset;
        segmentOut.timestamp = bufferedVideo[0].timestamp;
        bufferedVideo.Remove(0);

        return true;
    }

    return false;
}
开发者ID:redflasher,项目名称:OBS,代码行数:25,代码来源:OBSVideoCapture.cpp

示例2: switch

LRESULT QnSkinDialog::WindowProc(UINT message, WPARAM wParam, LPARAM lParam)
{
	if (m_pThemeDialog) {
		switch(message) {
		case WM_ACTIVATE:
			OnThemeActivate(wParam, CWnd::FromHandle((HWND)lParam), 0);
			return 0;
		case WM_NCACTIVATE:
			return OnThemeNcActivate((BOOL)wParam);
		case WM_NCCALCSIZE:
			OnThemeNcCalcSize((BOOL)wParam, (NCCALCSIZE_PARAMS *)lParam);
			break;
		case WM_NCHITTEST: {
				UINT nHitTest = OnThemeNcHitTest(CPoint(lParam));
				if (HTCLIENT != nHitTest) {
					return nHitTest;
				}
			}break;
		case WM_NCPAINT:
			OnThemeNcPaint();
			return 0;
		case WM_NCLBUTTONDOWN: {
			if (OnThemeNcLButtonDown(wParam, CPoint(lParam)))
				return 0;
			}break;
		case WM_NCLBUTTONUP: {
			if (OnThemeNcLButtonUp(wParam, CPoint(lParam)))
				return 0;
			}break;
		case WM_NCLBUTTONDBLCLK: {
			OnThemeNcLButtonDblClk(wParam, CPoint(lParam));
			}break;
		case WM_NCRBUTTONDOWN:
			OnThemeNcRButtonDown(wParam, CPoint(lParam));
			return 0;
		case WM_NCRBUTTONUP:
			OnThemeNcRButtonUp(wParam,CPoint(lParam));
			return 0;
		case WM_LBUTTONUP:
			OnThemeLButtonUp(UINT(wParam), CPoint(lParam));
			break;
		case WM_NCMOUSEMOVE:
			OnThemeNcMouseMove(wParam, CPoint(lParam));
			break;
		case WM_GETMINMAXINFO:
			OnThemeGetMinMaxInfo((MINMAXINFO*)lParam);
			break;
		case WM_CREATE:
			OnThemeResize();
			break;
		case WM_NCCREATE:
			DisableAeroStyle(m_hWnd);
			break;
		default:
			break;
		}
	}
	return QnBaseDialog::WindowProc(message, wParam, lParam);
}
开发者ID:Omgan,项目名称:code4me,代码行数:59,代码来源:QnSkinDialog.cpp

示例3: ASSERT_VALID

void CExtThemeSwitcherToolControlBar::ThemeSwitcher_OnButtonUpdate(
	CExtThemeSwitcherToolButton * pTBB
	)
{
	ASSERT_VALID( this );
	ASSERT_VALID( pTBB );
	ASSERT( LPVOID(pTBB->GetBar()) == LPVOID(this) );
bool bRedrawButton = false;
UINT nCmdID = pTBB->GetCmdID(false);
CRuntimeClass * pRTC = NULL;
	if( m_mapCmd2RTC.Lookup( nCmdID, pRTC ) )
	{
		if( pTBB->IsDisabled() )
		{
			bRedrawButton = true;
			pTBB->ModifyStyle( 0, TBBS_DISABLED );
		}
		
		CExtPaintManager::e_paint_manager_name_t ePMN =
			PmBridge_GetPM()->OnQueryPaintManagerName();
		UINT nCheckID = 0;
		if( ! m_arrMapsTT[m_eTIS_ToolBar].Lookup( UINT(ePMN), nCheckID ) )
			return;
		if( nCheckID == nCmdID )
		{
			if( (pTBB->GetStyle()&TBBS_CHECKED) == 0 )
			{
				bRedrawButton = true;
				pTBB->ModifyStyle( TBBS_CHECKED );
			}
		}
		else
		{
			if( (pTBB->GetStyle()&TBBS_CHECKED) != 0 )
			{
				bRedrawButton = true;
				pTBB->ModifyStyle( 0, TBBS_CHECKED );
			}
		}
	}
	else
	{
		if( (pTBB->GetStyle()&TBBS_CHECKED) != 0 )
		{
			bRedrawButton = true;
			pTBB->ModifyStyle( 0, TBBS_CHECKED );
		}
		if( ! pTBB->IsDisabled() )
		{
			bRedrawButton = true;
			pTBB->ModifyStyle( TBBS_DISABLED );
		}
	}
	if(		bRedrawButton
		&&	(pTBB->GetStyle()&TBBS_HIDDEN) == 0
		&&	pTBB->IsVisible()
		)
		pTBB->RedrawButton( false );
}
开发者ID:OmerMor,项目名称:SCICompanion-1,代码行数:59,代码来源:ExtControls.cpp

示例4: m_pRasterizerState

dx10State::dx10State() : 
	m_pRasterizerState(0),
	m_pDepthStencilState(0),
	m_pBlendState(0),
	m_uiStencilRef(UINT(-1)),
	m_uiAlphaRef(0)
{
}
开发者ID:2asoft,项目名称:xray-16,代码行数:8,代码来源:dx10State.cpp

示例5: enter_switch_op

static int enter_switch_op (ut64 addr, const ut8 * bytes, char *output, int outlen ) {
	ut8 idx = bytes[0];
	IN_SWITCH_OP = 1;
	ut8 sz = (BYTES_CONSUMED+1) % 4 ? 1 + 4 - (BYTES_CONSUMED+1) % 4: 1; // + (BYTES_CONSUMED+1)  % 4;
	ut8 sz2 = (4 - (addr+1) % 4) + (addr+1)  % 4;
	IFDBG eprintf ("Addr approach: 0x%04x and BYTES_CONSUMED approach: 0x%04x\n", sz2, sz);
	init_switch_op ();
	IN_SWITCH_OP = 1;
	SWITCH_OP.addr = addr;
	SWITCH_OP.def_jmp = (ut32)(UINT (bytes, sz));
	SWITCH_OP.min_val = (ut32)(UINT (bytes, sz + 4));
	SWITCH_OP.max_val = (ut32)(UINT (bytes, sz + 8));
	sz += 12;
	snprintf (output, outlen, "%s default: 0x%04"PFMT64x, JAVA_OPS[idx].name,
		SWITCH_OP.def_jmp+SWITCH_OP.addr);
	return update_bytes_consumed(sz);
}
开发者ID:jahrome,项目名称:radare2,代码行数:17,代码来源:code.c

示例6: UINT

String& String::operator = (const char *String)
{
    UINT NewLength = UINT(strlen(String));
    Allocate(NewLength + 1);
    memcpy(_Data, String, NewLength + 1);
    _Length = NewLength;
    return *this;
}
开发者ID:kbinani,项目名称:dxrip,代码行数:8,代码来源:String.cpp

示例7: UINT

UnicodeString& UnicodeString::operator = (const UnicodeCharacter *S)
{
    UINT NewLength = UINT(lstrlenW(S));
    Allocate(NewLength + 1);
    memcpy(_Data, S, (NewLength + 1) * sizeof(UnicodeCharacter));
    _Length = NewLength;
    return *this;
}
开发者ID:fly2mars,项目名称:suAgent,代码行数:8,代码来源:UnicodeString.cpp

示例8: UINT

BOOL CRecBinViewer::ExecCommand (LPCONTEXTMENU pCtxMenu,  LPCTSTR lpszCommand)
{
	UINT uiID = UINT (-1);
	UINT uiCommand = 0;
	UINT uiMenuFirst = 1;
	UINT uiMenuLast = 0x00007FFF;
	HMENU hmenuCtx;
	int iMenuPos = 0;
	int iMenuMax = 0;
	TCHAR szMenuItem[MAX_PATH];	
	TCHAR verb[MAX_PATH] ;

	hmenuCtx = CreatePopupMenu();
	HRESULT hr = pCtxMenu->QueryContextMenu(hmenuCtx, 0, uiMenuFirst, uiMenuLast, CMF_NORMAL);

	iMenuMax = GetMenuItemCount(hmenuCtx);
	
	for (iMenuPos = 0 ; iMenuPos < iMenuMax; iMenuPos++)
	{
		GetMenuString(hmenuCtx, iMenuPos, szMenuItem, MAX_PATH, MF_BYPOSITION) ;
	
		uiID = GetMenuItemID(hmenuCtx, iMenuPos) ;
		
		if ((uiID == -1) || (uiID == 0))
		{
			
		}
		else
		{
			hr = pCtxMenu->GetCommandString(uiID - 1, GCS_VERB, NULL, (LPSTR)verb, MAX_PATH);
			if (FAILED (hr))
			{
				verb[0] = TCHAR ('\0') ;
			}
			else
			{
				if (0 == _tcsicmp (verb, lpszCommand))				
					uiCommand = uiID - 1;				
			}			
		}
	}
	
	if ((UINT)-1 != uiCommand)
	{
		CMINVOKECOMMANDINFO cmi;			
		ZeroMemory(&cmi, sizeof(CMINVOKECOMMANDINFO));
		cmi.cbSize			= sizeof(CMINVOKECOMMANDINFO);
		cmi.fMask			= CMIC_MASK_FLAG_NO_UI;
		cmi.hwnd			= m_hWnd;				
		cmi.lpVerb			= (LPSTR)MAKEINTRESOURCE (uiCommand);
		cmi.nShow			= SW_SHOWNORMAL;		
		hr = pCtxMenu->InvokeCommand(&cmi);			
		if (SUCCEEDED (hr))		
			return TRUE;		
	}

	return false;
}
开发者ID:avrionov,项目名称:explorerxp,代码行数:58,代码来源:RecBinViewer.cpp

示例9: pt

void CEditTreeCtrl::DisplayContextMenu(CPoint & point) {
	CPoint pt(point);
	ScreenToClient(&pt);
	UINT flags;
	HTREEITEM hItem = HitTest(pt, &flags);
	bool bOnItem = (flags & TVHT_ONITEM) != 0;

	CMenu add;
	VERIFY(add.CreatePopupMenu());
	if(bOnItem) {
		if(CanInsertItem(GetParentItem(hItem)))
			VERIFY(add.AppendMenu(MF_STRING, ID_ADD_SIBLING, _T("New Sibling\tINS")));
		if(CanInsertItem(hItem))
			VERIFY(add.AppendMenu(MF_STRING, ID_ADD_CHILD, _T("New Child Item\tCtrl+INS")));
	}
	if(CanInsertItem(0))
		VERIFY(add.AppendMenu(MF_STRING, ID_ADD_ROOT, _T("New Root Item\tShift+INS")));

	CMenu sort;
	VERIFY(sort.CreatePopupMenu());
	VERIFY(sort.AppendMenu(MF_STRING, ID_SORT_LEVEL, _T("Current Level\tCtrl+S")));
	VERIFY(sort.AppendMenu(MF_STRING, ID_SORT_LEVELANDBELOW, _T("Current Level And Below\tCtrl+Shift+S")));

	CMenu menu;
	VERIFY(menu.CreatePopupMenu());
	if(bOnItem) {
		if(CanEditLabel(hItem))
			VERIFY(menu.AppendMenu(MF_STRING, ID_RENAME, _T("Rename\tF2")));
		if(CanDeleteItem(hItem))
			VERIFY(menu.AppendMenu(MF_STRING, ID_DELETE, _T("Delete\tDEL")));
	}
	if(add.GetMenuItemCount() > 0)
		VERIFY(menu.AppendMenu(MF_POPUP, UINT(add.GetSafeHmenu()), _T("Add")));
	if(bOnItem) {
		if(menu.GetMenuItemCount() > 0)
			VERIFY(menu.AppendMenu(MF_SEPARATOR));
		VERIFY(menu.AppendMenu(MF_POPUP, UINT(sort.GetSafeHmenu()), _T("Sort")));
	}

	ExtendContextMenu(menu);

	// maybe the menu is empty...
	if(menu.GetMenuItemCount() > 0)
		menu.TrackPopupMenu(TPM_LEFTALIGN, point.x, point.y, this);
}
开发者ID:QAndot,项目名称:Advanced-Tray-Service-Manager,代码行数:45,代码来源:EditTreeCtrl.cpp

示例10: DrawPosition

void CProgressCtrl :: DrawPosition (UINT iPos)
{	
	HRGN hrgn = NULL;
	CDC *pCDC = NULL;
	HBRUSH hBrush = NULL;

	if (iPos == 0)		// Reset !
	{
		hrgn = CreateRectRgn(rc.left, rc.top, rc.right, rc.bottom);
		m_iDrawPos == 0;
	}		
	else                                        
	{
		UINT iX = UINT (iPos * m_dFaktor);
		if (iX == m_iDrawPos)		// keine Postionsänderung
			return;
		if (iX > m_iDrawPos && iX <= (UINT) rc.Width ())					
			m_iDrawPos = iX;
		else
		{
			if (iX > (UINT) rc.Width())
				m_iDrawPos = rc.right;		
			else
				return;			
		}	
		hrgn = CreateRectRgn(rc.left, rc.top, m_iDrawPos, rc.bottom);					
	}		
	
	if (hrgn)
	{
		pCDC = GetDC (); 	
		if (pCDC)
		{
			int iRgn = (int) SelectObject (pCDC -> m_hDC, hrgn);
			if (NULLREGION != iRgn && ERROR != iRgn)
			{
				if (iPos == 0)
					hBrush = CreateSolidBrush(RGB(iDelCol, iDelCol, iDelCol));	
				else
					hBrush = CreateSolidBrush(RGB(0, 0, iShowCol));					
				if (hBrush)
					FillRgn(pCDC -> m_hDC, hrgn, hBrush);		// Fläche füllen
			}
		}
	}
		
//	alles wieder freigeben		
	if (hrgn)		
		DeleteObject(hrgn);
	if (hBrush)
		DeleteObject (hBrush);
	if (pCDC)		
		ReleaseDC (pCDC);
		
//	Fenster nachzeichnen	
	UpdateWindow ();
}	
开发者ID:hkaiser,项目名称:TRiAS,代码行数:57,代码来源:PROGRESS.CPP

示例11: CMenuUI

	LRESULT CMenuWnd::OnCreate(UINT uMsg, WPARAM wParam, LPARAM lParam, BOOL& bHandled)
	{
		if( m_pOwner != NULL) {
			LONG styleValue = ::GetWindowLong(*this, GWL_STYLE);
			styleValue &= ~WS_CAPTION;
			::SetWindowLong(*this, GWL_STYLE, styleValue | WS_CLIPSIBLINGS | WS_CLIPCHILDREN);
			RECT rcClient;
			::GetClientRect(*this, &rcClient);
			::SetWindowPos(*this, NULL, rcClient.left, rcClient.top, rcClient.right - rcClient.left, \
				rcClient.bottom - rcClient.top, SWP_FRAMECHANGED);

			m_pm.Init(m_hWnd);
			// The trick is to add the items to the new container. Their owner gets
			// reassigned by this operation - which is why it is important to reassign
			// the items back to the righfull owner/manager when the window closes.
			m_pLayout = new CMenuUI();
			m_pm.SetForceUseSharedRes(true);
			m_pLayout->SetManager(&m_pm, NULL, true);
			LPCTSTR pDefaultAttributes = m_pOwner->GetManager()->GetDefaultAttributeList(_T("Menu"));
			if( pDefaultAttributes ) {
				m_pLayout->ApplyAttributeList(pDefaultAttributes);
			}
			m_pLayout->SetAutoDestroy(false);

			for( int i = 0; i < m_pOwner->GetCount(); i++ ) {
				if(m_pOwner->GetItemAt(i)->GetInterface(_T("MenuElement")) != NULL ){
					(static_cast<CMenuElementUI*>(m_pOwner->GetItemAt(i)))->SetOwner(m_pLayout);
					m_pLayout->Add(static_cast<CControlUI*>(m_pOwner->GetItemAt(i)));
				}
			}

			CShadowUI *pShadow = m_pOwner->GetManager()->GetShadow();
			pShadow->CopyShadow(m_pm.GetShadow());
			pShadow->ShowShadow(false);

			m_pm.AttachDialog(m_pLayout);
			m_pm.AddNotifier(this);

			ResizeSubMenu();
		}
		else {
			m_pm.Init(m_hWnd);

			CDialogBuilder builder;

			CControlUI* pRoot = builder.Create(m_xml,UINT(0), this, &m_pm);
			m_pm.GetShadow()->ShowShadow(false);
			m_pm.AttachDialog(pRoot);
			m_pm.AddNotifier(this);

			ResizeMenu();
		}

		m_pm.GetShadow()->ShowShadow(true);
		m_pm.GetShadow()->Create(&m_pm);
		return 0;
	}
开发者ID:Crawping,项目名称:IocpServerClient_Side,代码行数:57,代码来源:UIMenu.cpp

示例12: handle_switch_op

static int handle_switch_op (ut64 addr, const ut8 * bytes, char *output, int outlen ) {
    int sz = 4;
    ut32 jmp = (int)(UINT (bytes, 0)) + SWITCH_OP.addr;
    int ccase = SWITCH_OP.cur_val + SWITCH_OP.min_val;
    snprintf(output, outlen, "case %d: goto 0x%04x", ccase, jmp);

    update_switch_op (addr, bytes);
    return update_bytes_consumed(sz);
}
开发者ID:kuduka,项目名称:radare2,代码行数:9,代码来源:code.c

示例13: MEMBERASSERT

//===============================================================================================
// FUNCTION: FreeReadBuffer
// PURPOSE:  Frees the read buffer and resets the cached episode.
//
void CFileDescriptor::FreeReadBuffer()
{
   MEMBERASSERT();
   if (m_pvReadBuffer != NULL)
      free(m_pvReadBuffer);
   m_pvReadBuffer = NULL;
   m_uCachedEpisode = UINT(-1);
   m_uCachedEpisodeSize = 0;
}
开发者ID:yamad,项目名称:libabf,代码行数:13,代码来源:filedesc.cpp

示例14: Length

template <class type> void Vector<type>::Randomize()
{
    UINT Len = Length();
    for(UINT i = 0; i < Len; i++)
    {
        UINT RandomNumber = UINT(rand());
        Utility::Swap(Data[i], Data[i + RandomNumber % (Len - i)]);
    }
}
开发者ID:fly2mars,项目名称:suAgent,代码行数:9,代码来源:VectorSTLImpl.cpp

示例15: QObject

RequestRouter::RequestRouter(IRestService *service, QObject *parent)
    : QObject(parent),
      m_service(service),
      m_restService(service),
      m_uidRestService(NULL),
      m_hasDefaultRoute(false)
{
    addRoute("/")
            ->on(IRequest::GET, ROUTE(m_restService->index))
            ->on(IRequest::POST, ROUTE(m_restService->create));

    addRoute("/:id")
            ->on(IRequest::GET, ROUTE(m_restService->show, UINT(id) ))
            ->on(IRequest::PUT, ROUTE(m_restService->edit, UINT(id) ))
            ->on(IRequest::DELETE, ROUTE(m_restService->del, UINT(id) ));

    service->init(this);
}
开发者ID:OwNet,项目名称:qtownet,代码行数:18,代码来源:requestrouter.cpp


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