예제 #1
0
// Initialize a CFontDescription object with the attributes that
// make a font unique.
BOOL CTextStyle::GetFontDescription(CFontDescription* pFontDescription)
{
	BOOL fResult = FALSE;

	// Get the typeface number.
	int nTypeface = ((PMGFontServer*)(Database()->get_font_server()))->font_record_to_face(Font());
	if (nTypeface != -1)
	{
		// Compute the style (bold, italic) of the typeface.
		int nFontStyle = 0;
		if (Bold())
		{
			nFontStyle |= FONT_STYLE_Bold;
		}
		if (Italic())
		{
			nFontStyle |= FONT_STYLE_Italic;
		}

		// Initialize the font description.
		pFontDescription->m_nTypeface = typeface_for_fstyle(nTypeface, (FONT_STYLE)nFontStyle);
		pFontDescription->m_lPointSize = Size();
		pFontDescription->m_lHorizontalExpansion = Expansion();
		pFontDescription->m_Fill = Fill();
		pFontDescription->m_Outline = Outline();
		pFontDescription->m_Shadow = Shadow();

		fResult = TRUE;
	}

	return fResult;
}
예제 #2
0
	virtual void OnInit ()
	{
		Dialog_Moving_c::OnInit ();

		Bold ( IDC_TITLE );

		Loc ( IDC_TITLE, T_DLG_DELETE_PROGRESS );
		Loc ( IDCANCEL, T_TBAR_CANCEL );

		SetTimer ( m_hWnd, MY_UNIQUE_TIMER_DELETE, 0, NULL );
		ItemTxt ( IDC_NUM_FILES, NewString ( Txt ( T_DLG_DELETED_FILES ), 0 ) );

		m_Deleter.SetWindow ( m_hWnd );
	}
예제 #3
0
//
// Initializing text display values.
//
void CTextDisplay::SetAll(CString * show_text, char *font_name, LONG font_size,
			  TextAlignment alignment, BOOL bold, BOOL italic, BOOL underline, COLORREF color)
{
	// Update all settings for the displayed text, but do not update the
	// window until everything has been updated.
	SetText(show_text, FALSE);
	SetFontType(font_name, FALSE);
	SetFontSize(font_size, FALSE);
	SetTextAlignment(alignment, FALSE);
	Bold(bold, FALSE);
	Italic(italic, FALSE);
	Underline(underline, FALSE);
	SetTextColor(color, FALSE);

	// Update the display.
	RedrawWindow();
}