Beispiel #1
0
void CActivityView::OnInitialUpdate() 
{

int iColOrder [eColumnCount] = {0, 1, 2, 3, 4, 5, 6},
    iColWidth [eColumnCount] = {40, 130, 55, 55, 80, 105, 70};

// set list control to display whole row when selected and to allow column drag/drop

  App.RestoreColumnConfiguration ("Activity List", eColumnCount, GetListCtrl (),
                                  iColOrder, iColWidth, m_last_col, m_reverse);
 
 GetListCtrl ().InsertColumn(eColumnSeq, TranslateHeading ("Seq"), LVCFMT_RIGHT, iColWidth [eColumnSeq]);
 GetListCtrl ().InsertColumn(eColumnMush, TranslateHeading ("World"), LVCFMT_LEFT, iColWidth [eColumnMush]);
 GetListCtrl ().InsertColumn(eColumnNew, TranslateHeading ("New"), LVCFMT_RIGHT, iColWidth [eColumnNew]);
 GetListCtrl ().InsertColumn(eColumnLines, TranslateHeading ("Lines"), LVCFMT_RIGHT, iColWidth [eColumnLines]);
 GetListCtrl ().InsertColumn(eColumnStatus, TranslateHeading ("Status"), LVCFMT_LEFT, iColWidth [eColumnStatus]);
 GetListCtrl ().InsertColumn(eColumnSince, TranslateHeading ("Since"), LVCFMT_LEFT, iColWidth [eColumnSince]);
 GetListCtrl ().InsertColumn(eColumnDuration, TranslateHeading ("Duration"), LVCFMT_RIGHT, iColWidth [eColumnDuration]);
                                                       
// recover column sequence

  GetListCtrl ().SendMessage (LVM_SETCOLUMNORDERARRAY, eColumnCount, (DWORD) iColOrder);

	CListView::OnInitialUpdate();
	
  GetParent()->SetWindowText(Translate ("Activity List"));

  CWindowPlacement wp;
  wp.Restore ("Activity List", GetParent (), false);
  
  m_imglIcons.Create (IDR_ACTIVITYIMAGES, 14, 1, RGB (255, 255, 255));
  GetListCtrl ().SetImageList (&m_imglIcons, LVSIL_SMALL);

}        // end of ActivityView::OnInitialUpdate
Beispiel #2
0
int CMainFrame::OnCreate(LPCREATESTRUCT lpCreateStruct)
{
    if (Inherited::OnCreate(lpCreateStruct) == -1)
        return -1;

    // create status bar
    if (!m_StatusBar.Create(this) || !m_StatusBar.SetIndicators(Indicators, sizeof(Indicators)/sizeof(UINT)))
    {
        TRACE0("Failed to create status bar\n");
        return -1;      // fail to create
    }

    // enable docking after status bar is created
    EnableDocking(CBRS_ALIGN_ANY);

    // create standard tool bar
    if (!m_ToolBar.Create(this))
        return -1;

    // strip unneccssary redraw bits (Prosise, VC DEVCON Orlando, p170 in session notes)
    DWORD Style = ::GetClassLong(m_hWnd, GCL_STYLE);
    ::SetClassLong(m_hWnd, GCL_STYLE, Style & ~(CS_HREDRAW | CS_VREDRAW));

	// restore window placement - main window
	CWindowPlacement MainWindowPlacement;
	MainWindowPlacement.Restore(_T("Main Window"), this);

	// restore toolbar placement
	LoadBarState(_T("ToolBarSettings"));

    return 0;
}
Beispiel #3
0
void CEditMultiLine::OnDestroy()
{
	CDialog::OnDestroy();

  CWindowPlacement wp;
  wp.Save ("Edit MultiLine Dialog", this);

}
Beispiel #4
0
void CMainFrame::OnClose() 
{
	// save toolbar's window placement, see Prosise p728 for why we do it here instead
	SaveBarState(_T("ToolBarSettings"));

	// save window placement - main window
	CWindowPlacement MainWindowPlacement;
	MainWindowPlacement.Save(_T("Main Window"), this);
	
	Inherited::OnClose();
}
Beispiel #5
0
void CActivityView::OnDestroy() 
{

	App.SaveColumnConfiguration ("Activity List", eColumnCount, GetListCtrl (),
                               m_last_col, m_reverse);

  CWindowPlacement wp;
  wp.Save ("Activity List", GetParent ());

	CListView::OnDestroy();
	
}
Beispiel #6
0
BOOL CEditMultiLine::OnInitDialog()
{
	CDialog::OnInitDialog();

  CWindowPlacement wp;
  wp.Restore ("Edit MultiLine Dialog", this, false);

  if (!m_strTitle.IsEmpty ())
    SetWindowText (m_strTitle);

  PostMessage (WM_COMMAND, CLEAR_SELECTION);

  if (!m_bScript)
    {
    m_ctlFunctionListButton.ShowWindow (SW_HIDE);
    m_ctlCompleteFunctionButton.ShowWindow (SW_HIDE);
    m_ctlGoToLineButton.ShowWindow (SW_HIDE);
    }

	return TRUE;  // return TRUE unless you set the focus to a control
	              // EXCEPTION: OCX Property Pages should return FALSE
}