예제 #1
0
void CuDlgEventSettingBottom::OnRadioIngresCategory() 
{
	ResizeControls();
	EnableControls();
	EnableButtonFind();
	ShowMessageDescriptionFrame(NULL, &m_cListCtrlIngres, FALSE, TRUE);
}
예제 #2
0
void CHistoryWnd::OnSize(UINT nType, int cx, int cy) 
{
//	CCJControlBar::OnSize(nType, cx, cy);
	CControlBar::OnSize(nType, cx, cy);

	//
	CRect rect;
	GetWindowRect(&rect);
	int nWidth = rect.Width();
	int nHeight = rect.Height();

	//	
	ResizeControls();

	// update mainframe on our position 
	if (m_bInitialized && (cx > 0) && (cy > 0))
	{
		const int nBarWidth = 4;
		const int nBarHeight = 6;
		if (m_dwStyle & CBRS_ORIENT_HORZ) 
//			pMAINFRAME->SetValue(tnHistoryDialogHeight, cy + nBarHeight);
			pMAINFRAME->SetValue(tnDockingWndHeight, cy + nBarHeight);
		else if (m_dwStyle & CBRS_ORIENT_VERT) 
//			pMAINFRAME->SetValue(tnHistoryDialogWidth, cx + nBarWidth);
			pMAINFRAME->SetValue(tnDockingWndWidth, cx + nBarWidth);
	}
}
예제 #3
0
파일: cuimenu.cpp 프로젝트: dogtwelve/eepp
void cUIMenu::Insert( cUIControl * Control, const Uint32& Index ) {
	mItems.insert( mItems.begin() + Index, Control );

	ChildAddAt( Control, Index );

	ReposControls();
	ResizeControls();
}
예제 #4
0
void CuDlgEventSettingBottom::OnSize(UINT nType, int cx, int cy) 
{
	CDialog::OnSize(nType, cx, cy);
	if (!IsWindow (m_cListCtrlFullDesc.m_hWnd))
		return;

	ResizeControls();
}
예제 #5
0
파일: cuimenu.cpp 프로젝트: dogtwelve/eepp
void cUIMenu::Remove( const Uint32& Index ) {
	eeASSERT( Index < mItems.size() );

	eeSAFE_DELETE( mItems[ Index ] );

	mItems.erase( mItems.begin() + Index );

	ReposControls();
	ResizeControls();
}
예제 #6
0
//function to resize the view
void 
TableView::Resize()
{
    RECT	    rcparent, rctemp, tbrect;
	wyInt32		hpos, vpos, width, height,toolwidth, toolheight;
    wyInt32     padding = 6, itemcount;
    TBBUTTON    tbinfo = {0};

    GetClientRect(m_hwndparent, &rcparent);
	
    hpos	= rcparent.left;
    vpos	= rcparent.top = CustomTab_GetTabHeight(m_hwndparent);
	width	= rcparent.right - rcparent.left;
	height	= rcparent.bottom - rcparent.top;
	
    SetWindowPos(m_hwndframe, HWND_BOTTOM, hpos, vpos, width, height,  SWP_NOZORDER);
    GetClientRect(m_hwndframe, &rcparent);

    GetWindowRect(m_hwndtoolbar, &tbrect);
    ResizeRefreshTool(tbrect.bottom - tbrect.top, &tbrect);
    toolheight = tbrect.bottom - tbrect.top;
        
    itemcount = SendMessage(m_hwndtoolbar, TB_BUTTONCOUNT, 0, 0) - 1;
    memset(&rctemp, 0, sizeof(RECT));

    if(itemcount >= 0)
    {
        SendMessage(m_hwndtoolbar, 
            TB_GETBUTTON, 
            itemcount,
            (LPARAM)&tbinfo);

        SendMessage(m_hwndtoolbar, TB_GETRECT, tbinfo.idCommand, (LPARAM)&rctemp);
        rctemp.right += padding;
    }

    toolwidth = rctemp.right;

    if(toolwidth + tbrect.right < rcparent.right)
    {
        toolwidth = rcparent.right - tbrect.right;
    }

    SetWindowPos(m_hwndpadding, NULL, 0, 0, toolwidth + tbrect.right, DATAVIEW_TOPPADDING, SWP_NOZORDER);
    SetWindowPos(m_hwndtoolbar, NULL, 0, DATAVIEW_TOPPADDING, toolwidth, toolheight, SWP_NOZORDER);
    SetWindowPos(m_hwndrefreshtool, NULL, toolwidth, DATAVIEW_TOPPADDING, tbrect.right, toolheight, SWP_NOZORDER);
        
    rcparent.top += toolheight + DATAVIEW_TOPPADDING;
    ResizeControls(rcparent);
    InvalidateRect(m_hwndframe, NULL, TRUE);
    UpdateWindow(m_hwndframe);
}
예제 #7
0
파일: cuimenu.cpp 프로젝트: dogtwelve/eepp
bool cUIMenu::CheckControlSize( cUIControl * Control, const bool& Resize ) {
	if ( Control->IsType( UI_TYPE_MENUITEM ) ) {
		cUIMenuItem * tItem = reinterpret_cast<cUIMenuItem*> ( Control );

		if ( NULL != tItem->Icon() && tItem->IconHorizontalMargin() + tItem->Icon()->Size().Width() > (Int32)mBiggestIcon ) {
			mBiggestIcon = tItem->IconHorizontalMargin() + tItem->Icon()->Size().Width();
		}

		if ( mFlags & UI_AUTO_SIZE ) {
			if ( Control->IsType( UI_TYPE_MENUSUBMENU ) ) {
				cUIMenuSubMenu * tMenu = reinterpret_cast<cUIMenuSubMenu*> ( tItem );

				if ( tMenu->TextBox()->GetTextWidth() + mBiggestIcon + tMenu->Arrow()->Size().Width() + mMinRightMargin > (Int32)mMaxWidth - mPadding.Left - mPadding.Right ) {
					mMaxWidth = tMenu->TextBox()->GetTextWidth() + mBiggestIcon + mPadding.Left + mPadding.Right + tMenu->Arrow()->Size().Width() + mMinRightMargin;

					if ( Resize ) {
						ResizeControls();

						return true;
					}
				}
			}
			else {
				if ( tItem->TextBox()->GetTextWidth() + mBiggestIcon + mMinRightMargin > (Int32)mMaxWidth - mPadding.Left - mPadding.Right ) {
					mMaxWidth = tItem->TextBox()->GetTextWidth() + mBiggestIcon + mPadding.Left + mPadding.Right + mMinRightMargin;

					if ( Resize ) {
						ResizeControls();

						return true;
					}
				}
			}
		}
	}

	return false;
}
예제 #8
0
void CuLayoutEditDlg::OnShowWindow(BOOL bShow, UINT nStatus) 
{
	CDialog::OnShowWindow(bShow, nStatus);
	if (bShow)
	{
		CEdit*  edit1 = (CEdit*)GetDlgItem (IDC_RCT_EDIT1);
		if (edit1 && IsWindow (edit1->m_hWnd))
		{
			ResizeControls();
			edit1->SetFocus();
			edit1->SetSel(0, -1);
		}
	}
}
예제 #9
0
void CuDlgEventSettingBottom::OnGroupByMessageID() 
{
	int nRadio = GetCheckedRadioButton (IDC_RADIO1, IDC_RADIO2);
	//
	// If ingres message category then do nothing
	if (nRadio == IDC_RADIO2)
		return;
	OnRadioActualMessage();
	if (m_nCurrentGroup == 1)
		ShowMessageDescriptionFrame(NULL, &m_cListCtrlGroupBy, FALSE, TRUE);
	else
		ShowMessageDescriptionFrame(NULL, &m_cListCtrlFullDesc, FALSE, TRUE);
	ResizeControls();
}
예제 #10
0
BOOL CTaskListDlg::OnInitDialog() 
{
	CDialog::OnInitDialog();


	m_ctrlTasks.InsertColumn(0, _T("Label"), LVCFMT_LEFT, 300);
	m_ctrlTasks.SetExtendedStyle(m_ctrlTasks.GetExtendedStyle() | LVS_EX_CHECKBOXES);

	PopulateTasks();

	m_hbmpNew = LoadBitmap(AfxGetInstanceHandle(), MAKEINTRESOURCE(IDB_NEW_BMP));
	m_hbmpDelete = LoadBitmap(AfxGetInstanceHandle(), MAKEINTRESOURCE(IDB_DELETE_BMP));
	m_ctrlNewTaskBtn.SetBitmap(m_hbmpNew);
	m_ctrlDeleteTaskBtn.SetBitmap(m_hbmpDelete);

	ResizeControls();

	return FALSE;
}
예제 #11
0
void CHistoryWnd::OnMove(int x, int y) 
{
	CCJControlBar::OnMove(x, y);
	ResizeControls();

/*
	// update mainframe on our position 
	if (m_bInitialized && (x > 0) && (y > 0))
	{
		CRect rect;
		GetWindowRect(&rect);
		//
		const int nBarWidth = 3;
		if (m_dwStyle & CBRS_ORIENT_HORZ) 
			pMAINFRAME->SetValue(tnHistoryDialogWidth, rect.Width() + nBarWidth);
		else if (m_dwStyle & CBRS_ORIENT_VERT) 
			pMAINFRAME->SetValue(tnHistoryDialogHeight, rect.Height() + nBarWidth);
	}
*/
}
예제 #12
0
void CuLayoutEditDlg::OnSize(UINT nType, int cx, int cy) 
{
	CDialog::OnSize(nType, cx, cy);
	ResizeControls();
}
예제 #13
0
void CTaskListDlg::OnSize(UINT nType, int cx, int cy)
{
	CDialog::OnSize(nType, cx, cy);
	ResizeControls();
}
예제 #14
0
void CCePropertyPage::OnSize(UINT nType, int cx, int cy) {
	CPropertyPage::OnSize(nType, cx, cy);

	ResizeControls();
}
예제 #15
0
void CuDlgEventSettingBottom::HandleActualMessage()
{
	CWaitCursor doWaitCursor;

	CfEventSetting* pFrame = (CfEventSetting*)GetParentFrame();
	ASSERT (pFrame);
	if (!pFrame)
		return;
	CaMessageEntry* pEntry = NULL;
	CaMessageManager* pMessageManager = pFrame->GetMessageManager();
	if (!pMessageManager)
		return;

	ResizeControls();
	EnableControls();
	int nGroup = m_cGroupByMessageID.GetCheck();
	if (m_nCurrentGroup == nGroup)
		return;
	m_nCurrentGroup = nGroup;

	int nIndex;
	Imsgclass nClass;
	CaLoggedEvent* pExistMessage = NULL;
	CaMessage* pMsg;
	CaLoggedEvent* pEv;
	CaIvmEvent& loggedEvent = theApp.GetEventData();
	CTypedPtrList<CObList, CaLoggedEvent*>& le = loggedEvent.Get();
	POSITION pos = le.GetHeadPosition();
	
	//
	// Group by:
	BOOL bGroupBy = FALSE;
	if (m_nCurrentGroup == 1) 
	{
		bGroupBy = TRUE;
		//
		// Messages have been queried and ready to be used:
		if (m_bActualMessageGroup)
			return;
		//
		// Initialize the Group Message:
		m_bActualMessageGroup = TRUE;
		m_cListCtrlGroupBy.LockWindowUpdate();
		
		while (pos != NULL)
		{
			pEv = le.GetNext (pos);
			pEv->SetClassify(FALSE);
			//
			// Check to see if the list of Group By Event containts already
			// an event whose m_lCode = pEv->m_lCode.
			// If exist, just increase the count number !!
			pExistMessage = ExistMessage (pEv, nIndex);
			if (pExistMessage)
			{
				int iCount,iCountExtra;
				CString strCount;
				iCount = pExistMessage->GetCount();
				iCountExtra = pExistMessage->GetExtraCount();
				if (pEv->IsNotFirstLine()) {
					iCountExtra++;
					pExistMessage->SetExtraCount(iCountExtra);
				}
				else {
					iCount++;
					pExistMessage->SetCount(iCount);
				}
				if (iCountExtra == 0)
					strCount.Format (_T("%d"),iCount);
				else
					strCount.Format (_T("%d(+%d)"),iCount,iCountExtra);
				m_cListCtrlGroupBy.SetItemText (nIndex, 1, strCount);
				continue;
			}
			
			//
			// The event has not been yet added to the list of Group By Event.
			// Mark this event as classified or not due to the Entry of Message Manager:
			pEntry = pMessageManager->FindEntry (pEv->GetCatType());
			ASSERT (pEntry);
			if (!pEntry)
				continue;

			pMsg = pEntry->Search(pEv->GetCode());
			nClass = pEv->GetClass();
		
			if (pMsg)
				pEv->SetClass (pMsg->GetClass());
			else
				pEv->SetClass (pEntry->GetClass());
			pEv->SetClassify(pMsg? TRUE: FALSE);
			if (pEv->IsNotFirstLine()) {
				pEv->SetCount(0);
				pEv->SetExtraCount(1);
			}
			else {
				pEv->SetCount(1);
				pEv->SetExtraCount(0);
			}
			AddEventToGroupByList(pEv);
		}
		m_cListCtrlGroupBy.SortItems(CompareSubItem, (LPARAM)&m_sortListCtrl3);
		m_cListCtrlGroupBy.UnlockWindowUpdate();
	}

	//
	// Full description:
	if (m_nCurrentGroup != 1)
	{
		//
		// Messages have been queried and ready to be used:
		if (m_bActualMessageAll)
			return;
		//
		// Initialize the Full Description Message:
		m_bActualMessageAll = TRUE;
		if (!m_listLoggedEvent.IsEmpty())
			m_listLoggedEvent.RemoveAll();
		loggedEvent.GetAll (m_listLoggedEvent);
		INT_PTR nCount = m_listLoggedEvent.GetCount();
		pos = m_listLoggedEvent.GetHeadPosition();
		
		while (pos != NULL)
		{
			pEv = m_listLoggedEvent.GetNext (pos);
			pEv->SetClassify(FALSE);
			//
			// The event has not been yet added to the list of Group By Event.
			// Mark this event as classified or not due to the Entry of Message Manager:
			pEntry = pMessageManager->FindEntry (pEv->GetCatType());
			ASSERT (pEntry);
			if (!pEntry)
				continue;

			pMsg = pEntry->Search(pEv->GetCode());
			nClass = pEv->GetClass();
		
			if (pMsg)
				pEv->SetClass (pMsg->GetClass());
			else
				pEv->SetClass (pEntry->GetClass());
			pEv->SetClassify(pMsg? TRUE: FALSE);
			
		}

		int nCountPerPage = m_cListCtrlFullDesc.GetCountPerPage();
		if (nCount < theApp.GetScrollManagementLimit())
		{
			m_cListCtrlFullDesc.SetListCtrlScrollManagement(FALSE);
			m_cVerticalScroll.SetScrollRange (0, 0);
		}
		else
		{
			m_cListCtrlFullDesc.SetListCtrlScrollManagement(TRUE);
			m_cVerticalScroll.SetScrollRange (0, 0);
		}
		ResizeControls();
		EnableControls();

		m_cVerticalScroll.SetListCtrl    (&m_cListCtrlFullDesc);
		m_cVerticalScroll.SetScrollRange (0, (int)(nCount - nCountPerPage));
		m_cVerticalScroll.SetScrollPos   (0);
		m_cListCtrlFullDesc.SetListEvent(&m_listLoggedEvent);
		m_cListCtrlFullDesc.InitializeItems (GLAYOUT_NUMBER);
	}
	EnableButtonFind();
}
예제 #16
0
void CuDlgIjaTable::OnSize(UINT nType, int cx, int cy) 
{
	CDialog::OnSize(nType, cx, cy);
	ResizeControls();
}
예제 #17
0
BOOL CuDlgEventSettingBottom::OnInitDialog() 
{
	CWaitCursor doWaitCursor;
	CDialog::OnInitDialog();
	m_cGroupByMessageID.SetCheck (1);
	m_cGroupByMessageID.EnableWindow (FALSE);
	CheckRadioButton (IDC_RADIO1, IDC_RADIO2, IDC_RADIO1);

	// 
	// m_cListCtrlFullDesc : Actual Message (full description)
	// m_cListCtrlGroupBy  : Actual Message (group by message ID)
	// m_cListCtrlIngres   : From ingres message category
	VERIFY (m_cListCtrlFullDesc.SubclassDlgItem (IDC_LIST1, this));
	m_ImageList.Create (IDB_EVENTINDICATOR_SETTINGS, 26, 0, RGB(255,0,255));
	m_cListCtrlFullDesc.SetImageList  (&m_ImageList, LVSIL_SMALL);
	m_cListCtrlIngres.SetImageList (&m_ImageList, LVSIL_SMALL);
	m_cListCtrlGroupBy.SetImageList (&m_ImageList, LVSIL_SMALL);
	m_cListCtrlFullDesc.SetCustopmVScroll(&m_cVerticalScroll);
	m_cVerticalScroll.SetListCtrl (&m_cListCtrlFullDesc);

	long lStyle = 0;
	lStyle = m_cListCtrlFullDesc.GetStyle();
	if ((lStyle & LVS_OWNERDRAWFIXED) && !m_cListCtrlFullDesc.IsOwnerDraw())
	{
		ASSERT (FALSE);
		return FALSE;
	}
	lStyle = m_cListCtrlIngres.GetStyle();
	if ((lStyle & LVS_OWNERDRAWFIXED) && !m_cListCtrlIngres.IsOwnerDraw())
	{
		ASSERT (FALSE);
		return FALSE;
	}
	lStyle = m_cListCtrlGroupBy.GetStyle();
	if ((lStyle & LVS_OWNERDRAWFIXED) && !m_cListCtrlGroupBy.IsOwnerDraw())
	{
		ASSERT (FALSE);
		return FALSE;
	}

	LV_COLUMN lvcolumn;

	//
	// Actual messages from Logged events:
	CString strHeader;
	memset (&lvcolumn, 0, sizeof (LV_COLUMN));
	lvcolumn.mask = LVCF_FMT | LVCF_SUBITEM | LVCF_TEXT | LVCF_WIDTH;
	for (int i=0; i<GLAYOUT_NUMBER; i++)
	{
		strHeader.LoadString (lsp[i].m_nIDS);
		lvcolumn.fmt      = lsp[i].m_fmt;
		lvcolumn.pszText  = (LPTSTR)(LPCTSTR)strHeader;
		lvcolumn.iSubItem = i;
		lvcolumn.cx       = lsp[i].m_cxWidth;
		m_cListCtrlFullDesc.InsertColumn (i, &lvcolumn);

		if (i==0)
		{
			//
			// Ingres Messages:
			lvcolumn.cx = 400;
			m_cListCtrlGroupBy.InsertColumn (i, &lvcolumn);
			m_cListCtrlIngres.InsertColumn (i, &lvcolumn);
		}
		if (i == 1)
		{
			strHeader.LoadString (IDS_HEADER_STAT_COUNT);
			lvcolumn.fmt      = LVCFMT_RIGHT;
			lvcolumn.pszText  = (LPTSTR)(LPCTSTR)strHeader;
			m_cListCtrlGroupBy.InsertColumn (i, &lvcolumn);
		}
	}
	ResizeControls();

	try
	{
		//
		// Fill the Combobox of Ingres Category:
		FillIngresCategory();
		int nRadio = GetCheckedRadioButton (IDC_RADIO1, IDC_RADIO2);
		switch (nRadio)
		{
		case IDC_RADIO1:
			OnRadioActualMessage();
			break;
		case IDC_RADIO2:
			OnRadioIngresCategory();
			break;
		default:
			ASSERT (FALSE);
			break;
		}
		EnableButtonFind();
	}
	catch (...)
	{
		AfxMessageBox (_T("System error (CuDlgEventSettingBottom::OnInitDialog): \nCannot initialize messages."));
	}

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