Esempio n. 1
0
//////////////////////////////////////////////
//  Definitions for the CContainOutput class
CContainOutput::CContainOutput() 
{
	SetView(m_ViewOutput); 
	SetDockCaption (_T("Output View - Docking container"));
	SetTabText(_T("Output"));
	SetTabIcon(IDI_TEXT);
} 
LRESULT CALLBACK Explorerplusplus::MainWndTaskbarThumbnailProc(HWND hwnd,UINT uMsg,WPARAM wParam,LPARAM lParam)
{
	if(uMsg == m_uTaskbarButtonCreatedMessage)
	{
		if(m_pTaskbarList != NULL)
		{
			m_pTaskbarList->Release();
		}

		CoCreateInstance(CLSID_TaskbarList,NULL,CLSCTX_INPROC_SERVER,
			IID_PPV_ARGS(&m_pTaskbarList));
		m_pTaskbarList->HrInit();

		m_bTaskbarInitialised = TRUE;

		/* Add each of the jump list tasks. */
		SetupJumplistTasks();

		/* Register each of the tabs. */
		for(auto itr = m_TabProxyList.begin();itr != m_TabProxyList.end();itr++)
		{
			BOOL bActive = (itr->iTabId == m_iObjectIndex);

			RegisterTab(itr->hProxy,EMPTY_STRING,bActive);
			HandleTabText(itr->iTabId);
			SetTabIcon(itr->iTabId);
		}

		RemoveWindowSubclass(hwnd,MainWndProcStub,0);

		return 0;
	}

	return DefSubclassProc(hwnd,uMsg,wParam,lParam);
}
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);
}
void Explorerplusplus::SetTabIcon(int iIndex,int iTabId)
{
	LPITEMIDLIST pidl = NULL;

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

	SetTabIcon(iIndex,iTabId,pidl);

	CoTaskMemFree(pidl);
}
void Explorerplusplus::SetTabIcon(void)
{
	LPITEMIDLIST pidl = NULL;

	pidl = m_pActiveShellBrowser->QueryCurrentDirectoryIdl();

	SetTabIcon(m_iTabSelectedItem,m_iObjectIndex,pidl);

	CoTaskMemFree(pidl);
}
Esempio n. 6
0
bool CXTPMDIWndTab::SetTabIcon(int iIndex, HICON& hIcon)
{
	TC_ITEM tci;
	tci.mask = TCIF_PARAM;

	if (GetItem(iIndex, &tci))
	{
		MDICHILD* pMDIChild = (MDICHILD*)tci.lParam;
		ASSERT(pMDIChild != NULL);
		if (!pMDIChild)
			return false;

		return SetTabIcon(pMDIChild->hWnd, hIcon);
	}

	return false;
}
CDlgDoasmOption::CDlgDoasmOption()
	: CResizablePage(CDlgDoasmOption::IDD)
{
	SetTabIcon(IDI_OPTION_OASM);
}
CDlgOMLEditOption::CDlgOMLEditOption()
	: CResizablePage(CDlgOMLEditOption::IDD)
{
	SetTabIcon(IDI_OPTION_EDITOR);
}