Code:
// set font attributes (may be called in the middle of a print job)
bool SetFont(int size, LPCTSTR face, int weight, BOOL italic, BOOL under, BOOL strike);
(I just copied this from the header file). I didn't add individual functions to alter different attributes mainly because I was being lazy.
You can do something like this:
Code:
printDlg->SetFont(printDlg->GetFontSize(),
printDlg->GetFontFace(),
printDlg->GetFontWeight(),
printDlg->IsFontItalic(),
printDlg->IsFontUnderline(),
printDlg->IsFontStrikeout());
Just set that bold part to true if you want an underline or false if not... The better way to go would be to add functions into the header file to alter just the attribute you want. For example:
Code:
bool SetUnderline(BOOL underlineItYo) {
return SetFont(printDlg->GetFontSize(),
printDlg->GetFontFace(),
printDlg->GetFontWeight(),
printDlg->IsFontItalic(),
underlineItYo,
printDlg->IsFontStrikeout());
}
And so on...