• 设为首页
  • 点击收藏
  • 手机版
    手机扫一扫访问
    迪恩网络手机版
  • 关注官方公众号
    微信扫一扫关注
    公众号

C++ IsChild函数代码示例

原作者: [db:作者] 来自: [db:来源] 收藏 邀请

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



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

示例1: SetMouseLButton

void OUGUIObject::SetMouseLButton(bool bDown)
{
    if(bDown == m_bMouseLButton) return;

    m_bMouseLButton = bDown;

    if(m_bMouseLButton)
    {
        /** 设置控件 */
        if(!IsChild(OUGUIObject::GetFocusControl()))
        {
            OUGUIObject::SetFocusControl(this);
        }

        /** 激活控件 (如拖曳) */
        if(!IsChild(OUGUIObject::GetActiveControl()))
        {
            OUGUIObject::SetActiveControl(this);
        }

        OnMouseLButtonDown();
    }
    else
    {
        if(OUGUIObject::GetActiveControl() == this)
        {
            OUGUIObject::SetActiveControl(NULL);
        }

        OnMouseLButtonUp();
    }
}
开发者ID:XadillaX,项目名称:hge-mfc-demo,代码行数:32,代码来源:OUGUIObject.cpp


示例2: GetEdge

 IGraphEdge * GetEdge(unsigned int hash) const
 {
     CComPtr<IGraphEdge> retVal = m_graph.GetEdge(hash);
     if (IsChild(retVal->GetSource()) || IsChild(retVal->GetTarget()))
     {
         return retVal;
     }
     return NULL;
 }
开发者ID:dehilsterlexis,项目名称:eclide-1,代码行数:9,代码来源:GraphSubgraphImpl.cpp


示例3: HandleAdd

void Container::Add( const Widget::Ptr& widget ) {
	if( IsChild( widget ) ) {
		return;
	}

	m_children.push_back( widget );
	HandleAdd( widget );

	// Check if HandleAdd still wants the little boy.
	if( IsChild( widget ) ) {
		widget->SetParent( shared_from_this() );
		RequestResize();
	}
}
开发者ID:Stigmatized,项目名称:glassomium,代码行数:14,代码来源:Container.cpp


示例4: DockWnd_NextWindow

//
//	Usually called in response to a Ctrl+Tab keyboard accelerator
//
BOOL WINAPI DockWnd_NextWindow(HWND hwndMain)
{
	HWND hwndFocus;
	HWND hwndLast = 0;
	DOCKSERVER *dsp;
	DOCKPANEL *dpp;
	BOOL fMainFocus = TRUE;

	if((dsp = GetDockServer(hwndMain)) == 0)
		return FALSE;

	hwndFocus = GetFocus();

	// is focus on one of the dockwindows?
	//for(i = 0; i < dsp->nNumDockPanels; i++)
	for(dpp = dsp->PanelListHead; dpp; dpp = dpp->flink)
	{
		//DOCKPANEL *dwp = &dsp->PanelList[i];

		if(hwndFocus == dpp->hwndPanel || IsChild(dpp->hwndPanel, hwndFocus))
			fMainFocus = FALSE;
	}

	//for(i = 0; i < dsp->nNumDockPanels; i++)
	for(dpp = dsp->PanelListHead; dpp; dpp = dpp->flink)
	{
	//	DOCKPANEL *dwp = &dsp->PanelList[i];

		if(dpp->hwndPanel)
		{
			// is the focus set to this window?
			if(hwndFocus == dpp->hwndPanel || IsChild(dpp->hwndPanel, hwndFocus))
			{
				hwndLast = dpp->hwndPanel;
			}
			// look for next window that doesn't have focus
			else if((hwndLast || fMainFocus) && !(dpp->dwStyle & DWS_NOSETFOCUS))
			{
				SetFocus(dpp->hwndPanel);	
				return TRUE;
			}
		}
	}

	// not found? go to the main window
	SetFocus(hwndMain);
	return TRUE;
}
开发者ID:4aiman,项目名称:HexEdit,代码行数:51,代码来源:DockLib.c


示例5: FindAdviseChild

/****************************************************************************
 *                                                                          *
 *  FUNCTION   : FindAdviseChild()                                          *
 *                                                                          *
 *  PURPOSE    : Search through the child windows of hwndMDI for an info    *
 *               ctrl that has the same Item and format and is an           *
 *               ADVSTART ADVSTOP or ADVDATA transaction window.            *
 *                                                                          *
 *               We use these to show the associated advise data.           *
 *                                                                          *
 *  RETURNS    : The transaction window handle or 0 on failure.             *
 *                                                                          *
 ****************************************************************************/
HWND FindAdviseChild(
HWND hwndMDI,
HSZ hszItem,
WORD wFmt)
{
    HWND hwnd, hwndStart;
    XACT *pxact;

    if (!IsWindow(hwndMDI))
        return 0;
    
    hwnd = hwndStart = GetWindow(hwndMDI, GW_CHILD);
    while (hwnd && IsChild(hwndMDI, hwnd)) {
        pxact = (XACT *)GetWindowWord(hwnd, GWW_WUSER);
        if (pxact &&
                (pxact)->wFmt == wFmt &&
                (pxact)->hszItem == hszItem &&
                (
                    ((pxact->wType & XTYP_ADVSTART) == XTYP_ADVSTART) ||
                    (pxact->wType == XTYP_ADVSTOP) ||
                    (pxact->wType == XTYP_ADVDATA)
                )
           ) {
            return(hwnd);
        }
        hwnd = GetWindow(hwnd, GW_HWNDNEXT);
        if (hwnd == hwndStart) 
            return 0;
    }
    return 0;
}
开发者ID:chunhualiu,项目名称:OpenNT,代码行数:44,代码来源:dde.c


示例6: GetSafeHwnd

void CNGWizard::OnPaletteChanged(CWnd* pFocusWnd) 
{
	if (!m_bmpHeader.IsEmpty() )
	{
		CPalette* pPal = m_bmpHeader.GetPalette();
		if ( (NULL != pPal) &&
			(NULL != GetSafeHwnd()) &&
			(this != pFocusWnd) &&
			!IsChild(pFocusWnd) )
		{
			CClientDC dc(this);
			CPalette* pOldPalette = dc.SelectPalette(pPal, TRUE);
			UINT nChanged = dc.RealizePalette();
			dc.SelectPalette(pOldPalette, TRUE);

			if (0 != nChanged)
			{
				Invalidate();
			}
		}
	}
	else
	{
		CNGWizard_BASE::OnPaletteChanged(pFocusWnd);
	}
}
开发者ID:jhbsz,项目名称:cpe-1,代码行数:26,代码来源:NGWizard.cpp


示例7: AtEndOfTabList

// Returns TRUE if we're at the end of the tab list
static BOOL NEAR
AtEndOfTabList(HWND hwndDlg)
{
	HWND	hCtl;
	BOOL	bShift;
	 
	// See whether we should check for the end of the tab list or
	// the shift-tab list
	bShift = GetKeyState(VK_SHIFT) < 0;

	// Get the control that currently has focus
	hCtl = GetFocus();
	assert(IsChild(hwndDlg, hCtl));

	// Get the first-level child for the control. This matters for controls
	// like a combo box which have child windows
	while (GetParent(hCtl) != hwndDlg)
		hCtl = GetParent(hCtl);

	// Look for another child window that's enabled and wants TAB keys
	do {
		hCtl = bShift ? GetPrevSibling(hCtl) : GetNextSibling(hCtl);

		if (hCtl == NULL)
			return TRUE;  // no more child windows
	} while ((GetWindowStyle(hCtl) & (WS_DISABLED | WS_TABSTOP)) != WS_TABSTOP);

	return FALSE;
}
开发者ID:vicamo,项目名称:b2g_mozilla-central,代码行数:30,代码来源:cppageex.cpp


示例8: Key

bool TopWindow::Key(dword key, int count)
{
	if(Ctrl::Key(key, count))
		return true;
	if(IsChild()) return false;
	if(key == K_DOWN || key == K_RIGHT || key == K_TAB) {
		Ctrl *ctrl = GetFocusChildDeep();
		if(ctrl && IterateFocusForward(ctrl, this))
			return true;
		ctrl = GetFirstChild();
		if(ctrl) {
			if(ctrl->SetWantFocus()) return true;
			return IterateFocusForward(ctrl, this);
		}
	}
	if(key == K_UP || key == K_LEFT || key == K_SHIFT_TAB) {
		Ctrl *ctrl = GetFocusChildDeep();
		if(ctrl && IterateFocusBackward(ctrl, this))
			return true;
		ctrl = GetLastChild();
		if(ctrl) {
			if(ctrl->SetWantFocus()) return true;
			return IterateFocusBackward(ctrl, this);
		}
	}
	return false;
}
开发者ID:AbdelghaniDr,项目名称:mirror,代码行数:27,代码来源:TopWindow.cpp


示例9: GetFocus

BOOL CSAPrefsSubDlg::PreTranslateMessage(MSG* pMsg) 
{
	// Don't let CDialog process the Escape key.
	if ((pMsg->message == WM_KEYDOWN) && (pMsg->wParam == VK_ESCAPE))
	{
		return TRUE;
	}
	
	// Don't let CDialog process the Return key, if a multi-line edit has focus
	if ((pMsg->message == WM_KEYDOWN) && (pMsg->wParam == VK_RETURN))
	{
		// Special case: if control with focus is an edit control with
		// ES_WANTRETURN style, let it handle the Return key.
		
		TCHAR szClass[10];
		CWnd* pWndFocus = GetFocus();
		if (((pWndFocus = GetFocus()) != NULL) &&
			IsChild(pWndFocus) &&
			(pWndFocus->GetStyle() & ES_WANTRETURN) &&
			GetClassName(pWndFocus->m_hWnd, szClass, 10) &&
			(lstrcmpi(szClass, _T("EDIT")) == 0))
		{
			pWndFocus->SendMessage(WM_CHAR, pMsg->wParam, pMsg->lParam);
			return TRUE;
		}
		
		return FALSE;
	}

	return CDialog::PreTranslateMessage(pMsg);
}
开发者ID:RandallFlagg,项目名称:kgbarchiver,代码行数:31,代码来源:SAPrefsSubDlg.cpp


示例10: OnPaletteChanged

void palEditDlg::OnPaletteChanged(CWnd* pFocusWnd) 
{
	if (pFocusWnd == this || IsChild(pFocusWnd))
		return;

	OnQueryNewPalette();
}
开发者ID:AltimorTASDK,项目名称:TribesRebirth,代码行数:7,代码来源:palEditDlg.cpp


示例11: LLOG

Bar::Item& MenuBar::AddSubMenu(Event<Bar&> proc)
{
	LLOG("MenuBar::AddSubMenu " << Name());
	SubMenuBase *w;
	MenuItemBase *q;
	if(IsChild()) {
		TopSubMenuItem *a = new TopSubMenuItem;
		q = a;
		w = a;
	}
	else {
		SubMenuItem *a = new SubMenuItem;
		q = a;
		w = a;
	}
	item.Add(q);
	pane.Add(q, Null);
	q->SetFont(font);
	q->LeftGap(Nvl(leftgap, style->leftgap));
	q->TextGap(style->textgap);
	q->Style(style);
	q->MaxIconSize(IsNull(maxiconsize) ? style->maxiconsize : maxiconsize);
	w->SetParent(this);
	w->Set(proc);
	return *q;
}
开发者ID:koz4k,项目名称:soccer,代码行数:26,代码来源:MenuBar.cpp


示例12: ASSERT

bool CChordEaseApp::HandleDlgKeyMsg(MSG* pMsg)
{
	static const LPCSTR	EditBoxCtrlKeys = "ACHVX";	// Z reserved for app undo
	CMainFrame	*Main = theApp.GetMain();
	ASSERT(Main != NULL);	// main frame must exist
	switch (pMsg->message) {
	case WM_KEYDOWN:
		{
			int	VKey = INT64TO32(pMsg->wParam);
			bool	bTryMainAccels = FALSE;	// assume failure
			if ((VKey >= VK_F1 && VKey <= VK_F24) || VKey == VK_ESCAPE) {
				bTryMainAccels = TRUE;	// function key or escape
			} else {
				bool	IsAlpha = VKey >= 'A' && VKey <= 'Z';
				CEdit	*pEdit = CFocusEdit::GetEdit();
				if (pEdit != NULL) {	// if an edit control has focus
					if ((IsAlpha									// if (alpha key
					&& strchr(EditBoxCtrlKeys, VKey) == NULL		// and unused by edit
					&& (GetKeyState(VK_CONTROL) & GKS_DOWN))		// and Ctrl is down)
					|| ((VKey == VK_SPACE							// or (space key,
					|| VKey == VK_RETURN || VKey == VK_BACK)		// Enter or Backspace
					&& (GetKeyState(VK_CONTROL) & GKS_DOWN))		// and Ctrl is down)
					|| (VKey == VK_SPACE							// or (space key
					&& (GetKeyState(VK_SHIFT) & GKS_DOWN))			// and Shift is down)
					|| (IsAlpha										// or (alpha key
					&& pEdit->IsKindOf(RUNTIME_CLASS(CNumEdit))		// and numeric edit
					&& (VKey > 'G'									// and (key above G
					|| !pEdit->IsKindOf(RUNTIME_CLASS(CNoteEdit)))	// or not note edit)
					&& (GetKeyState(VK_SHIFT) & GKS_DOWN)))			// and Shift is down)
						bTryMainAccels = TRUE;	// give main accelerators a try
				} else {	// non-edit control has focus
					if (IsAlpha										// if alpha key
					|| VKey == VK_SPACE								// or space key
					|| (GetKeyState(VK_CONTROL) & GKS_DOWN)			// or Ctrl is down
					|| (GetKeyState(VK_SHIFT) & GKS_DOWN))			// or Shift is down
						bTryMainAccels = TRUE;	// give main accelerators a try
				}
			}
			if (bTryMainAccels) {
				HACCEL	hAccel = Main->GetAccelTable();
				if (hAccel != NULL
				&& TranslateAccelerator(Main->m_hWnd, hAccel, pMsg))
					return(TRUE);	// message was translated, stop dispatching
			}
		}
		break;
	case WM_SYSKEYDOWN:
		// if focused window isn't descendant of main frame (e.g. floating bar's controls
		// are descendants of miniframe) main frame must steal focus else main menus fail
		if (!IsChild(Main->m_hWnd, GetFocus())) {	// avoid stealing focus needlessly
			if (GetKeyState(VK_SHIFT) & GKS_DOWN)	// if context menu
				return(FALSE);	// keep dispatching (false alarm)
			Main->SetFocus();	// main frame must have focus to display menus
			Main->SendMessage(pMsg->message, pMsg->wParam, pMsg->lParam);	// enter menu mode
			return(TRUE);	// message was translated, stop dispatching
		}
		break;
	}
	return(FALSE);	// continue dispatching
}
开发者ID:victimofleisure,项目名称:ChordEase,代码行数:60,代码来源:ChordEase.cpp


示例13: GetNextDlgGroupItem

HWND WINAPI
GetNextDlgGroupItem(HWND hWndDlg, HWND hWndCtrl, BOOL fPrevious)
{
    if (!IsChild(hWndDlg,hWndCtrl))
        return (HWND)0;
    return GetWindow(hWndCtrl,(fPrevious)?GW_HWNDPREVGROUP:GW_HWNDNEXTGROUP);
}
开发者ID:ErisBlastar,项目名称:osfree,代码行数:7,代码来源:Dialog.c


示例14:

vector<LocalStmtPair> FakeDirectiveHandler::GenerateWritePairs(Stmt * Base,
                                                      SwitchStmt * Parent,
                                                      Stmt * Top) {

  vector<LocalStmtPair> Pairs;
  LocalStmtPair Pair;
  
  // Cond
  if (IsChild(Base, Parent->getCond())) {

    Pair.insertAfter = false;
    Pair.stmt = Top;
    Pairs.push_back(Pair);

  // Body
  } else {

    Pair.insertAfter = false;
    Pair.stmt = Base;
    Pairs.push_back(Pair);

  }

  return Pairs;

}
开发者ID:divot,项目名称:SpecCodeConv,代码行数:26,代码来源:FakeDirectiveHandler.cpp


示例15: VisitCompoundStmt

bool FakeDirectiveHandler::VisitCompoundStmt(CompoundStmt *S) {

  if (WaitingHeader) {

    CompilerInstance &CI = FullDirectives->GetCI(S->getLocStart());

    if (IsChild(S, WaitingHeader)) {
      return true;
    }

    FullDirectives->Push(WaitingDirective, WaitingHeader, S, CI);
    
    WaitingDirective = NULL;
    WaitingHeader = NULL;
    
    return true;
  
  } else {

    PragmaDirectiveMap::iterator it;
    
    it = Directives->find(S->getLocStart().getRawEncoding());
  
    if (it != Directives->end()) {
    
      WaitingHeader = S;
      WaitingDirective = it->second;
    
    }
    
    return true;
    
  }

}
开发者ID:divot,项目名称:SpecCodeConv,代码行数:35,代码来源:FakeDirectiveHandler.cpp


示例16: GetFocusedWidget

bool CWindowManager::CoreHandleEvent(CWidget *emitter, int event)
{
    if (CGroup::CoreHandleEvent(emitter, event))
        return true;
    
    if (event == EVENT_REQQUEUEDDRAW)
    {
        CWidget *focwidget = GetFocusedWidget();
        if (focwidget)
        {
            if ((focwidget != emitter) && !IsChild(emitter, focwidget))
                focwidget->RequestQueuedDraw();
        }
        
        return true;
    }
    else if (event == EVENT_REQUPDATE)
    {
        if (IsDirectChild(emitter, this))
        {
            m_WidgetQueue.push_back(emitter);
            UpdateLayout();
            PushEvent(EVENT_REQUPDATE);
            return true;
        }
    }
    
    return false;
}
开发者ID:BackupTheBerlios,项目名称:nixstaller-svn,代码行数:29,代码来源:windowmanager.cpp


示例17: HotKey

bool MenuBar::HotKey(dword key)
{
	if(Ctrl::HotKey(key))
		return true;
	if(IsChild()) {
		if((key == (K_ALT_KEY|K_KEYUP) || key == K_F10) && (submenu || HasFocusDeep())) {
			LLOG("CloseMenu()");
			CloseMenu();
			if(restorefocus)
				restorefocus->SetFocus();
			s_doaltkey = false;
			return true;
		}
		if(key == K_ALT_KEY) {
			LLOG("K_ALT_KEY");
			s_doaltkey = true;
			return true;
		}
		if((key == K_F10 || key == (K_ALT_KEY|K_KEYUP) && s_doaltkey)
		   && !submenu && !HasFocusDeep() && GetTopWindow() && GetTopWindow()->IsForeground()) {
			LLOG("Open menu by F10 or ALT-UP");
			SetupRestoreFocus();
			for(Ctrl *q = pane.GetFirstChild(); q; q = q->GetNext())
				if(q->SetFocus()) return true;
		}
	}
	LLOG("MenuBar::HotKey");
	return (key == K_LEFT || key == K_RIGHT) && parentmenu ? parentmenu->Key(key, 1) : false;
}
开发者ID:koz4k,项目名称:soccer,代码行数:29,代码来源:MenuBar.cpp


示例18: SyncBar

void BarCtrl::SyncBar()
{
	if(IsChild() && InFrame())
		UpdateParentLayout();
	else
		Layout();
}
开发者ID:AbdelghaniDr,项目名称:mirror,代码行数:7,代码来源:Bar.cpp


示例19: OnKillFocus

/////////////////////////////////////////////////////////////////////////////
// CControlTreeDate message handlers
// ---
void CControlTreeDate::OnKillFocus( CWnd* pNewWnd ) {
	CDateTimeCtrl::OnKillFocus(pNewWnd);
												
	if ( !pNewWnd || !IsChild(pNewWnd) ) {
		CMonthCalCtrl *pMonthCtrl = GetMonthCalCtrl();
		if ( !pMonthCtrl || pMonthCtrl->GetSafeHwnd() != pNewWnd->GetSafeHwnd() ) {
			CString str;
			GetWindowText( str );

			// Send Notification to parent of ListView ctrl
			TV_DISPINFO dispinfo;
			dispinfo.hdr.hwndFrom = GetParent()->GetSafeHwnd();
			dispinfo.hdr.idFrom = GetDlgCtrlID();
			dispinfo.hdr.code = TVN_ENDLABELEDIT;

			dispinfo.item.mask = TVIF_TEXT;
			dispinfo.item.hItem = m_hItem;
			dispinfo.item.pszText = m_bESC ? NULL : LPTSTR((LPCTSTR)str);
			dispinfo.item.cchTextMax = str.GetLength();

			GetParent()->GetParent()->SendMessage( WM_NOTIFY, GetParent()->GetDlgCtrlID(), (LPARAM)&dispinfo );

			PostMessage( WM_CLOSE );
		}
	}
}
开发者ID:hackshields,项目名称:antivirus,代码行数:29,代码来源:ControlTreeDate.cpp


示例20: SetFullScreen

BOOL CMiniPieFrame::PreTranslateMessage(MSG* pMsg)
{
	if(CFrameWindowImpl<CMiniPieFrame>::PreTranslateMessage(pMsg))
		return TRUE; 

	if((pMsg->message < WM_KEYFIRST || pMsg->message > WM_KEYLAST) &&
	   (pMsg->message < WM_MOUSEFIRST || pMsg->message > WM_MOUSELAST))
		return FALSE;

	if (m_bFullScreen && pMsg->message == WM_KEYUP && 
		(pMsg->wParam == VK_F1 ||  pMsg->wParam == VK_F2))
		SetFullScreen(false);

	HWND hWndCtl = ::GetFocus();
	if(IsChild(hWndCtl))
	{
		// find a direct child of the dialog from the window that has focus
		while(::GetParent(hWndCtl) != m_hWnd)
			hWndCtl = ::GetParent(hWndCtl);

		// give control a chance to translate this message
		if(::SendMessage(hWndCtl, WM_FORWARDMSG, 0, (LPARAM)pMsg) != 0)
			return TRUE;
	}

	return FALSE;
}
开发者ID:Bizonu,项目名称:amclibrary,代码行数:27,代码来源:MiniPieFrame.cpp



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


鲜花

握手

雷人

路过

鸡蛋
该文章已有0人参与评论

请发表评论

全部评论

专题导读
上一篇:
C++ IsClient函数代码示例发布时间:2022-05-30
下一篇:
C++ IsChecked函数代码示例发布时间:2022-05-30
热门推荐
阅读排行榜

扫描微信二维码

查看手机版网站

随时了解更新最新资讯

139-2527-9053

在线客服(服务时间 9:00~18:00)

在线QQ客服
地址:深圳市南山区西丽大学城创智工业园
电邮:jeky_zhao#qq.com
移动电话:139-2527-9053

Powered by 互联科技 X3.4© 2001-2213 极客世界.|Sitemap