Click here to Skip to main content
15,890,717 members
Home / Discussions / C / C++ / MFC
   

C / C++ / MFC

 
AnswerRe: Integrate dll with vc++ application [modified] Pin
_AnsHUMAN_ 13-Jun-06 0:16
_AnsHUMAN_ 13-Jun-06 0:16 
AnswerRe: Integrate dll with vc++ application Pin
Laxman Auti13-Jun-06 0:24
Laxman Auti13-Jun-06 0:24 
GeneralRe: Integrate dll with vc++ application Pin
FutureSE13-Jun-06 1:42
FutureSE13-Jun-06 1:42 
GeneralRe: Integrate dll with vc++ application Pin
Laxman Auti13-Jun-06 2:24
Laxman Auti13-Jun-06 2:24 
AnswerRe: Integrate dll with vc++ application Pin
idlidosa13-Jun-06 2:22
idlidosa13-Jun-06 2:22 
QuestionGetTextMetrics Pin
Nyarlatotep12-Jun-06 23:30
Nyarlatotep12-Jun-06 23:30 
AnswerRe: GetTextMetrics Pin
Laxman Auti12-Jun-06 23:38
Laxman Auti12-Jun-06 23:38 
GeneralRe: GetTextMetrics [modified] Pin
Nyarlatotep12-Jun-06 23:44
Nyarlatotep12-Jun-06 23:44 
uhm. the code is like this ...

SelectObject(hfont1);
GetTextMetrics(hdc,tm1); // it works
TextOut(hdc, ....);
y += tm1.tmHeight + tm1.tmExternalLeading;

SelectObject(hfont2);
GetTextMetrics(hdc,tm2); // it hangs the program

if TextOut() is not called, the second GetTextMetrics() does not hang.

The only solution i've found is to retrieve all the text metrics before doing any TextOut()

SelectObject(hfont1);
GetTextMetrics(hdc,tm1);
SelectObject(hfont2);
GetTextMetrics(hdc,tm2);

SelectObject(hfont1);
TextOut(hdc, ....);
y += tm1.tmHeight + tm1.tmExternalLeading;
...
...





-- modified at 5:44 Tuesday 13th June, 2006
GeneralRe: GetTextMetrics Pin
Laxman Auti13-Jun-06 0:16
Laxman Auti13-Jun-06 0:16 
GeneralRe: GetTextMetrics Pin
Nyarlatotep13-Jun-06 0:21
Nyarlatotep13-Jun-06 0:21 
GeneralRe: GetTextMetrics Pin
Laxman Auti13-Jun-06 1:00
Laxman Auti13-Jun-06 1:00 
GeneralRe: GetTextMetrics Pin
Arvind Bharti13-Jun-06 0:21
Arvind Bharti13-Jun-06 0:21 
GeneralRe: GetTextMetrics Pin
Nyarlatotep13-Jun-06 0:28
Nyarlatotep13-Jun-06 0:28 
Questionpackage Pin
Tran Ngoc Minh12-Jun-06 23:20
Tran Ngoc Minh12-Jun-06 23:20 
AnswerRe: package Pin
Ganesh_T12-Jun-06 23:28
Ganesh_T12-Jun-06 23:28 
AnswerRe: package Pin
Justin Tay12-Jun-06 23:30
Justin Tay12-Jun-06 23:30 
GeneralRe: package Pin
Laxman Auti12-Jun-06 23:30
Laxman Auti12-Jun-06 23:30 
AnswerRe: package Pin
Hamid_RT13-Jun-06 2:32
Hamid_RT13-Jun-06 2:32 
QuestionHow to represent XML hierarchy as classes Pin
karthik Tamizhmathi12-Jun-06 23:18
karthik Tamizhmathi12-Jun-06 23:18 
AnswerRe: How to represent XML hierarchy as classes Pin
Cedric Moonen12-Jun-06 23:20
Cedric Moonen12-Jun-06 23:20 
GeneralRe: How to represent XML hierarchy as classes Pin
Laxman Auti12-Jun-06 23:27
Laxman Auti12-Jun-06 23:27 
AnswerRe: How to represent XML hierarchy as classes Pin
karthik Tamizhmathi12-Jun-06 23:46
karthik Tamizhmathi12-Jun-06 23:46 
QuestionWhat's wrong with this code ? (CString issue) Pin
Tnarol12-Jun-06 22:49
Tnarol12-Jun-06 22:49 
AnswerRe: What's wrong with this code ? (CString issue) Pin
Viorel.12-Jun-06 22:53
Viorel.12-Jun-06 22:53 
AnswerRe: What's wrong with this code ? (CString issue) Pin
kk.tvm12-Jun-06 22:54
kk.tvm12-Jun-06 22:54 

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.