Ejemplo n.º 1
0
void UploadQueueFrame::UpdateLayout(BOOL bResizeBars /* = TRUE */) {
	RECT rect;
	GetClientRect(&rect);
	// position bars and offset their dimensions
	UpdateBarsPosition(rect, bResizeBars);

	if(ctrlStatus.IsWindow()) {
		CRect sr;
		int w[4];
		ctrlStatus.GetClientRect(sr);
		w[3] = sr.right - 16;
#define setw(x) w[x] = max(w[x+1] - statusSizes[x], 0)
		setw(2); setw(1);

		w[0] = 16;

		ctrlStatus.SetParts(4, w);

		ctrlStatus.GetRect(0, sr);
		ctrlShowTree.MoveWindow(sr);
	}
	if(showTree) {
		if(GetSinglePaneMode() != SPLIT_PANE_NONE) {
			SetSinglePaneMode(SPLIT_PANE_NONE);
		}
	} else {
		if(GetSinglePaneMode() != SPLIT_PANE_RIGHT) {
			SetSinglePaneMode(SPLIT_PANE_RIGHT);
		}
	}
	CRect rc = rect;
	SetSplitterRect(rc);
}
HWND CameraFileSystemView::CreateView(HWND hWndParent)
{
   HWND hWndClient = Create(hWndParent, CWindow::rcDefault, NULL, WS_CHILD | WS_VISIBLE | WS_CLIPSIBLINGS | WS_CLIPCHILDREN);

   m_treeView.Create(hWndClient, CWindow::rcDefault, NULL,
      WS_CHILD | WS_VISIBLE | WS_CLIPSIBLINGS | WS_CLIPCHILDREN, 0);

   m_listView.Create(hWndClient, CWindow::rcDefault, NULL,
      WS_CHILD | WS_VISIBLE | WS_CLIPSIBLINGS | WS_CLIPCHILDREN, 0);

   SetSplitterPanes(m_treeView, m_listView);
   SetSinglePaneMode(SPLIT_PANE_NONE);

   SetSplitterPosPct(20);

   m_cameraFileSystem = m_host.GetSourceDevice()->GetFileSystem();

   m_listView.Init(m_cameraFileSystem);
   m_treeView.Init(m_cameraFileSystem);

   m_treeView.RefreshTree();
   m_treeView.NavigateToPath(CameraFileSystem::PathSeparator);
   m_listView.NavigateToPath(CameraFileSystem::PathSeparator);

   return hWndClient;
}
Ejemplo n.º 3
0
LRESULT FSplitterWindow::OnDblClick(UINT, WPARAM, LPARAM, BOOL&)
{
    SetSinglePaneMode(SPLIT_PANE_RIGHT);
    g_AppSettings.m_Flags&=~PFLAG_QUICKBAR_ON;
    return 0;
}