Click here to Skip to main content
15,922,630 members
Home / Discussions / C / C++ / MFC
   

C / C++ / MFC

 
GeneralRe: Getting Windows with a taskbar button Pin
Waleed Eissa17-May-03 4:00
Waleed Eissa17-May-03 4:00 
GeneralRe: Getting Windows with a taskbar button Pin
Baris Kurtlutepe17-May-03 9:22
Baris Kurtlutepe17-May-03 9:22 
GeneralConvert CString to WSTR Pin
John M. Drescher16-May-03 9:30
John M. Drescher16-May-03 9:30 
GeneralRe: Convert CString to WSTR Pin
John M. Drescher16-May-03 9:35
John M. Drescher16-May-03 9:35 
GeneralRe: Convert CString to WSTR Pin
Michael Dunn16-May-03 13:44
sitebuilderMichael Dunn16-May-03 13:44 
GeneralRe: Convert CString to WSTR Pin
John M. Drescher16-May-03 13:57
John M. Drescher16-May-03 13:57 
GeneralRe: Convert CString to WSTR Pin
Tim Smith17-May-03 1:43
Tim Smith17-May-03 1:43 
GeneralFitting Text into a Rect Pin
cdsmith16-May-03 9:15
cdsmith16-May-03 9:15 
I am working on a system were I need to display text in a rect at the best possible resolution. I am passed the a CDC, font name, color, and a CRect.

Here is my current approach (which I am not happy with). The rect is passed in logical coords (HIEnglish), so I convert it to device coords with LPtoDP. I fill in the LOGFONT struct with the lf.lfHeight = -rect.Height(). then select the font into the CDC and use the DrawText function with the DT_CALCRECT option to see how big the text will be. If it does not fit, I loop thru this procedure making the font smaller until it fits in the original rect.

Does anybody have a better idea? Thanks in advance.

Craig
GeneralRe: Fitting Text into a Rect Pin
Neville Franks16-May-03 13:57
Neville Franks16-May-03 13:57 
GeneralRe: Fitting Text into a Rect Pin
Baris Kurtlutepe16-May-03 14:20
Baris Kurtlutepe16-May-03 14:20 
Questionbleared bitmap ? Pin
_skidrow_vn_16-May-03 9:01
_skidrow_vn_16-May-03 9:01 
GeneralWindow icon without close button / system menu Pin
Jonathan Lee Brown16-May-03 7:37
Jonathan Lee Brown16-May-03 7:37 
QuestionHow to use Oracle Stored Procs in MFC using CRecordset derived classes Pin
achandra00716-May-03 7:35
achandra00716-May-03 7:35 
AnswerRe: How to use Oracle Stored Procs in MFC using CRecordset derived classes Pin
basementman16-May-03 8:26
basementman16-May-03 8:26 
QuestionFlashWindowEx not declared? Pin
Aidman16-May-03 6:24
Aidman16-May-03 6:24 
AnswerRe: FlashWindowEx not declared? Pin
Michael Dunn16-May-03 6:47
sitebuilderMichael Dunn16-May-03 6:47 
AnswerRe: FlashWindowEx not declared? Pin
User 665816-May-03 7:56
User 665816-May-03 7:56 
GeneralRe: FlashWindowEx not declared? Pin
Aidman16-May-03 9:33
Aidman16-May-03 9:33 
GeneralRe: FlashWindowEx not declared? Pin
User 665816-May-03 10:01
User 665816-May-03 10:01 
GeneralRe: FlashWindowEx not declared? Pin
Aidman16-May-03 22:49
Aidman16-May-03 22:49 
GeneralMessage mapping Pin
RalfPeter16-May-03 5:51
RalfPeter16-May-03 5:51 
GeneralRe: Message mapping Pin
Bartosz Bien16-May-03 14:25
Bartosz Bien16-May-03 14:25 
GeneralActiveX Licensing Issues Pin
John Childress16-May-03 5:50
John Childress16-May-03 5:50 
GeneralCannot Add Member Pin
Shay Harel16-May-03 5:47
Shay Harel16-May-03 5:47 
GeneralUsing yourDLL in myDLL Pin
SoloVision16-May-03 3:51
SoloVision16-May-03 3:51 

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.