void BitmapButton::Setup(Window &parent, int xPos, int yPos, int w, int h, char *upBitName, 
				 char *downBitName, char *disableBitName)
{
	if (hWnd)
		return;

	upBitmap = new Bitmap(upBitName);
	if (strcmp(downBitName, "") == 0)
		downBitmap = upBitmap;
	else 
		downBitmap = new Bitmap(downBitName);

	if (strcmp(disableBitName, "") == 0)
		disabledBitmap = upBitmap;
	else 
		disabledBitmap = new Bitmap(disableBitName);

	BaseStyleEx &= ~WS_EX_CLIENTEDGE;
	BaseStyle |= BS_PUSHBUTTON | BS_OWNERDRAW;
	styleExtra &= ~CS_OWNDC;

	Window::Setup(&parent, xPos, yPos, w, h, true, "Button", false);
	SetEraseColor(GetSysColor(COLOR_BTNFACE));

	clickHandler = NULL;
	dClickHandler = NULL;
}
Exemple #2
0
void IconList::AttachedToWindow( void )
{
	SetFgColor( get_default_color( COL_MENU_TEXT ) );
	SetEraseColor( get_default_color( COL_SHINE ) );
	SetBgColor( get_default_color( COL_SHINE ) );

	_Layout();
}
Exemple #3
0
void IconList::InnerView::AttachedToWindow( void )
{
	View *pcParent = GetParent();
	SetFgColor( pcParent->GetFgColor() );
	SetEraseColor( pcParent->GetEraseColor() );
	SetBgColor( pcParent->GetBgColor() );

	_Layout();
}
Exemple #4
0
void Icon::AttachedToWindow( void )
{
	View *pcParent = GetParent();

	m_sHighlightColor = m_sEraseColor = pcParent->GetEraseColor();
	m_sBgColor = pcParent->GetBgColor();
	m_sFgColor = pcParent->GetFgColor();

	SetEraseColor( m_sEraseColor );
	SetBgColor( m_sBgColor );
	SetFgColor( m_sFgColor );
}