Click here to Skip to main content
15,903,033 members
Home / Discussions / C / C++ / MFC
   

C / C++ / MFC

 
GeneralRe: Terminating threads cleanly in a DLL when it is unloaded Pin
Code-o-mat29-Nov-08 0:23
Code-o-mat29-Nov-08 0:23 
GeneralRe: Terminating threads cleanly in a DLL when it is unloaded Pin
Randor 29-Nov-08 17:24
professional Randor 29-Nov-08 17:24 
AnswerRe: Terminating threads cleanly in a DLL when it is unloaded Pin
Richard Andrew x6428-Nov-08 12:40
professionalRichard Andrew x6428-Nov-08 12:40 
GeneralRe: Terminating threads cleanly in a DLL when it is unloaded Pin
Code-o-mat28-Nov-08 23:39
Code-o-mat28-Nov-08 23:39 
AnswerRe: Terminating threads cleanly in a DLL when it is unloaded Pin
Jijo.Raj28-Nov-08 12:41
Jijo.Raj28-Nov-08 12:41 
GeneralRe: Terminating threads cleanly in a DLL when it is unloaded Pin
Code-o-mat28-Nov-08 23:56
Code-o-mat28-Nov-08 23:56 
QuestionGDI+ MeasureString - optional codepointsFitted function parameter Pin
bob1697228-Nov-08 10:16
bob1697228-Nov-08 10:16 
AnswerRe: GDI+ MeasureString - optional codepointsFitted function parameter Pin
Randor 28-Nov-08 13:27
professional Randor 28-Nov-08 13:27 
Seems to be working fine for me. The layout rect you are passing probably has enough width + height to hold all of your characters. Keep in mind that MeasureString will utilize *all* available space including height. So when it runs out of width it continues to render the text onto the next line. Pass it a HUGE string with a BIG font and see if you get the same results.

My test code:

RectF rSize;
INT iFitted;
INT iLines;
StringFormat format;
format.SetAlignment(StringAlignmentNear);
Font fontBold(L"Arial", 32, FontStyleBold);

CRect rcWin;
GetWindowRect(&rcWin);
RectF rgd(rctWin.left,rctWin.top,rctWin.right,rctWin.top + 32);
graphics.MeasureString(L"Test-Test-Test",-1,&fontBold,rgd,&format,&rSize,&iFitted,&iLines);


I copied and pasted that "Test-Test-Test" string about 20 times back to back to make my string bigger. The function correctly returns how many characers it was able to fit into the rect.

Best Wishes,
-David Delaune
GeneralRe: GDI+ MeasureString - optional codepointsFitted function parameter Pin
bob1697228-Nov-08 14:34
bob1697228-Nov-08 14:34 
GeneralRe: GDI+ MeasureString - optional codepointsFitted function parameter Pin
Randor 28-Nov-08 14:48
professional Randor 28-Nov-08 14:48 
QuestionHow to get "MAC Number"? Pin
Joseph Marzbani28-Nov-08 9:43
Joseph Marzbani28-Nov-08 9:43 
AnswerRe: How to get "MAC Number"? Pin
Jijo.Raj28-Nov-08 9:59
Jijo.Raj28-Nov-08 9:59 
GeneralRe: How to get "MAC Number"? Pin
Joseph Marzbani28-Nov-08 10:38
Joseph Marzbani28-Nov-08 10:38 
GeneralRe: How to get "MAC Number"? Pin
Jijo.Raj28-Nov-08 12:36
Jijo.Raj28-Nov-08 12:36 
AnswerRe: How to get "MAC Number"? Pin
Code-o-mat28-Nov-08 10:09
Code-o-mat28-Nov-08 10:09 
GeneralRe: How to get "MAC Number"? Pin
Joseph Marzbani28-Nov-08 10:36
Joseph Marzbani28-Nov-08 10:36 
QuestionHow to Initializing CString in constructor Pin
krishnakumartm28-Nov-08 8:35
krishnakumartm28-Nov-08 8:35 
AnswerRe: How to Initializing CString in constructor Pin
Maximilien28-Nov-08 8:50
Maximilien28-Nov-08 8:50 
AnswerRe: How to Initializing CString in constructor Pin
Code-o-mat28-Nov-08 8:53
Code-o-mat28-Nov-08 8:53 
GeneralRe: How to Initializing CString in constructor Pin
Mark Salsbery28-Nov-08 9:11
Mark Salsbery28-Nov-08 9:11 
QuestionIs Window / Dialog neede for a UI thread Pin
vipin_nvk28-Nov-08 6:45
vipin_nvk28-Nov-08 6:45 
AnswerRe: Is Window / Dialog neede for a UI thread Pin
Code-o-mat28-Nov-08 9:00
Code-o-mat28-Nov-08 9:00 
AnswerRe: Is Window / Dialog neede for a UI thread Pin
Peter Weyzen28-Nov-08 20:24
Peter Weyzen28-Nov-08 20:24 
GeneralRe: Is Window / Dialog neede for a UI thread Pin
vipin_nvk28-Nov-08 23:47
vipin_nvk28-Nov-08 23:47 
GeneralRe: Is Window / Dialog neede for a UI thread Pin
Peter Weyzen29-Nov-08 8:32
Peter Weyzen29-Nov-08 8:32 

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.