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


C++ CStatusBar::Create方法代码示例

本文整理汇总了C++中CStatusBar::Create方法的典型用法代码示例。如果您正苦于以下问题:C++ CStatusBar::Create方法的具体用法?C++ CStatusBar::Create怎么用?C++ CStatusBar::Create使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在CStatusBar的用法示例。


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

示例1: CreatStatusBar

void CProcessManager::CreatStatusBar(void)
{
	RECT	rect;
	GetClientRect(&rect);

	if (!m_wndStatusBar.Create(this) ||
		!m_wndStatusBar.SetIndicators(indicators,
		sizeof(indicators)/sizeof(UINT)))
	{
		return ;      
	}

	m_wndStatusBar.SetPaneInfo(0, m_wndStatusBar.GetItemID(0), SBPS_STRETCH, NULL);
	
	RepositionBars(AFX_IDW_CONTROLBAR_FIRST, AFX_IDW_CONTROLBAR_LAST, 0); //显示状态栏
	

	CRect rc;
	rc.top=rect.bottom-22;
	rc.left=0;
	rc.right=rect.right;
	rc.bottom=rect.bottom;

	m_wndStatusBar.MoveWindow(rc);           

	CString strStatusMsg;
	strStatusMsg.Format(L"进程:%d , 隐藏进程:%d , 应用层不可访问进程:%d",g_ProcessCount,g_HideProcessCount,1);
	m_wndStatusBar.SetPaneText(0,strStatusMsg);  
}
开发者ID:zibility,项目名称:Anti-Rootkits,代码行数:29,代码来源:ProcessManager.cpp

示例2: OnCreate

int CMainWnd::OnCreate(LPCREATESTRUCT lpCreateScruct)
{
	if (CFrameWnd::OnCreate(lpCreateScruct) == -1)
		return -1;
	else {
		m_wndStatusBar.Create(this);

		// Загружаем меню из файлоы ресурса
		m_wndMenu.LoadMenuW(IDR_MENU);

		// Устанавливаем меню во фрейм
		SetMenu(&m_wndMenu);

		return 0;
	}
}
开发者ID:walleri18,项目名称:Programming-under-Windows-OS,代码行数:16,代码来源:Step_Eight_Main.cpp

示例3: WndProc

// Window Procedure
LRESULT CWinMain::WndProc(HWND window, UINT msg, WPARAM wp, LPARAM lp)
{
	static CMainToolBar main_tool_bar;
	static CSearchToolBar search_tool_bar;
	static CMainListView list_view;
	static CStatusBar status_bar;
	static CExtractData extract;
	static COption option;
	static CVersionInfo version;
	static CLastDir last_dir;
	static TCHAR readme_file_name[MAX_PATH];
	static TCHAR history_file_name[MAX_PATH];
	static TCHAR state_file_name[MAX_PATH];
	INITCOMMONCONTROLSEX ic;

	switch (msg)
	{
	case WM_CREATE:
		{
			// Allow D&D (Drag & Drop)
			DragAcceptFiles(window, TRUE);

			option.Init(search_tool_bar, list_view);

			// Initialization of the common installation configuration
			ic.dwSize = sizeof(INITCOMMONCONTROLSEX);
			ic.dwICC = ICC_WIN95_CLASSES;
			InitCommonControlsEx(&ic);

			// Create main toolbar
			main_tool_bar.Create(window);
			search_tool_bar.Create(window);

			// Create list view
			list_view.Create(window, option.GetOpt());

			// Create status bar
			status_bar.Create(window, option.GetOpt(), list_view);

			// Get full path
			TCHAR ModulePath[MAX_PATH];
			GetModuleFileName(nullptr, ModulePath, MAX_PATH);
			PathRemoveFileSpec(ModulePath);

			// Retrieves full path of the location of Readme.txt
			lstrcpy(readme_file_name, ModulePath);
			PathAppend(readme_file_name, _T("Readme.txt"));

			// Retrieves full path of the location of History.txt
			lstrcpy(history_file_name, ModulePath);
			PathAppend(history_file_name, _T("History.txt"));

			// Retrieves full path of the location of State.txt
			lstrcpy(state_file_name, ModulePath);
			PathAppend(state_file_name, _T("State.txt"));

			extract.Init(window, option.GetOpt(), list_view);
			break;
		}

	case WM_DROPFILES:
		extract.OpenDrop(wp);
		main_tool_bar.AddOpenHistory(extract.GetArcList());
		status_bar.SetCount();
		break;

	case WM_COMMAND:
		switch (LOWORD(wp))
		{
		case IDM_OPEN: // Open a file to load
			extract.Open(last_dir.GetOpen());
			main_tool_bar.AddOpenHistory(extract.GetArcList());
			status_bar.SetCount();
			last_dir.SaveIni();
			break;

		case IDM_CLOSE: // Close the opened file
			extract.Close();
			status_bar.SetCount();
			break;

		// Open a file from history
		case ID_TOOLBAR_OPEN_HISTORY:
		case ID_TOOLBAR_OPEN_HISTORY+1:
		case ID_TOOLBAR_OPEN_HISTORY+2:
		case ID_TOOLBAR_OPEN_HISTORY+3:
		case ID_TOOLBAR_OPEN_HISTORY+4:
		case ID_TOOLBAR_OPEN_HISTORY+5:
		case ID_TOOLBAR_OPEN_HISTORY+6:
		case ID_TOOLBAR_OPEN_HISTORY+7:
		case ID_TOOLBAR_OPEN_HISTORY+8:
		case ID_TOOLBAR_OPEN_HISTORY+9:
			extract.OpenHistory(main_tool_bar.GetHistory()[LOWORD(wp)-ID_TOOLBAR_OPEN_HISTORY]);
			main_tool_bar.AddOpenHistory(extract.GetArcList());
			status_bar.SetCount();
			break;

		// Search button configuration file
		case IDM_AHX:
//.........这里部分代码省略.........
开发者ID:,项目名称:,代码行数:101,代码来源:


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