Exemplo n.º 1
0
// sets the flags for a pane by the pane's index
BOOL CStatusBarACT::SetPaneFlagsIndex(int nIndex, DWORD dwFlags/*=SBACTF_NORMAL*/)
{
	// make sure array is big enough
	int nMax = GetStatusBarCtrl().GetParts(0, NULL);

	if (nIndex >= nMax || nIndex < 0)
	{
		return FALSE;
	}

	if ((dwFlags & SBACTF_CLICKFLAGMASK) == 0)
	{
		dwFlags |= SBACTF_DOUBLECLICK;   // default to just double-click
	}

	if ((dwFlags & SBACTF_BUTTONFLAGMASK) == 0)
	{
		dwFlags |= SBACTF_LEFTBUTTON;   // default to just left button
	}

	if (dwFlags & SBACTF_STRETCHY)
	{
		dwFlags &= ~SBACTF_AUTOFIT;
		SetPaneStyle(nIndex, GetPaneStyle(nIndex) | SBPS_STRETCH);
	}

	m_adwFlags.SetAtGrow(nIndex, dwFlags);

	return TRUE;
}
Exemplo n.º 2
0
int CMSMToolBar::OnCreate(LPCREATESTRUCT lpCreateStruct) 
{
	if (CMFCToolBar::OnCreate(lpCreateStruct) == -1)
		return -1;

	SetPaneStyle((GetPaneStyle () & 
		~(CBRS_GRIPPER | CBRS_BORDER_TOP | CBRS_BORDER_BOTTOM | CBRS_BORDER_LEFT | CBRS_BORDER_RIGHT))
		| CBRS_SIZE_DYNAMIC);
	SetBorders ();
	
	SetGrayDisabledButtons (FALSE);

	return 0;
}
Exemplo n.º 3
0
void CProgressStatusBar::ActivateProgressBar(UINT nCommand)
{
    SetPaneStyle(CommandToIndex(nCommand), SBPS_OWNERDRAW);
}