Click here to Skip to main content
15,898,371 members
Home / Discussions / C / C++ / MFC
   

C / C++ / MFC

 
AnswerRe: How can I create read-only file ??? Pin
Carlos Antollini30-Jul-01 10:09
Carlos Antollini30-Jul-01 10:09 
AnswerRe: How can I create read-only file ??? Pin
Hadi Rezaee30-Jul-01 19:28
Hadi Rezaee30-Jul-01 19:28 
QuestionCan a CRuntimeClass be Serialized? Pin
Joel Holdsworth30-Jul-01 9:22
Joel Holdsworth30-Jul-01 9:22 
AnswerRe: Can a CRuntimeClass be Serialized? Pin
Tomasz Sowinski30-Jul-01 9:27
Tomasz Sowinski30-Jul-01 9:27 
GeneralScaling Fonts, Zooming. Pin
Mike Doner30-Jul-01 8:53
Mike Doner30-Jul-01 8:53 
GeneralRe: Scaling Fonts, Zooming. Pin
Tomasz Sowinski30-Jul-01 9:55
Tomasz Sowinski30-Jul-01 9:55 
GeneralRe: Scaling Fonts, Zooming. Pin
Mike Doner31-Jul-01 5:02
Mike Doner31-Jul-01 5:02 
GeneralRe: Scaling Fonts, Zooming. Pin
Tomasz Sowinski31-Jul-01 6:32
Tomasz Sowinski31-Jul-01 6:32 
I call "GetTextExtent32" to find out the average height and width of a characer.

Well, this is an average width. I think the best solution would be using DrawText instead of GetTextExtent32/ExtTextOut. You can use DrawText with DT_CALCRECT - in this case, nothing is drawn - the function calculates the rectangle needed to fit your string. So when user zooms in/out, you should create a font with given height, then paint all boxes using rectangle returned by DrawText called with DT_CALCRECT.



Tomasz Sowinski -- http://www.shooltz.com
GeneralRe: Scaling Fonts, Zooming. Pin
AndyC30-Jul-01 12:51
AndyC30-Jul-01 12:51 
GeneralRe: Scaling Fonts, Zooming. Pin
Mike Doner31-Jul-01 5:06
Mike Doner31-Jul-01 5:06 
Generalkeeping my selections in listbox Pin
Ananya Sen Gupta30-Jul-01 8:14
Ananya Sen Gupta30-Jul-01 8:14 
GeneralRe: keeping my selections in listbox Pin
Tomasz Sowinski30-Jul-01 10:03
Tomasz Sowinski30-Jul-01 10:03 
GeneralMFC modal "wait" dialog Pin
flurinator30-Jul-01 8:02
flurinator30-Jul-01 8:02 
GeneralRe: MFC modal Pin
Tomasz Sowinski30-Jul-01 9:36
Tomasz Sowinski30-Jul-01 9:36 
GeneralRe: MFC modal Pin
Matt Gullett30-Jul-01 18:01
Matt Gullett30-Jul-01 18:01 
GeneralI need some help with some errors... Pin
30-Jul-01 7:54
suss30-Jul-01 7:54 
GeneralRe: I need some help with some errors... Pin
Tomasz Sowinski30-Jul-01 9:38
Tomasz Sowinski30-Jul-01 9:38 
GeneralRe: I need some help with some errors... Pin
30-Jul-01 16:15
suss30-Jul-01 16:15 
GeneralRe: I need some help with some errors... Pin
Christian Graus30-Jul-01 16:31
protectorChristian Graus30-Jul-01 16:31 
GeneralRe: I need some help with some errors... Pin
Matt Gullett30-Jul-01 17:52
Matt Gullett30-Jul-01 17:52 
GeneralRe: I need some help with some errors... Pin
31-Jul-01 10:50
suss31-Jul-01 10:50 
GeneralRe: I need some help with some errors... Pin
Matt Gullett31-Jul-01 13:31
Matt Gullett31-Jul-01 13:31 
GeneralRe: I need some help with some errors... Pin
Matt Gullett31-Jul-01 13:33
Matt Gullett31-Jul-01 13:33 
QuestionWhen is m_wndToolBar initially sized inplace? Pin
Kristian Nilssen30-Jul-01 7:50
Kristian Nilssen30-Jul-01 7:50 
GeneralRemove icon from taskbar Pin
Sreejumon30-Jul-01 7:15
Sreejumon30-Jul-01 7:15 

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.