Информационный сайт

 

Реклама
bulletinsite.net -> Книги на сайте -> Программисту -> Янг Майкл Дж. -> "Visual С++ 6. Полное руководство: В 2 т.(том2)" -> 36

Visual С++ 6. Полное руководство: В 2 т.(том2) - Янг Майкл Дж.

Янг Майкл Дж. Visual С++ 6. Полное руководство: В 2 т.(том2) — Бином, 2006. — 530 c.
Скачать (прямая ссылка): vicualcc2006t2.djvu
Предыдущая << 1 .. 30 31 32 33 34 35 < 36 > 37 38 39 40 41 42 .. 173 >> Следующая

m_LineTable [Num++] += "PROOF_QUALITY"; break;
default:
m_LineTable [Num++] += "unspecified output quality"; break;
}
m_LineTable [Num] = "IfPitohAndFamily: "; switch (FontDialog.m_lf.IfPitohAndFamily ? 0x0003) {
case DEFAULT PITCH:
m_LineTable [Num] += "DEFAULT_PITCH; "; break;
case FIXED_PITCH:
mJtiineTable [Num] += "FIXED_PITCH; "; break;
case VARIABLE_PITCH:
m_LineTable [Num] += "VARIABLE_PITCH; "; break;
default:
m_LineTable [Num] += "unspecified pitch; "; break;
>
switch (FontDialog.m_lf.IfPitchAndFamily ? OxOOFO) {
case FFJDECORATIVE:
m_LineTable [Num++] += ''FF_DECORATIVE'' ; break;
case FFJDONTCARE:
m_LineTable [Num++] += "FFJDONTCARE"; break;
case FF_MODERN:
m_LineTable [Num++] += "FF_MODERN"; break;
case FF_ROMAN:
m_LineTable [Num++] += "FF_ROMAN"; break;
case FF_SCRIPT:
m_LineTable [Num++] += "FF_SCRIPT"; break;
case FF_SW1SS:
m_LineTable [Num++] += "FF_SWISS"; break;
default:
m_LineTable [Num++] += "unspecified family"; break;
}
m_LineTable [Num] = "IfFaceName: ";
m_LineTable [Num++] += FontDialog.m_lf.IfFaceName;
m_LineTable [Num++] = "";
// сохранение значений TEXTMETRIC:
// создание объекта контекста устройства, // связанного с окном представления:
POSITION Pos = GetFirstViewPosition ();
CView *PView = GetNextView (Pos);
CClientDC ClientDC (PView);
// выбор нового шрифта в объекте контекста устройства: ClientDC.SelectObject (&m_Font); TEXTMETRIC TM;
ClientDC.GetTextMetrics (6TM);
m_LineTable [Num++] = "TEXTMETRIC fields:";
m_LineTable [Num] = "tmHeight: "; sprintf (NumBuf,"%d" , TM. tmHeight) ; m_LineTable [Num++] += NumBuf;
m_LineTable [Num] = "tmAscent: "; sprintf (NumBuf,"%d", TM.tmAscent); m_LineTable [Num++] += NumBuf;
m_LineTable [Num] = "tmDescent: "; sprintf (NumBuf,"%d", TM. tmDescent); m_LineTable [Num++] += NumBuf;
m_LineTable [Num] = "tmlnternalLeading: "; sprintf (NumBuf, "%d", TM.tmlnternalLeading); m_LineTable [Num++] += NumBuf;
m_LineTable [Num] = "tmExternalLeading: "; sprintf (NumBuf,"%d", TM.tmExternalLeading); m_LineTable [Num++] += NumBuf;
m_LineTable [Num] = "tmAveCharWidth: "; sprintf (NumBuf,"%d", TM. tmAveCharWidth); m_LineTable [Num++] += NumBuf;
m_LineTable [Num] = "tmMaxCharWidth: "; sprintf (NumBuf,"%d", TM. tmMaxCharWidth); m_LineTable [Num++] += NumBuf;
m_LineTable [Num] = "tmWeight: "; sprintf (NumBuf,"%d", TM. tmWeight) ; m LineTable [Num++] += NumBuf;
m_LineTable [Num] = "tmOverhang: ";
sprintf (NumBuf,"%d", TM.tmOverhang); m_LineTable [Num++] += NumBuf;
m_LineTable [Num] = "tmDigitizedAspectX: "; sprintf (NumBuf, "%d", TM. tmDigitizedAspectX) ; m_LineTable [Num++] += NumBuf;
m_LineTable [Num] = "tmDigitizedAspectY: "; sprintf (NumBuf,"%d", TM.tmDigitizedAspectY); m_LineTable [Num++] += NumBuf;
m_LineTable [Num] = "tmFirstChar: "; sprintf (NumBuf,"%d", TM.tmFirstChar); m_LineTable [Num++] += NumBuf;
m_LineTable [Num] = "tmLastChar: "; sprintf (NumBuf,"%d", TM. tmLastChar); m_LineTable [Num++] += NumBuf;
m_LineTable [Num] = "tmDefaultChar: "; sprintf (NumBuf,"%d", TM.tmDefaultChar); m_LineTable [Num++] += NumBuf;
m_LineTable [Num] = "tmBreakChar: "; sprintf (NumBuf,"%d", TM. tmBreakChar) ; m_LineTable [Num++] += NumBuf;
m_LineTable [Num] = "tmltalic: "; sprintf (NumBuf,"%d", TM.tmltalic); m_LineTable [Num++] += NumBuf;
m_LineTable [Num] = "tmUnderlined: "; sprintf (NumBuf,"%d", TM. tmUnderlined); m_LineTable [Num++] += NumBuf;
m_LineTable [Num] = "tmStruckOut: "; sprintf (NumBuf,"%d", TM.tmStruckOut); m_LineTable [Num++] += NumBuf;
m_LineTable [Num++] = "tmPitchAndFamily: ";
m_LineTable [Num] = " Pitch Info: ";
if (TM.tmPitchAndFamily ? TMPF_FIXED_PITCH)
m_LineTable [Num] += "variable pitch "; else
m_LineTable [Num] += "fixed pitch ";
if (TM.tmPitchAndFamily ? TMPF_VECTOR) m_LineTable [Num] += "vector font "
if (TM.tmPitchAndFamily ? TMPF_TROETYPE) m_LineTable [Num] += "TrueType font
if (TM.tmPitchAndFamily ? TMPFJDEVICE) m_LineTable [Num] += "device font";
Num++;
m_LineTable [Num] = " Family: "; switch (TM.tmPitchAndFamily ? OxOOFO) {
case FFJDECORATIVE:
m_LineTable [Num++] += "FF_DECORATIVE"; break;
case FF_DONTCARE:
m_LineTable [Num++] += "FF_DONTCARE"; break;
case FF_MODERN:
m_LineTable [Num++] += "FF_MODERN"; break;
case FF_ROMAN:
m_LineTable [Num++] += "FF_ROMAN"; break;
case FF_SCRIPT:
m_LineTable [Num++] += "FF_SCRIPT"; break;
case FF_SW1SS:
m_LineTable [Num++] += "FF_SWISS"; break;
default:
m_LineTable [Num++] += "unknown family"; break;
}
m_LineTable [Num] = "tmCharSet: "; switch (TM.tmCharSet) {
case ANSI_CHARSET:
m_LineTable [Num++] += "ANSI_CHARSET"; break;
case OEM CHARSET:
m_LineTable [Num++] += "OEM_CHARSET"; break;
case SYMBOL_CHARSET:
m_LineTable [Num++] += "SYMBOL_CHARSET"; break;
default:
m_LineTable [Num++] += "unknown character set"; break;
}
// принудительная перерисовка окна представления: UpdateAllViews (NULL);
}
Как уже отмечалось, функции OnOptionsFont передается управление при каждом выборе команды Font... из меню Options. С помощью фрагмента программы, добавленного в функцию OnOptionsFont, выполняются следующие действия.
Предыдущая << 1 .. 30 31 32 33 34 35 < 36 > 37 38 39 40 41 42 .. 173 >> Следующая
Реклама
Авторские права © 2009 AdsNet. Все права защищены.
Rambler's Top100