Esempio n. 1
0
//////////////////////////////////////////////////////////////////////////
//
// Function:		CTCGroupBox::SetFontBold
//
// Description:		Sets Font Style
//
// INPUTS:          TRUE of FALSE
//
// RETURNS:         Reference to 'this' object
//
//
// Name                     Date        Version Comments
// Jack Jin					2003-12-03    1.0     Origin
//////////////////////////////////////////////////////////////////////////
CTCGroupBox& CTCGroupBox::SetFontBold(BOOL bBold)
{
    m_lf.lfWeight = bBold ? FW_BOLD : FW_NORMAL;
    ReconstructFont();
    UpdateSurface();
    return *this;
}
Esempio n. 2
0
//////////////////////////////////////////////////////////////////////////
//
// Function:		CTCGroupBox::SetFont
//
// Description:		Sets font with LOGFONT structure
//
// INPUTS:          LOGFONT structure
//
// RETURNS:         Reference to 'this' object
//
//
// Name                     Date        Version Comments
// Jack Jin					2003-12-03    1.0     Origin
//////////////////////////////////////////////////////////////////////////
CTCGroupBox& CTCGroupBox::SetFont(LOGFONT lf)
{
    CopyMemory(&m_lf, &lf, sizeof(m_lf));
    ReconstructFont();
    UpdateSurface();
    return *this;
}
Esempio n. 3
0
void CLabel::SetFontRotation(int iAngle)
{
	m_iAngle = iAngle;
	m_lf.lfEscapement = m_lf.lfOrientation = (m_iAngle * 10);
	ReconstructFont();		
	Redraw();
}
Esempio n. 4
0
CLabel& CLabel::SetFontSize(int nSize)
{
	m_lf.lfHeight = -MulDiv(nSize, GetDeviceCaps(GetDC()->m_hDC, LOGPIXELSY), 72);
	ReconstructFont();
	RedrawWindow();
	return *this;
}
Esempio n. 5
0
CLabel& CLabel::SetFontBold(BOOL bBold)
{	
	m_lf.lfWeight = bBold ? FW_BOLD : FW_NORMAL;
	ReconstructFont();
	RedrawWindow();
	return *this;
}
Esempio n. 6
0
CLabel& CLabel::SetFontName(const CString& strFont)
{	
	strcpy(m_lf.lfFaceName,strFont);
	ReconstructFont();
	RedrawWindow();
	return *this;
}
Esempio n. 7
0
CLabel& CLabel::SetFontUnderline(BOOL bSet)
{	
	m_lf.lfUnderline = bSet;
	ReconstructFont();
	RedrawWindow();
	return *this;
}
Esempio n. 8
0
CLabel& CLabel::SetFontItalic(BOOL bSet)
{
	m_lf.lfItalic = bSet;
	ReconstructFont();
	RedrawWindow();
	return *this;	
}
Esempio n. 9
0
//////////////////////////////////////////////////////////////////////////
//
// Function:		CTCGroupBox::SetFontUnderline
//
// Description:		Sets font underline attribue
//
// INPUTS:          True of false
//
// RETURNS:         Reference to 'this' object
//
//
// Name                     Date        Version Comments
// Jack Jin					2003-12-03    1.0     Origin
//////////////////////////////////////////////////////////////////////////
CTCGroupBox& CTCGroupBox::SetFontUnderline(BOOL bSet)
{
    m_lf.lfUnderline = bSet;
    ReconstructFont();
    UpdateSurface();

    return *this;
}
Esempio n. 10
0
//////////////////////////////////////////////////////////////////////////
//
// Function:		CTCGroupBox::SetFontItalic
//
// Description:		Sets font italic attribue
//
// INPUTS:          True of false
//
// RETURNS:         Reference to 'this' object
//
//
// Name                     Date        Version Comments
// Jack Jin					2003-12-03    1.0     Origin
//////////////////////////////////////////////////////////////////////////
CTCGroupBox& CTCGroupBox::SetFontItalic(BOOL bSet)
{
    m_lf.lfItalic = bSet;
    ReconstructFont();
    UpdateSurface();

    return *this;
}
Esempio n. 11
0
//////////////////////////////////////////////////////////////////////////
//
// Function:		CLabel::SetFontUnderline
//
// Description:		Sets font underline attribue
//
// INPUTS:          True of false
// 
// RETURNS:         Reference to 'this' object
//
// NOTES:			
// 
// MODIFICATIONS:
//
// Name                     Date        Version Comments
// NT ALMOND				26/08/98    1.0     Origin
//
//////////////////////////////////////////////////////////////////////////
CLabel& CLabel::SetFontUnderline(BOOL bSet)
{	
	m_lf.lfUnderline = bSet;
	ReconstructFont();
	UpdateSurface();

	return *this;
}
Esempio n. 12
0
//////////////////////////////////////////////////////////////////////////
//
// Function:		CLabelStatic::SetFontBold
//
// Description:		Sets the font ot bold 
//
// INPUTS:          True or false
// 
// RETURNS:         Reference to 'this' object
//
// NOTES:			
// 
// MODIFICATIONS:
//
// Name                     Date        Version Comments
// NT ALMOND				22/10/98    1.0     Origin
//
//////////////////////////////////////////////////////////////////////////
CLabelStatic& CLabelStatic::SetFontBold(BOOL bBold)
{	

	m_lf.lfWeight = bBold ? FW_BOLD : FW_NORMAL;
	ReconstructFont();
	UpdateSurface();
	return *this;
}
Esempio n. 13
0
//////////////////////////////////////////////////////////////////////////
//
// Function:		CLabelStatic::SetFont
//
// Description:		Sets font with LOGFONT structure
//
// INPUTS:          
// 
// RETURNS:         
//
// NOTES:			
// 
// MODIFICATIONS:
//
// Name                     Date        Version Comments
// NT ALMOND				02072002    1.6     Origin
//////////////////////////////////////////////////////////////////////////
CLabelStatic& CLabelStatic::SetFont(LOGFONT lf)
{
	CopyMemory(&m_lf, &lf, sizeof(m_lf));
	ReconstructFont();
	UpdateSurface();
	return *this;

}
Esempio n. 14
0
CLabel& CLabel::SetFontSize(int nSize)
{
	nSize*=-1;
	m_lf.lfHeight = nSize;
	ReconstructFont();
	RedrawWindow();
	return *this;
}
Esempio n. 15
0
//////////////////////////////////////////////////////////////////////////
//
// Function:		CLabel::SetFontItalic
//
// Description:		Sets font italic attribute
//
// INPUTS:          True of false
// 
// RETURNS:         Reference to 'this' object
//
// NOTES:			
// 
// MODIFICATIONS:
//
// Name                     Date        Version Comments
// NT ALMOND				26/08/98    1.0     Origin
//
//////////////////////////////////////////////////////////////////////////
CLabel& CLabel::SetFontItalic(BOOL bSet)
{

	m_lf.lfItalic = bSet;
	ReconstructFont();
	UpdateSurface();

	return *this;	
}
Esempio n. 16
0
//////////////////////////////////////////////////////////////////////////
//
// Function:		CLabel::PreSubclassWindow
//
// Description:		Assigns default dialog font
//
// INPUTS:          
// 
// RETURNS:         
//
// NOTES:			
// 
// MODIFICATIONS:
//
// Name                     Date        Version Comments
// NT ALMOND				15092000    1.5     Origin
//////////////////////////////////////////////////////////////////////////
void CLabel::PreSubclassWindow() 
{

	CStatic::PreSubclassWindow();

	GetFont()->GetObject(sizeof(m_lf),&m_lf);
	ReconstructFont();

	
}
Esempio n. 17
0
//////////////////////////////////////////////////////////////////////////
//
// Function:		CTCGroupBox::SetFontName
//
// Description:		Sets the fonts face name
//
// INPUTS:          String containing font name
//
// RETURNS:         Reference to 'this' object
//
//
// Name                     Date        Version Comments
// Jack Jin					2003-12-03    1.0     Origin
//////////////////////////////////////////////////////////////////////////
CTCGroupBox& CTCGroupBox::SetFontName(const CString& strFont, BYTE byCharSet)
{
    m_lf.lfCharSet = byCharSet;

    _tcscpy(m_lf.lfFaceName,strFont);
    ReconstructFont();
    UpdateSurface();

    return *this;
}
Esempio n. 18
0
//////////////////////////////////////////////////////////////////////////
//
// Function:		CLabel::SetFontName
//
// Description:		Sets the fonts face name
//
// INPUTS:          String containing font name
// 
// RETURNS:         Reference to 'this' object
//
// NOTES:			
// 
// MODIFICATIONS:
//
// Name                     Date        Version Comments
// NT ALMOND				26/08/98    1.0     Origin
// NT ALMOND				15092000	1.5		Support internation windows
//////////////////////////////////////////////////////////////////////////
CLabel& CLabel::SetFontName(const CString& strFont, BYTE byCharSet /* Default = ANSI_CHARSET */)
{	

	m_lf.lfCharSet = byCharSet;

	_tcscpy(m_lf.lfFaceName,strFont);
	ReconstructFont();
	UpdateSurface();

	return *this;
}
Esempio n. 19
0
//////////////////////////////////////////////////////////////////////////
//
// Function:		CTCGroupBox::SetFontSize
//
// Description:		Sets font size attribue
//
// INPUTS:          True of false
//
// RETURNS:         Reference to 'this' object
//
//
// Name                     Date        Version Comments
// Jack Jin					2003-12-03    1.0     Origin
//////////////////////////////////////////////////////////////////////////
CTCGroupBox& CTCGroupBox::SetFontSize(int nSize)
{
    CFont cf;
    LOGFONT lf;

    cf.CreatePointFont(nSize * 10, m_lf.lfFaceName);
    cf.GetLogFont(&lf);

    m_lf.lfHeight = lf.lfHeight;
    m_lf.lfWidth  = lf.lfWidth;

    ReconstructFont();
    UpdateSurface();

    return *this;
}
Esempio n. 20
0
//////////////////////////////////////////////////////////////////////////
//
// Function:		CLabel::PreSubclassWindow
//
// Description:		Assigns default dialog font
//
// INPUTS:          
// 
// RETURNS:         
//
// NOTES:			
// 
// MODIFICATIONS:
//
// Name                     Date        Version Comments
// NT ALMOND				15092000    1.5     Origin
// NT ALMOND				02072002    1.6     Fix crash when GetFont returns NULL
//////////////////////////////////////////////////////////////////////////
void CLabel::PreSubclassWindow() 
{

	CStatic::PreSubclassWindow();

	CFont* cf = GetFont();
	if(cf !=NULL)
	{
		cf->GetObject(sizeof(m_lf),&m_lf);
	}
	else
	{
		GetObject(GetStockObject(SYSTEM_FONT),sizeof(m_lf),&m_lf);
	}

	ReconstructFont();
	
}
Esempio n. 21
0
//////////////////////////////////////////////////////////////////////////
//
// Function:		CLabel::SetFontSize
//
// Description:		Sets the font size
//
// INPUTS:          True of false
// 
// RETURNS:         Reference to 'this' object
//
// NOTES:			
// 
// MODIFICATIONS:
//
// Name                     Date        Version Comments
// NT ALMOND				26/08/98    1.0     Origin
//
//////////////////////////////////////////////////////////////////////////
CLabel& CLabel::SetFontSize(int nSize)
{

	CFont cf;
	LOGFONT lf;

	cf.CreatePointFont(nSize * 10, m_lf.lfFaceName);
	cf.GetLogFont(&lf);

	m_lf.lfHeight = lf.lfHeight;
	m_lf.lfWidth  = lf.lfWidth;

//	nSize*=-1;
//	m_lf.lfHeight = nSize;
	ReconstructFont();
	UpdateSurface();

	return *this;
}
Esempio n. 22
0
//////////////////////////////////////////////////////////////////////////
//
// Function:		CLabel::SetRotationAngle
//
// Description:		Sets the rotation angle for the current font.
//
// INPUTS:          Angle in Degress
// 
// RETURNS:         Reference to 'this' object
//
// NOTES:			
// 
// MODIFICATIONS:
//
// Name                     Date        Version Comments
// NT ALMOND				22/10/98    1.0     Origin
//
//////////////////////////////////////////////////////////////////////////
CLabel& CLabel::SetRotationAngle(UINT nAngle,BOOL bRotation)
{
	// Arrrrh...
	// Your looking in here why the font is rotating, aren't you?
	// Well try setting the font name to 'Arial' or 'Times New Roman'
	// Make the Angle 180 and set bRotation to true.
	//
	// Font rotation _ONLY_ works with TrueType fonts...
	//
	// 
	m_lf.lfEscapement = m_lf.lfOrientation = (nAngle * 10);
	m_bRotation = bRotation;
	
	ReconstructFont();
	
	UpdateSurface();


	return *this;
}
Esempio n. 23
0
void CTCGroupBox::PreSubclassWindow()
{
    // TODO: Add your specialized code here and/or call the base class

    CButton::PreSubclassWindow();

    //modified the style to avoid text overlap when press tab
    ModifyStyle(0, BS_ICON);

    // Get Defalut Font
    CFont* cf = GetFont();
    if(cf !=NULL)
    {
        cf->GetObject(sizeof(m_lf),&m_lf);
    }
    else
    {
        GetObject(GetStockObject(SYSTEM_FONT),sizeof(m_lf),&m_lf);
    }

    ReconstructFont();
}
Esempio n. 24
0
void CRoundSliderCtrl::SetFontItalic(const bool bSet)
{
	m_lf.lfItalic = bSet;
	ReconstructFont();
}
Esempio n. 25
0
void CLabel::SetFontUnderline(bool bSet)
{	
	m_lf.lfUnderline = bSet;
	ReconstructFont();
	Redraw();
}
Esempio n. 26
0
void CLabel::SetFontItalic(bool bSet)
{
	m_lf.lfItalic = bSet;
	ReconstructFont();
	Redraw();
}
Esempio n. 27
0
void CRoundSliderCtrl::SetFontBold(const bool bSet)
{
	m_lf.lfWeight = bSet;
	ReconstructFont();
}
Esempio n. 28
0
void CRoundSliderCtrl::SetFontUnderline(const bool bSet)
{
	m_lf.lfUnderline = bSet;
	ReconstructFont();
}
Esempio n. 29
0
void CRoundSliderCtrl::SetFontName(const CString& strFont)
{
	strcpy(m_lf.lfFaceName, strFont);
	ReconstructFont();
}
Esempio n. 30
0
void CRoundSliderCtrl::SetFontSize(const int nSize)
{
	m_lf.lfHeight = -nSize;
	ReconstructFont();
}