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


C++ TabCtrl_GetItemCount函数代码示例

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


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

示例1: Dialog

CDisasm::CDisasm(HINSTANCE _hInstance, HWND _hParent, DebugInterface *_cpu) : Dialog((LPCSTR)IDD_DISASM, _hInstance, _hParent)
{
	cpu = _cpu;

	SetWindowText(m_hDlg,_cpu->GetName());
#ifdef THEMES
	//if (WTL::CTheme::IsThemingSupported())
		//EnableThemeDialogTexture(m_hDlg ,ETDT_ENABLETAB);
#endif
	SetWindowPos(m_hDlg,0,500,200,0,0,SWP_NOSIZE);

	CtrlDisAsmView *ptr = CtrlDisAsmView::getFrom(GetDlgItem(m_hDlg,IDC_DISASMVIEW));
	ptr->setDebugger(cpu);
	ptr->gotoAddr(0x00000000);

	CtrlRegisterList *rl = CtrlRegisterList::getFrom(GetDlgItem(m_hDlg,IDC_REGLIST));

  rl->setCPU(cpu);

	GetWindowRect(m_hDlg,&minRect);

	//symbolMap.FillSymbolListBox(GetDlgItem(m_hDlg, IDC_FUNCTIONLIST),ST_FUNCTION);
	symbolMap.FillSymbolComboBox(GetDlgItem(m_hDlg, IDC_FUNCTIONLIST),ST_FUNCTION);

	GetWindowRect(GetDlgItem(m_hDlg, IDC_REGLIST),&regRect);
	GetWindowRect(GetDlgItem(m_hDlg, IDC_DISASMVIEW),&disRect);

	HWND tabs = GetDlgItem(m_hDlg, IDC_LEFTTABS);

	TCITEM tcItem;
	ZeroMemory (&tcItem,sizeof (tcItem));
	tcItem.mask			= TCIF_TEXT;
	tcItem.dwState		= 0;
	tcItem.pszText		= "Regs";
	tcItem.cchTextMax	= (int)strlen(tcItem.pszText)+1;
	tcItem.iImage		= 0;
	int result1 = TabCtrl_InsertItem(tabs, TabCtrl_GetItemCount(tabs),&tcItem);
	tcItem.pszText		= "Funcs";
	tcItem.cchTextMax	= (int)strlen(tcItem.pszText)+1;
	int result2 = TabCtrl_InsertItem(tabs, TabCtrl_GetItemCount(tabs),&tcItem);
	ShowWindow(GetDlgItem(m_hDlg, IDC_REGLIST), SW_NORMAL);
	ShowWindow(GetDlgItem(m_hDlg, IDC_FUNCTIONLIST), SW_HIDE);
	SetTimer(m_hDlg,1,1000,0);
	/*
	DWORD intAddress[14] =
	{0x100, 0x200,0x300,0x400,0x500,0x600,0x700,0x800,0x900,0xc00,0xd00,0xf00,0x1300,0x1700};
	char *intName[14] = 
	{"100 Reset","200 Mcheck", "300 DSI","400 ISI","500 External",
	"600 Align","700 Program","800 FPU N/A","900 DEC","C00 SC",
	"D00 Trace","F00 Perf","1300 Breakpt","1700 Thermal"};*/

	//
	// --- activate debug mode ---
	//

	SetDebugMode(true);
}
开发者ID:Bennieboj,项目名称:ppsspp,代码行数:57,代码来源:Debugger_Disasm.cpp

示例2: ZeroMemory

HWND TabControl::AddTabWindow(wchar_t* className, wchar_t* title, DWORD style)
{
    style |= WS_CHILD;

    TCITEM tcItem;
    ZeroMemory (&tcItem,sizeof (tcItem));
    tcItem.mask			= TCIF_TEXT;
    tcItem.dwState		= 0;
    tcItem.pszText		= title;
    tcItem.cchTextMax	= (int)wcslen(tcItem.pszText)+1;
    tcItem.iImage		= 0;

    int index = TabCtrl_GetItemCount(hwnd);
    int result = TabCtrl_InsertItem(hwnd,index,&tcItem);

    RECT tabRect;
    GetWindowRect(hwnd,&tabRect);
    MapWindowPoints(HWND_DESKTOP,GetParent(hwnd),(LPPOINT)&tabRect,2);
    TabCtrl_AdjustRect(hwnd, FALSE, &tabRect);

    HWND tabHandle = CreateWindowEx(0,className,title,style,
                                    tabRect.left,tabRect.top,tabRect.right-tabRect.left,tabRect.bottom-tabRect.top,
                                    GetParent(hwnd),0,MainWindow::GetHInstance(),0);
    tabs.push_back(tabHandle);

    ShowTab(index);
    return tabHandle;
}
开发者ID:Gary1234567,项目名称:ppsspp,代码行数:28,代码来源:TabControl.cpp

示例3: TabToFront

int TabToFront(HWND TabWindow, int Index)
{
	assert(IsWindow(TabWindow));

	if(Index == -1)
		Index = TabCtrl_GetCurSel(TabWindow);

	if(Index == -1)
		Index = 0;

	assert(Index >= 0);
	assert(Index < TabCtrl_GetItemCount(TabWindow));

	TC_ITEM TabData;
	TabData.mask = TCIF_PARAM;

	if(TabCtrl_GetItem(TabWindow, Index, &TabData))
	{
		ShowWindow(static_cast<HWND>(GetProp(TabWindow, PropName)), SW_HIDE);
		SetWindowPos(reinterpret_cast<HWND>(TabData.lParam), HWND_TOP, 0, 0, 0, 0, SWP_SHOWWINDOW | SWP_NOMOVE | SWP_NOSIZE);
		SetProp(TabWindow, PropName, reinterpret_cast<HANDLE>(TabData.lParam));
		TabCtrl_SetCurSel(TabWindow, Index);
		return Index;
	}
	return -1;
}
开发者ID:pezcode,项目名称:FireFly,代码行数:26,代码来源:tabs.cpp

示例4: HexCreateNewFile

BOOL HexCreateNewFile(MAINWND *mainWnd)
{
	// create a new
	int count;

	TCITEM tci = { TCIF_TEXT|TCIF_PARAM, 0, 0, TEXT("(Untitled)"), 0, 0 }; 
	
	tci.lParam = (LPARAM)CreateHexViewCtrl(mainWnd->hwndMain);

	g_fFileChanged   = FALSE;

	// reset to an empty file
	SetWindowFileName(mainWnd->hwndMain, TEXT("Untitled"), FALSE, FALSE);

	g_szFileTitle[0] = '\0';
	g_szFileName[0]  = '\0';
	g_fFileChanged   = FALSE;
	
	// insert at the end of the tab-list
	count = TabCtrl_GetItemCount(mainWnd->hwndTabView);
	TabCtrl_InsertItem(mainWnd->hwndTabView, count, &tci);
	
	HexSetCurFile(mainWnd->hwndMain, count, TRUE);
	return TRUE;
}
开发者ID:avplayer,项目名称:avdbg,代码行数:25,代码来源:OpenSave.c

示例5: wxASSERT

size_t wxNotebook::GetPageCount() const
{
    // consistency check
    wxASSERT( (int)m_pages.Count() == TabCtrl_GetItemCount(GetHwnd()) );

    return m_pages.Count();
}
开发者ID:chromylei,项目名称:third_party,代码行数:7,代码来源:notebook.cpp

示例6: ActivatePrevChild

static void ActivatePrevChild(struct ParentWindowData *dat, HWND child)
{
	int i = GetTabFromHWND(dat, child);
	int l = TabCtrl_GetItemCount(dat->hwndTabs);
	i = (i+l-1) % l;
	ActivateChild(dat, GetChildFromTab(dat->hwndTabs, i)->hwnd);
}
开发者ID:BackupTheBerlios,项目名称:mgoodies-svn,代码行数:7,代码来源:msgwindow.c

示例7: SkinEdit_Invoke

static INT_PTR SkinEdit_Invoke(WPARAM wParam, LPARAM lParam)
{
	SKINDESCRIPTION *psd = (SKINDESCRIPTION *)lParam;
	TCITEM tci = {0};
	RECT rcClient;
	int iTabs;

	if (psd->cbSize != sizeof(SKINDESCRIPTION))
		return 0;

	iTabs = TabCtrl_GetItemCount(psd->hWndTab);
	GetClientRect(psd->hWndParent, &rcClient);

	tci.mask = TCIF_PARAM|TCIF_TEXT;
	tci.lParam = (LPARAM)CreateDialogParam(g_hInst, MAKEINTRESOURCE(IDD_SKINITEMEDIT), psd->hWndParent, SkinEdit_ExtBkDlgProc, (LPARAM)psd);

	tci.pszText = TranslateT("Skin items");
	TabCtrl_InsertItem(psd->hWndTab, iTabs++, &tci);
	MoveWindow((HWND)tci.lParam, 5, 25, rcClient.right - 9, rcClient.bottom - 60, 1);
	psd->hwndSkinEdit = (HWND)tci.lParam;

	/*
	tci.lParam = (LPARAM)CreateDialogParam(g_hInst, MAKEINTRESOURCE(IDD_IMAGEITEMEDIT), psd->hWndParent, SkinEdit_ImageItemEditProc, (LPARAM)psd);
	tci.pszText = TranslateT("Image items");
	TabCtrl_InsertItem(psd->hWndTab, iTabs++, &tci);
	MoveWindow((HWND)tci.lParam, 5, 25, rcClient.right - 9, rcClient.bottom - 60, 1);
	psd->hwndImageEdit = (HWND)tci.lParam;
	*/

	return (INT_PTR)psd->hwndSkinEdit;
}
开发者ID:biddyweb,项目名称:miranda-ng,代码行数:31,代码来源:main.cpp

示例8: AddTab

int AddTab(HWND TabWindow, HWND Window, const TCHAR* Caption, int Index)
{
	assert(IsWindow(TabWindow));
	assert(IsWindow(Window));
	assert(Caption);

	if(Index == -1)
		Index = TabCtrl_GetItemCount(TabWindow);

	assert(Index >= 0);

	TC_ITEM TabData;
	TabData.mask       = TCIF_TEXT | TCIF_PARAM;
	TabData.pszText    = const_cast<TCHAR*>(Caption);
	TabData.cchTextMax = _tcslen(Caption) + 1;
	TabData.lParam     = reinterpret_cast<LPARAM>(Window);

	Index = TabCtrl_InsertItem(TabWindow, Index, &TabData);
	if(Index != -1)
	{
		RECT TabRect;
		GetWindowRect(TabWindow, &TabRect);
		MapWindowPoints(HWND_DESKTOP, GetParent(TabWindow), reinterpret_cast<POINT*>(&TabRect), 2);
		TabCtrl_AdjustRect(TabWindow, false, &TabRect);
		TabRect.right  -= TabRect.left; // .right  == width
		TabRect.bottom -= TabRect.top;  // .bottom == heigth
		SetWindowPos(Window, HWND_BOTTOM, TabRect.left, TabRect.top, TabRect.right, TabRect.bottom, SWP_HIDEWINDOW);
		SetProp(TabWindow, PropName, Window);
		SetTabThemeTexture(Window, true);
	}
	return Index;
}
开发者ID:pezcode,项目名称:FireFly,代码行数:32,代码来源:tabs.cpp

示例9: populateAll

/**
 * popuplate the side bar with all sessions inside the current window. Information
 * is gathered from the tab control, which remains active (but invisible) when the
 * switch bar is in use.
 *
 * This is needed when the user switches from tabs to a switchbar layout while a
 * window is open.
 */
void CSideBar::populateAll()
{
	HWND	hwndTab = ::GetDlgItem(m_pContainer->hwnd, IDC_MSGTABS);
	if (hwndTab == NULL)
		return;

	int iItems = (int)TabCtrl_GetItemCount(hwndTab);

	TCITEM item = { 0 };
	item.mask = TCIF_PARAM;

	m_iTopButtons = 0;

	for (int i = 0; i < iItems; i++) {
		TabCtrl_GetItem(hwndTab, i, &item);
		if (item.lParam == 0 || !IsWindow((HWND)item.lParam))
			continue;

		TWindowData *dat = (TWindowData*)::GetWindowLongPtr((HWND)item.lParam, GWLP_USERDATA);
		if (dat == NULL)
			continue;

		CSideBarButton *b_item = findSession(dat);
		if (b_item == NULL)
			addSession(dat, i);
		else {
			b_item->setLayout(m_currentLayout);
			if (m_dwFlags & SIDEBARLAYOUT_VERTICALORIENTATION) {
				b_item->measureItem();
				m_topHeight += b_item->getHeight() + 1;
			}
			else m_topHeight += m_elementHeight + 1;
		}
	}
}
开发者ID:Seldom,项目名称:miranda-ng,代码行数:43,代码来源:sidebar.cpp

示例10: TabCtrl_GetItemCount

void Explorerplusplus::SetTabIcon(int iTabId)
{
	LPITEMIDLIST pidl = NULL;
	TCITEM tcItem;
	int nTabs;
	int i = 0;

	pidl = m_pShellBrowser[iTabId]->QueryCurrentDirectoryIdl();

	nTabs = TabCtrl_GetItemCount(m_hTabCtrl);

	for(i = 0;i < nTabs;i++)
	{
		tcItem.mask = TCIF_PARAM;
		TabCtrl_GetItem(m_hTabCtrl,i,&tcItem);

		if((int)tcItem.lParam == iTabId)
		{
			SetTabIcon(i,iTabId,pidl);
			break;
		}
	}

	CoTaskMemFree(pidl);
}
开发者ID:linquize,项目名称:explorerplus-custom,代码行数:25,代码来源:HandleWindowState.cpp

示例11: File_Addify

void File_Addify(HWND hwndChild, HWND hwndEdit, LPTSTR pszFile)
{
    LPFILEINFO lpfi;
    TC_ITEM tci;

    lpfi = (LPFILEINFO)Mem_Alloc(sizeof(FILEINFO));

    _tcscpy(lpfi->szFileName, pszFile);

    if (String_NumEqual(pszFile, _T("Edit1"), 5, TRUE))
            lpfi->dwFileType |= FI_TYPE_MASK_FIRST;

    SetWindowLong(hwndChild, GWL_USERDATA, (LONG)lpfi);
    EditView_SetModify(hwndEdit, FALSE);
    SetWindowText(hwndChild, pszFile);

    tci.mask = TCIF_TEXT | TCIF_PARAM;
    tci.pszText = Path_GetFileName(pszFile);
    tci.lParam = (LPARAM)hwndChild;
    TabCtrl_SetCurSel(g_hwndTabWindowBar, TabCtrl_InsertItem(g_hwndTabWindowBar, TabCtrl_GetItemCount(g_hwndTabWindowBar), &tci));

    MDI_Child_Edit_EnableToolbarButtons(hwndChild, FALSE);

    Window_UpdateLayout(g_hwndTabWindowBar);
    RedrawWindow(g_hwndTabWindowBar, NULL, NULL, RDW_ERASE | RDW_INVALIDATE);
}
开发者ID:now,项目名称:slackedit,代码行数:26,代码来源:file_actions.c

示例12: RemoveTab

bool RemoveTab(HWND TabWindow, int Index)
{
	assert(IsWindow(TabWindow));
	assert(Index >= 0);
	assert(Index < TabCtrl_GetItemCount(TabWindow));

	TC_ITEM TabData;
	TabData.mask = TCIF_IMAGE | TCIF_PARAM;

	if(TabCtrl_GetItem(TabWindow, Index, &TabData))
	{
		int CurIndex = TabCtrl_GetCurSel(TabWindow);
		assert(CurIndex >= -1);
		if(CurIndex != -1 && TabCtrl_DeleteItem(TabWindow, Index))
		{
			if(TabData.iImage != -1)
				TabCtrl_RemoveImage(TabWindow, TabData.iImage);

			int Count = TabCtrl_GetItemCount(TabWindow);
			assert(Count >= 0);
			if(Count == 0) // We just removed the last one, do some addition cleanup
			{
				ShowWindow(reinterpret_cast<HWND>(TabData.lParam), SW_HIDE);
				HIMAGELIST ImageList = TabCtrl_GetImageList(TabWindow);
				if(ImageList)
				{
					ImageList_Destroy(ImageList);
					TabCtrl_SetImageList(TabWindow, NULL);
				}
				RemoveProp(TabWindow, PropName);
			}
			else if(Index == CurIndex) // We're deleting the currently visible tab
			{
				if(Index == Count) // Last tab
					Index--;
				TabToFront(TabWindow, Index);
			}

			SetTabThemeTexture(reinterpret_cast<HWND>(TabData.lParam), false);
			return true;
		}
	}
	return false;
}
开发者ID:pezcode,项目名称:FireFly,代码行数:44,代码来源:tabs.cpp

示例13: TabCtrl_GetItemCount

BOOL CMainWnd::AddToTab(LPCTSTR szTabTitle) 
{ 
    TCITEM tie; 
	
    tie.mask = TCIF_TEXT | TCIF_IMAGE; 
    tie.iImage = -1; 
    tie.pszText = (LPTSTR)szTabTitle; 
	
    return !(TabCtrl_InsertItem(hTap, TabCtrl_GetItemCount(hTap), &tie) == -1);
}
开发者ID:doil6317,项目名称:LogReader,代码行数:10,代码来源:MainWnd.cpp

示例14: TabCtrl_InsertItem

void
mxTab::add (mxWidget *widget, const char *text)
{
	TC_ITEM ti;

	ti.mask = TCIF_TEXT | TCIF_PARAM;
	ti.pszText = (LPSTR) text;
	ti.lParam = (LPARAM) widget;

	TabCtrl_InsertItem ((HWND) getHandle (), TabCtrl_GetItemCount ((HWND) getHandle ()), &ti);
	mxTab_resizeChild ((HWND) getHandle ());
}
开发者ID:DeadZoneLuna,项目名称:SourceEngine2007,代码行数:12,代码来源:mxtab.cpp

示例15: GetTabWindow

HWND GetTabWindow(HWND TabWindow, int Index)
{
	assert(IsWindow(TabWindow));
	assert(Index >= 0);
	assert(Index < TabCtrl_GetItemCount(TabWindow));

	TC_ITEM TabData;
	TabData.mask = TCIF_PARAM;
	if(TabCtrl_GetItem(TabWindow, Index, &TabData))
	{
		return reinterpret_cast<HWND>(TabData.lParam);
	}
	return NULL; 
}
开发者ID:pezcode,项目名称:FireFly,代码行数:14,代码来源:tabs.cpp


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