Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations wOOdy-Soft on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

just one! bold line please....

Status
Not open for further replies.

zigular

Technical User
Jun 29, 2004
18
DE
hello at all,
is it simply possible to get just ONE bold line
in the AboutDlg without going crazy???????


i did sth like this (see below) but it doesn't work
of course...


thank you for answering!!
cheers

hilmar


CODE EXAMPLE
==================================================
.
.



private:
CFont boldLine;
CString boldLineText;
};

CAboutDlg::CAboutDlg() : CDialog(CAboutDlg::IDD)
{
//{{AFX_DATA_INIT(CAboutDlg)
//}}AFX_DATA_INIT
}


BOOL CAboutDlg::OnInitDialog()
{
CDialog::OnInitDialog();

// TODO: Zusätzliche Initialisierung hier einfügen
boldLineText = "Programming and Support";

boldLine.CreateFont(0, 0, 0, 0, FW_BOLD, 0, 0, 0,
DEFAULT_CHARSET, OUT_CHARACTER_PRECIS,
CLIP_CHARACTER_PRECIS, DEFAULT_QUALITY,
DEFAULT_PITCH | FF_DONTCARE, boldLineText);

ctrlDisplayBoldLine.SetFont(&boldLine);

return TRUE; // return TRUE unless you set the focus to a control
// EXCEPTION: OCX-Eigenschaftenseiten sollten FALSE zurückgeben
}

==============================================
end
 
You need to display the text in the OnPaint event of the dialog.
There you will get a pDC parameter and you can use pDC->TextOut() to display your text.

Sorry, that I don't have time to send you a sample, but you can read about TextOut in MSDN.

Hope this helps.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top