Ejemplo n.º 1
0
void FrmMain::qcop_receive(const QCString& msg, const QByteArray& data)
{
	QDataStream stream(data, IO_ReadOnly );
	
	if (msg == "setPensize(int)") {
		int v;
		stream >> v;
		if (0 <= v && v <= 8) {
			penSelected(v);
		}
	} else if (msg == "setup()") {
Ejemplo n.º 2
0
//-----------------------------------------------------------------------------
//-----------------------------------------------------------------------------
void CIconComboBox::SetSelectedBrushAndPen( LPDRAWITEMSTRUCT lpDrawItemStruct, 
										    CBrush **ppOldBrush, CPen **ppOldPen )
{
	// get the device context
    CDC* pDC = CDC::FromHandle( lpDrawItemStruct->hDC );

	// set the brush and pen "highlighted"
	CBrush brushSelected( GetSysColor( COLOR_HIGHLIGHT ) );
	CPen penSelected( PS_SOLID, 1, GetSysColor( COLOR_HIGHLIGHT ) );

	// set the brush and pen current -- saving the old brush and pen state
	*ppOldBrush = pDC->SelectObject( &brushSelected );
	*ppOldPen = pDC->SelectObject( &penSelected );
	
	//
	// set some addition render state - background  and text color
	//
	pDC->Rectangle( &lpDrawItemStruct->rcItem );
	pDC->SetBkColor( GetSysColor( COLOR_HIGHLIGHT ) );
	pDC->SetTextColor( GetSysColor( COLOR_HIGHLIGHTTEXT ) );
}