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

C++ GetTabControl函数代码示例

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

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



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

示例1: dc

void CXTPColorDialog::SetNewColor(COLORREF clr, BOOL bNotify/*= TRUE*/)
{
	m_clrNew = clr;

	if (IsWindowVisible())
	{
		CClientDC dc(this);
		dc.FillSolidRect(&m_rcNew, m_clrNew);

		if (m_dwStyle & CPS_XTP_SHOWHEXVALUE)
		{
			m_wndHexEdit.SetWindowText(RGBtoHex(m_clrNew));
		}
	}

	if (bNotify && GetTabControl() && GetTabControl()->GetSafeHwnd())
	{
		int iPage;
		for (iPage = 0; iPage < GetPageCount(); ++iPage)
		{
			CWnd* pWnd = GetPage(iPage);

			if (::IsWindow(pWnd->GetSafeHwnd()))
			{
				pWnd->SendMessage(WM_XTP_UPDATECOLOR,
					(WPARAM)m_clrNew, (LPARAM)m_hWnd);
			}
		}
	}
}
开发者ID:lai3d,项目名称:ThisIsASoftRenderer,代码行数:30,代码来源:XTPColorDialog.cpp


示例2: GetClientRect

void CResizableSheet::PresetLayout()
{
	CWnd* pWnd;	// points to various children
	CRect wndrc, objrc;
	GetClientRect(&wndrc);

	// tab control or wizard line position
	if (m_psh.dwFlags & PSH_WIZARD)	// wizard mode
	{
		// get wizard line's bottom-right corner
		pWnd = GetDlgItem(ID_WIZLINE);

		// hide tab control
		GetTabControl()->ShowWindow(SW_HIDE);
	}
	else	// tabbed mode
	{
		// get tab control's bottom-right corner
		pWnd = GetTabControl();
	}
	// whatever it is, take the right margin
	pWnd->GetWindowRect(&objrc);
	ScreenToClient(&objrc);

	m_szLayoutTabLine.cx = objrc.right - wndrc.right;
	m_szLayoutTabLine.cy = objrc.bottom - wndrc.bottom;

	// get child dialog's bottom-right corner
	pWnd = GetActivePage();

	pWnd->GetWindowRect(&objrc);
	ScreenToClient(&objrc);

	m_szLayoutPage.cx = objrc.right - wndrc.right;
	m_szLayoutPage.cy = objrc.bottom - wndrc.bottom;

	// store buttons position
	for (int i = 0; i < 7; i++)
	{
		pWnd = GetDlgItem(_propButtons[i]);
		
		if (pWnd == NULL)
		{
			// invalid position, button does not exist
			// (just to initialize, any button you may activate
			// in the future is present, but hidden)
			m_szLayoutButton[i].cx = 0;
			m_szLayoutButton[i].cy = 0;
			continue;
		}
		
		pWnd->GetWindowRect(&objrc);
		ScreenToClient(&objrc);

		m_szLayoutButton[i].cx = objrc.left - wndrc.right;
		m_szLayoutButton[i].cy = objrc.top - wndrc.bottom;
	}
}
开发者ID:CCChaos,项目名称:RyzomCore,代码行数:58,代码来源:ResizableSheet.cpp


示例3: switch

void CEOSSPropertySheet::SetTabColor(int Tab,COLORREF Color)
{
	if (Tab != IDC_EOSSDATA_TAB) return;
	int ColorIndex;
	int tab = 0;
	switch(Color) {
	case COLOR_RED:
		ColorIndex = 0;
		break;
	case COLOR_GREEN:
		ColorIndex = 1;
		break;
	case COLOR_BLUE:
		ColorIndex = 2;
		break;
	case COLOR_YELLOW:
		ColorIndex = 3;
		break;
	case COLOR_CYAN:
		ColorIndex = 4;
		break;
	case COLOR_MAGENTA:
		ColorIndex = 5;
		break;
	case COLOR_WHITE:
		ColorIndex = 6;
		break;
	case COLOR_BLACK:
		ColorIndex = 7;
		break;
	case COLOR_GREENRED:
		ColorIndex = 8;
		break;
	case COLOR_BLUERED:
		ColorIndex = 9;
		break;
	case COLOR_REDYELLOW: // jfl, note map of status 3 to image 10
		ColorIndex = 10;
		break;
	default:
		ColorIndex = 6;
	};
	TC_ITEM pTabCtrlItem;
	pTabCtrlItem.mask = TCIF_IMAGE;
	pTabCtrlItem.iImage = ColorIndex;
	switch (Tab) {
	case IDC_EOSSDATA_TAB:			tab = 1; break;
//	case IDC_BINARYEOSSDATA_TAB:   tab = 2; break;
//	case IDC_UGRANDEOSSDATA_TAB:	tab = 3; break;
//	case IDC_GPSDATA_TAB:			tab = 3; break;
//	case IDC_VACOSSDATA_TAB:		tab = 4; break;
	};
	GetTabControl()->SetItem(tab,&pTabCtrlItem);
	GetTabControl()->Invalidate();
}
开发者ID:hnordquist,项目名称:MIC,代码行数:55,代码来源:EOSSSafePS.cpp


示例4: GetWindowRect

void CResizableSheet::PresetLayout()
{
	// set the initial size as the min track size
	CRect rc;
	GetWindowRect(&rc);
	SetMinTrackSize(rc.Size());

	if (GetStyle() & WS_CHILD)
	{
		GetClientRect(&rc);
		GetTabControl()->MoveWindow(&rc);
	}

	if (IsWizard())	// wizard mode
	{
		// hide tab control
		GetTabControl()->ShowWindow(SW_HIDE);

		AddAnchor(ID_WIZLINE, BOTTOM_LEFT, BOTTOM_RIGHT);
	}
	else	// tab mode
	{
		AddAnchor(AFX_IDC_TAB_CONTROL, TOP_LEFT, BOTTOM_RIGHT);
	}

	// add a callback for active page (which can change at run-time)
	m_nCallbackID = AddAnchorCallback();

	// use *total* parent size to have correct margins
	CRect rectPage, rectSheet;
	GetTotalClientRect(&rectSheet);

	GetActivePage()->GetWindowRect(&rectPage);
	::MapWindowPoints(NULL, m_hWnd, (LPPOINT)&rectPage, 2);

	// pre-calculate margins
	m_sizePageTL = rectPage.TopLeft() - rectSheet.TopLeft();
	m_sizePageBR = rectPage.BottomRight() - rectSheet.BottomRight();

	// add all possible buttons, if they exist
	for (int i = 0; i < _propButtonsCount; i++)
	{
		if (NULL != GetDlgItem(_propButtons[i]))
			AddAnchor(_propButtons[i], BOTTOM_RIGHT);
	}

	// prevent flickering
	GetTabControl()->ModifyStyle(0, WS_CLIPSIBLINGS);
}
开发者ID:KristinaTaylor,项目名称:TortoiseSI,代码行数:49,代码来源:ResizableSheet.cpp


示例5: ASSERT_VALID

//***************************************************************************************
void CBCGPropertySheet::AddPageToTree (CBCGPropSheetCategory* pCategory, 
									   CBCGPropertyPage* pPage, int nIconNum,
									   int nSelIconNum)
{
	ASSERT_VALID (this);
	ASSERT_VALID (pPage);
	ASSERT (m_look == PropSheetLook_Tree);

	if (pCategory != NULL)
	{
		ASSERT_VALID (pCategory);
		pCategory->m_lstPages.AddTail (pPage);
	}

	pPage->m_pCategory = pCategory;
	pPage->m_nIcon = nIconNum;
	pPage->m_nSelIconNum = nSelIconNum;

	CPropertySheet::AddPage (pPage);

	if (GetSafeHwnd () != NULL)
	{
		CTabCtrl* pTab = GetTabControl ();
		ASSERT_VALID (pTab);

		InternalAddPage (pTab->GetItemCount () - 1);
	}
}
开发者ID:SnipeDragon,项目名称:gamecq,代码行数:29,代码来源:BCGPropertySheet.cpp


示例6: ModifyStyleEx

BOOL OptionsDialog::OnInitDialog() 
{
  CPropertySheet::OnInitDialog();

  // Enable context sensitive help
  ModifyStyleEx(0,WS_EX_CONTEXTHELP);

  // Create the font to use
  m_font.CreateFontIndirect(&m_logFont);

  // Set the font for the property pages
  ChangeDialogFont(this,&m_font);
  CPropertyPage* page = GetActivePage();
  for (int i = 0; i < GetPageCount(); i++)
  {
    SetActivePage(i);
    CPropertyPage* page = GetActivePage();
    ChangeDialogFont(page,&m_font);
  }
  SetActivePage(page);

  // Resize the property page
  CTabCtrl* tab = GetTabControl();
  tab->GetWindowRect(&m_page);
  ScreenToClient(&m_page);
  tab->AdjustRect(FALSE,&m_page);
  page->MoveWindow(&m_page);

  return TRUE;
}
开发者ID:DavidKinder,项目名称:Windows-Frotz,代码行数:30,代码来源:FrotzDialogs.cpp


示例7: CRect

BOOL CPropSheet::OnInitDialog() 
{
	BOOL bResult = CPropertySheet::OnInitDialog();
	
	// TODO: Add your specialized code here
	CRect rect, tabrect;// = CRect (800, 440, 950, 645);//, tabrect;
	int width;

	//Get button sizes and positions
	GetDlgItem(IDCANCEL)->GetWindowRect(rect);
	GetTabControl()->GetWindowRect(tabrect);
	ScreenToClient(rect); ScreenToClient(tabrect);
	
	//New button - width, height and Y-coordiate of IDOK
	//           - X-coordinate of tab control
	width = rect.Width();
	rect.left = tabrect.left; rect.right = tabrect.left + width;
	CString FeedbackChoice = GetGlobal("FeedbackChoice");
	CString FeedbackButtonName = GetGlobal("FeedbackButtonName");
	if (FeedbackChoice.Compare("Yes") == 0)
	{
	//Create new "Add" button and set standard font
	m_ButtonCopy.Create(FeedbackButtonName,
			BS_PUSHBUTTON|WS_CHILD|WS_VISIBLE|WS_TABSTOP,
			rect, this, IDC_FEEDBACK_BUTTON);
	m_ButtonCopy.SetFont(GetFont());
	}
	else
	;
	SetIcon(AfxGetApp()->LoadIcon(IDR_MAINFRAME), FALSE);
	SetIcon(AfxGetApp()->LoadIcon(IDR_MAINFRAME), TRUE);
	return bResult;
}
开发者ID:EdgarChen,项目名称:mozilla-cvs-history,代码行数:33,代码来源:PropSheet.cpp


示例8: MinMaxInfo

void CResizableSheet::OnGetMinMaxInfo(MINMAXINFO FAR* lpMMI) 
{
	MinMaxInfo(lpMMI);

	CTabCtrl* pTab = GetTabControl();
	if (!pTab)
		return;

	int nCount = GetPageCount();
	for (int idx = 0; idx < nCount; ++idx)
	{
		if (IsWizard())	// wizard mode
		{
			// use pre-calculated margins
			CRect rectExtra(-CPoint(m_sizePageTL), -CPoint(m_sizePageBR));
			// add non-client size
			::AdjustWindowRectEx(&rectExtra, GetStyle(), !(GetStyle() & WS_CHILD) &&
				::IsMenu(GetMenu()->GetSafeHmenu()), GetExStyle());
			ChainMinMaxInfo(lpMMI, *GetPage(idx), rectExtra.Size());
		}
		else	// tab mode
		{
			ChainMinMaxInfoCB(lpMMI, *GetPage(idx));
		}
	}
}
开发者ID:KristinaTaylor,项目名称:TortoiseSI,代码行数:26,代码来源:ResizableSheet.cpp


示例9: PropSheet_GetCurrentPageHwnd

void CTreePropSheet::UpdateCaption()
{
	HWND			hPage = PropSheet_GetCurrentPageHwnd(GetSafeHwnd());
	BOOL			bRealPage = IsWindow(hPage) && ::IsWindowVisible(hPage);
	HTREEITEM	hItem = m_pwndPageTree->GetSelectedItem();
	if (!hItem)
		return;
	CString		strCaption = m_pwndPageTree->GetItemText(hItem);

	// if empty page, then update empty page message
	if (!bRealPage)
		m_pFrame->SetMsgText(GenerateEmptyPageMessage(m_strEmptyPageMessage, strCaption));

	// if no captions are displayed, cancel here
	if (!m_pFrame->GetShowCaption())
		return;

	// get tab control, to the the images from
	CTabCtrl	*pTabCtrl = GetTabControl();
	if (!IsWindow(pTabCtrl->GetSafeHwnd()))
	{
		ASSERT(FALSE);
		return;
	}

	if (m_bTreeImages)
	{
		// get image from tree
		int	nImage;
		m_pwndPageTree->GetItemImage(hItem, nImage, nImage);
		HICON	hIcon = m_Images.ExtractIcon(nImage);
		m_pFrame->SetCaption(strCaption, hIcon);
		if (hIcon)
			DestroyIcon(hIcon);
	}
	else if (bRealPage)
	{
		// get image from hidden (original) tab provided by the original
		// implementation
		CImageList	*pImages = pTabCtrl->GetImageList();
		if (pImages)
		{
			TCITEM	ti;
			ZeroMemory(&ti, sizeof(ti));
			ti.mask = TCIF_IMAGE;

			HICON	hIcon = NULL;
			if (pTabCtrl->GetItem((int)m_pwndPageTree->GetItemData(hItem), &ti))
				hIcon = pImages->ExtractIcon(ti.iImage);

			m_pFrame->SetCaption(strCaption, hIcon);
			if (hIcon)
				DestroyIcon(hIcon);
		}
		else
			m_pFrame->SetCaption(strCaption);
	}
	else
		m_pFrame->SetCaption(strCaption);
}
开发者ID:elha,项目名称:CDex,代码行数:60,代码来源:TreePropSheet.cpp


示例10: ScreenToClient

void CitPropertySheet::listinit()
{
	LVITEM lvi;
	::ZeroMemory(&lvi,sizeof(lvi));

	CHeaderCtrl* pHeader=m_wndList.GetHeaderCtrl();
	pHeader->ShowWindow(SW_HIDE);

	CRect rectList;
	m_wndList.GetWindowRect(&rectList);
	ScreenToClient(&rectList);
	//添加列表头,前面已经隐藏
	m_wndList.InsertColumn(0,_T("设置"),LVCFMT_CENTER,rectList.Width(),0);
	CString str;
	CTabCtrl* pTab=GetTabControl();
	TCITEM tci;
	::ZeroMemory(&tci,sizeof(tci));
	tci.mask=TCIF_TEXT;
	tci.cchTextMax=256;
	TCHAR szBuf[256]={0};
	tci.pszText=szBuf;
	for(int idxPge=0;idxPge<GetPageCount();idxPge++)
	{
		if(pTab->GetItem(idxPge,&tci))
		{
			lvi.iItem=idxPge;
			lvi.iSubItem=0;
			//lvi.iImage=idxPge;
			lvi.mask=LVIF_TEXT; //LVIF_IMAGE;
			lvi.pszText=tci.pszText;
			m_wndList.InsertItem(&lvi);
		}
	}
}
开发者ID:DLive,项目名称:itbook,代码行数:34,代码来源:itPropertySheet.cpp


示例11: GetTabControl

void CResizableSheet::PresetLayout()
{
	if (IsWizard())	// wizard mode
	{
		// hide tab control
		GetTabControl()->ShowWindow(SW_HIDE);

		AddAnchor(ID_WIZLINE, BOTTOM_LEFT, BOTTOM_RIGHT);
	}
	else	// tab mode
	{
		AddAnchor(AFX_IDC_TAB_CONTROL, TOP_LEFT, BOTTOM_RIGHT);
	}

	// add a callback for active page (which can change at run-time)
	AddAnchorCallback(1);

	// use *total* parent size to have correct margins
	CRect rectPage, rectSheet;
	GetTotalClientRect(&rectSheet);

	GetActivePage()->GetWindowRect(&rectPage);
	ScreenToClient(&rectPage);

	// pre-calculate margins
	m_sizePageTL = rectPage.TopLeft() - rectSheet.TopLeft();
	m_sizePageBR = rectPage.BottomRight() - rectSheet.BottomRight();

	// add all possible buttons, if they exist
	for (int i = 0; i < 7; i++)
	{
		if (NULL != GetDlgItem(_propButtons[i]))
			AddAnchor(_propButtons[i], BOTTOM_RIGHT);
	}
}
开发者ID:segafan,项目名称:Construct-classic,代码行数:35,代码来源:ResizableSheet.cpp


示例12: ZeroMemory

void CResizableSheet::SaveWindowRect()
{
	CString data;
	WINDOWPLACEMENT wp;

	ZeroMemory(&wp, sizeof(WINDOWPLACEMENT));
	wp.length = sizeof(WINDOWPLACEMENT);
	GetWindowPlacement(&wp);
	
	RECT& rc = wp.rcNormalPosition;	// alias

	// also saves active page index, zero (the first) if problems
	// cannot use GetActivePage, because it always fails
	CTabCtrl *pTab = GetTabControl();
	int page = 0;

	if (pTab != NULL) 
		page = pTab->GetCurSel();
	if (page < 0)
		page = 0;

	// always save page
	data.Format(PROFILE_FMT, rc.left, rc.top,
		rc.right, rc.bottom, wp.showCmd, wp.flags, page);

	AfxGetApp()->WriteProfileString(m_sSection, m_sEntry, data);
}
开发者ID:CCChaos,项目名称:RyzomCore,代码行数:27,代码来源:ResizableSheet.cpp


示例13: GetActivePage

BOOL CCustomPropSheet::OnInitDialog(void)
{
	__super::OnInitDialog();

	// get the font for the first active page
	CPropertyPage* pCurPage = GetActivePage();
	ASSERT(pCurPage != NULL);

	// change the font for the sheet
	ChangeDialogFont(this, &m_fontPage, CDF_CENTER);

	// change the font for each page
	for (int i = 0, cPages = GetPageCount(); i < cPages; ++i)
	{
		CPropertyPage* pPage = GetPage(i);
		ASSERT(pPage != NULL);
#if !defined(_BUGFIX_)
		ChangeDialogFont(pPage, &m_fontPage, CDF_CENTER);
#else
		ChangeDialogFont(pPage, &m_fontPage, CDF_TOPLEFT);
#endif   // _BUGFIX_
	}

	// set and save the size of the page
	CTabCtrl* pTab = GetTabControl();
	ASSERT(pTab != NULL);

	if ((m_psh.dwFlags & PSH_WIZARD) != 0)
	{
		pTab->ShowWindow(SW_HIDE);
#if !defined(_BUGFIX_)
		GetClientRect(&m_rcPage);
		CWnd* pButton = GetDlgItem(ID_WIZBACK);
		ASSERT(pButton != NULL);
		CRect rectButton;
		pButton->GetWindowRect(rectButton);
		ScreenToClient(rectButton);
		m_rcPage.bottom = rectButton.top - 2;
#else
		CRect rectDivider;
		CWnd* pDivider = GetDlgItem(0x3026);
		ASSERT(pDivider != NULL);
		pDivider->GetWindowRect(rectDivider);
		ScreenToClient(rectDivider);
		m_rcPage.bottom = rectDivider.top - 2;
#endif   // _BUGFIX_
	}
	else
	{
		pTab->GetWindowRect(&m_rcPage);
		ScreenToClient(&m_rcPage);
		pTab->AdjustRect(FALSE, &m_rcPage);
	}

	// resize the page
	pCurPage->MoveWindow(&m_rcPage);

	return (TRUE);
}
开发者ID:zephyrer,项目名称:update-it,代码行数:59,代码来源:CustomPropSheet.cpp


示例14: GetTabControl

BOOL CTreePropSheet::SelectCurrentPageTreeItem()
{
	CTabCtrl	*pTab = GetTabControl();
	if (!IsWindow(pTab->GetSafeHwnd()))
		return FALSE;

	return SelectPageTreeItem(pTab->GetCurSel());
}
开发者ID:elha,项目名称:CDex,代码行数:8,代码来源:TreePropSheet.cpp


示例15: GetTabControl

//****************************************************************************************
void CBCGPropertySheet::InternalAddPage (int nTab)
{
	CTabCtrl* pTab = GetTabControl ();
	ASSERT_VALID (pTab);

	TCHAR szTab [256];

	TCITEM item;
	item.mask = TCIF_TEXT;
	item.cchTextMax = 255;
	item.pszText = szTab;

	pTab->GetItem (nTab, &item);

	if (m_wndOutlookBar.GetSafeHwnd () != NULL)
	{
		HICON hIcon = m_Icons.ExtractIcon (nTab);
		m_wndOutlookBar.AddButton (hIcon, szTab, 0, (UINT) -1, (UINT) -1, m_bAlphaBlendIcons);
		::DestroyIcon (hIcon);
	}

	if (m_wndTree.GetSafeHwnd () != NULL)
	{
		CBCGPropertyPage* pPage = DYNAMIC_DOWNCAST (CBCGPropertyPage, GetPage (nTab));
		if (pPage == NULL)
		{
			ASSERT (FALSE);
			return;
		}

		HTREEITEM hParent = NULL;
		if (pPage->m_pCategory != NULL)
		{
			ASSERT_VALID (pPage->m_pCategory);
			hParent = pPage->m_pCategory->m_hTreeItem;
		}

		HTREEITEM hTreeItem = m_wndTree.InsertItem (szTab, 
			I_IMAGECALLBACK, I_IMAGECALLBACK, hParent);
		m_wndTree.SetItemData (hTreeItem, (DWORD_PTR) pPage);
		pPage->m_hTreeNode = hTreeItem;
	}

	if (m_wndTab.GetSafeHwnd () != NULL)
	{
		CBCGPropertyPage* pPage = DYNAMIC_DOWNCAST (CBCGPropertyPage, GetPage (nTab));
		if (pPage == NULL)
		{
			ASSERT (FALSE);
			return;
		}

		UINT uiImage = m_Icons.GetSafeHandle () == NULL ? (UINT)-1 : nTab;

		m_wndTab.AddTab (pPage, szTab, uiImage);
	}
}
开发者ID:SnipeDragon,项目名称:gamecq,代码行数:58,代码来源:BCGPropertySheet.cpp


示例16: GetTabControl

BOOL CMsgAllSheet::OnInitDialog() 
{
	BOOL bResult = CPropertySheet::OnInitDialog();
	
	// TODO: Add your specialized code here
	//设置
	TC_ITEM item;
	item.mask = TCIF_TEXT;
	item.pszText = "ESM侦查信息";	
	GetTabControl()->SetItem(0, &item);
	item.mask = TCIF_TEXT;
	item.pszText = "通讯信息";
	GetTabControl()->SetItem(1, &item);
	item.mask = TCIF_TEXT;
	item.pszText = "航迹信息";
	GetTabControl()->SetItem(2, &item);

	return bResult;
}
开发者ID:clouddessert,项目名称:NewPrj,代码行数:19,代码来源:MsgAllSheet.cpp


示例17:

CSynBCGPEditView * CCoolFormat3View::GetSynView()
{
	//获取TAB数 返回动态绑定
	CSynBCGPEditView *pView = NULL;
	if (GetTabControl().GetTabsNum() > 0)
	{
		pView = DYNAMIC_DOWNCAST(CSynBCGPEditView, m_wndTabs.GetTabWnd(0));
	}
	return pView;
}
开发者ID:20400992,项目名称:CoolFormat,代码行数:10,代码来源:CoolFormat3View.cpp


示例18: GetTabControl

void CAdminView::LoadAllUserInfo(void)
{
	CBCGPTabWnd&  TabWnd = GetTabControl();	
	CUsersView* pUserView = (CUsersView*)TabWnd.GetTabWnd(0);
	if(pUserView)
		pUserView->LoadAllUserInfo();
	CSessionsView* pSessionView = (CSessionsView*)TabWnd.GetTabWnd(1);
	if(pSessionView)
		pSessionView->LoadAliveUserInfo();
}
开发者ID:liquanhai,项目名称:cxm-hitech-matrix428,代码行数:10,代码来源:AdminView.cpp


示例19: GetTabControl

BOOL CResizableSheet::OnInitDialog() 
{
	BOOL bResult = CPropertySheet::OnInitDialog();

	// prevent flickering
	GetTabControl()->ModifyStyle(0, WS_CLIPSIBLINGS);

	m_bInitDone = TRUE;

	return bResult;
}
开发者ID:CCChaos,项目名称:RyzomCore,代码行数:11,代码来源:ResizableSheet.cpp


示例20: AddTreeView

/*--------------------------------------------------------------------
FUNCTION:	AddTreeView();
RETURNS:	<void>
PURPOSE:	Adds the tree view control to the standard
			property sheet.
--------------------------------------------------------------------*/
void		CTreePropertySheet::AddTreeView()
{
	// Insert the space to the left
	int		nAddSpace=m_nTreeWidth+m_nSpaceLeft;
	int		nLeft=nAddSpace/2;
	int		nRight=(nAddSpace-nLeft);
	int		nTopOfTreeView;
	CRect	rcWindow,rcPage,rcTab;

	GetWindowRect(&rcWindow);
	rcWindow.left-=nLeft;
	rcWindow.right+=nRight;
	MoveWindow(&rcWindow,FALSE);

	GetPage(0)->GetWindowRect(&rcPage);
	ScreenToClient(&rcPage);
	GetTabControl()->GetWindowRect(&rcTab);
	ScreenToClient(&rcTab);

	ScrollWindow(nAddSpace,0);

	if(m_bSpecialCaption)
		nTopOfTreeView	=rcPage.top;
	else
		nTopOfTreeView	=rcPage.top-m_nCaptionHeight;

 
  // added in version 3.50 for Wine - otherwise tree view was in wrong place
  nTopOfTreeView = 5;

  // NJG - added  TVS_SHOWSELALWAYS

  
	m_cTreeCtrl.CWnd::CreateEx(WS_EX_CLIENTEDGE,
							 WC_TREEVIEW, 
							 NULL, 
							 WS_CHILD|WS_VISIBLE|WS_TABSTOP|TVS_SHOWSELALWAYS|
							 TVS_HASLINES|TVS_LINESATROOT|TVS_HASBUTTONS, 
							 m_nSpaceLeft,nTopOfTreeView,m_nTreeWidth,rcTab.bottom-nTopOfTreeView+5,
							 GetSafeHwnd(), 
							 (HMENU)ID_TREECTRL);

  
  BOOL bIsUnicode;


#ifdef UNICODE
  bIsUnicode = TreeView_SetUnicodeFormat (m_cTreeCtrl.m_hWnd, 1);
#else
  bIsUnicode = TreeView_SetUnicodeFormat (m_cTreeCtrl.m_hWnd, 0);
#endif


}
开发者ID:RKelson93,项目名称:mushclient,代码行数:60,代码来源:TreePropertySheet.cpp



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


鲜花

握手

雷人

路过

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

请发表评论

全部评论

专题导读
上一篇:
C++ GetTableSelection函数代码示例发布时间:2022-05-30
下一篇:
C++ GetSystemTimeAsFileTime函数代码示例发布时间: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