Click here to Skip to main content
15,909,737 members
Home / Discussions / C / C++ / MFC
   

C / C++ / MFC

 
GeneralRe: passing parameter in thread Pin
toxcct27-Feb-07 1:49
toxcct27-Feb-07 1:49 
GeneralRe: passing parameter in thread Pin
James R. Twine27-Feb-07 1:24
James R. Twine27-Feb-07 1:24 
AnswerRe: passing parameter in thread Pin
James R. Twine27-Feb-07 1:29
James R. Twine27-Feb-07 1:29 
GeneralRe: passing parameter in thread Pin
neha.agarwal2727-Feb-07 1:47
neha.agarwal2727-Feb-07 1:47 
GeneralRe: passing parameter in thread Pin
James R. Twine27-Feb-07 2:46
James R. Twine27-Feb-07 2:46 
GeneralRe: passing parameter in thread Pin
neha.agarwal2727-Feb-07 19:01
neha.agarwal2727-Feb-07 19:01 
GeneralRe: passing parameter in thread Pin
James R. Twine28-Feb-07 17:11
James R. Twine28-Feb-07 17:11 
QuestionStrange Font bolding Pin
super_ttd26-Feb-07 22:15
super_ttd26-Feb-07 22:15 
Hi all,

I've just tried to bold the font in a particular static in one of my dialogs.
for this i have done this :
I Have 2 statics left aligned, containing exactly the same string (the upper one is for comparison purpose).
The static I modify has a control variable of type CStatic on it.
here is the code i put in the dialog's OnInitDialog() :
HDC hdc = (HDC)(*m_myStatic.GetDC());
TEXTMETRIC tm;
::GetTextMetrics(hdc, &tm);
int n = ::GetTextFace(hdc, 0, NULL);
TCHAR* pszFontName = new TCHAR[n];
::GetTextFace(hdc, n, pszFontName);
CFont nf;
nf.CreateFont(tm.tmHeight,
              tm.tmAveCharWidth,
              0,
              0,
              tm.tmWeight,
              FALSE,
              tm.tmUnderlined,
              tm.tmStruckOut,
              tm.tmCharSet,
              OUT_DEFAULT_PRECIS,
              CLIP_DEFAULT_PRECIS,
              DEFAULT_QUALITY,
              tm.tmPitchAndFamily,
              pszFontName);
delete[] pszFontName;
m_myStatic.SetFont(&nf);

as you can see, i merely duplicate the original font without bolding it, but what a surprise, the static is bold anyway WTF | :WTF:

can anyone explain me why the font (Tahoma) is acting like this ?
AnswerRe: Strange Font bolding Pin
Nibu babu thomas26-Feb-07 23:57
Nibu babu thomas26-Feb-07 23:57 
AnswerRe: Strange Font bolding Pin
David Crow27-Feb-07 2:56
David Crow27-Feb-07 2:56 
GeneralRe: Strange Font bolding Pin
super_ttd27-Feb-07 3:04
super_ttd27-Feb-07 3:04 
JokeRe: Strange Font bolding Pin
Nibu babu thomas27-Feb-07 3:38
Nibu babu thomas27-Feb-07 3:38 
Questionsetting of properties for a ocx control Pin
zareee26-Feb-07 21:33
zareee26-Feb-07 21:33 
QuestionHow to Calculate no of timers. Pin
birajendu26-Feb-07 21:13
birajendu26-Feb-07 21:13 
AnswerRe: How to Calculate no of timers. Pin
David Crow27-Feb-07 2:57
David Crow27-Feb-07 2:57 
Questionmultiple c files in visual studio 6 project Pin
Ayman Mashal26-Feb-07 20:08
Ayman Mashal26-Feb-07 20:08 
AnswerRe: multiple c files in visual studio 6 project Pin
Cedric Moonen26-Feb-07 20:23
Cedric Moonen26-Feb-07 20:23 
AnswerRe: multiple c files in visual studio 6 project Pin
Rajesh R Subramanian26-Feb-07 20:24
professionalRajesh R Subramanian26-Feb-07 20:24 
QuestionRe: multiple c files in visual studio 6 project Pin
Ayman Mashal26-Feb-07 21:08
Ayman Mashal26-Feb-07 21:08 
AnswerRe: multiple c files in visual studio 6 project Pin
Cedric Moonen26-Feb-07 21:17
Cedric Moonen26-Feb-07 21:17 
GeneralRe: multiple c files in visual studio 6 project Pin
ensger27-Feb-07 0:04
ensger27-Feb-07 0:04 
AnswerRe: multiple c files in visual studio 6 project Pin
prasad_som27-Feb-07 1:34
prasad_som27-Feb-07 1:34 
AnswerRe: multiple c files in visual studio 6 project Pin
toxcct26-Feb-07 23:15
toxcct26-Feb-07 23:15 
AnswerRe: multiple c files in visual studio 6 project Pin
David Crow27-Feb-07 3:00
David Crow27-Feb-07 3:00 
QuestionCustom Menu Pin
Nishad S26-Feb-07 19:44
Nishad S26-Feb-07 19:44 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.