font size in dialog - Programmer

This is a discussion on font size in dialog - Programmer ; While I was developing my MFC APP, I changed my windows font from 96 dpi to 115 dpi. And I found that in two of my boxes the size of the text and some control (like picture) are differents. How ...

+ Reply to Thread
Results 1 to 2 of 2

Thread: font size in dialog

  1. font size in dialog

    While I was developing my MFC APP, I changed my windows font from 96
    dpi to 115 dpi. And I found that in two of my boxes the size of the
    text and some control (like picture) are differents. How can I make
    them the same? Do I need to redesign my dialog?

    Thanks,

    qq

  2. Re: font size in dialog

    qq,

    Pictures are typically measured in absolute pixels, while controls are
    measured in units based on the current system font (that much you have
    already noticed!).

    If I run in a high resolution, it might be for two different reasons:

    1. I want to be able to see more windows on screen. Dialogboxes will be, in
    absolute measures, smaller then if I run in a lower resolution.

    2. I want to get higher readability by using a larger system font. In this
    case, dialogboxes will *not* be smaller, but the definition of the font will
    be "better".

    The last case is not so uncommon as one might believe, in my experience.
    With advancing age, eyesight gets murkier and murkier, something you you
    young farts out there should not laugh at :-)

    Well, this is not exactly answering you question, is it? For pictures, you
    must either create one picture for each resolution - something that is
    impossible, or create one or a few, scaling them to fit. To make scaling
    pictures, you can for example derive a class from CStatic, load the best
    size in - for example - the Create function and scale it in OnPaint. Note
    that scaling pictures can give a very, very disappointing result!

    For other types of controls, dynamically created (where you use pixels to
    set the size) you can for example use a static placeholder control.

    Johan Rosengren
    Abstrakt Mekanik AB

    "Quick Function" wrote in message
    news:2147b006.0307160831.4f476d5e@posting.google.c om...
    > While I was developing my MFC APP, I changed my windows font from 96
    > dpi to 115 dpi. And I found that in two of my boxes the size of the
    > text and some control (like picture) are differents. How can I make
    > them the same? Do I need to redesign my dialog?
    >
    > Thanks,
    >
    > qq




+ Reply to Thread