Results 1 to 3 of 3

Thread: Convert pixels to dialog units

  1. #1

    Thread Starter
    PowerPoster Ellis Dee's Avatar
    Join Date
    Mar 2007
    Location
    New England
    Posts
    3,530

    Convert pixels to dialog units

    How do you convert dialog units to pixels?

    Here is a starting point. Any help is appreciated.

    EDIT: This article may contain the solution I need. If so, I'll mark this thread resolved.
    Last edited by Ellis Dee; Jun 3rd, 2009 at 10:07 AM.

  2. #2

    Thread Starter
    PowerPoster Ellis Dee's Avatar
    Join Date
    Mar 2007
    Location
    New England
    Posts
    3,530

    Re: Convert pixels to dialog units

    The problem seems to be that dialog units are defined in the system font. So all I really need is to find out what the system font is. Anyone know how to do that?

  3. #3
    VB-aholic & Lovin' It LaVolpe's Avatar
    Join Date
    Oct 2007
    Location
    Beside Waldo
    Posts
    19,541

    Re: Convert pixels to dialog units

    See if these links help
    1. Converting dialog units to pixels (reverse of what you asked)
    2. SystemParametersInfo API to retreive system font. Search page for SPI_SETNONCLIENTMETRICS. Note there are several system fonts, depending on what part of a window one is talking about.
    Insomnia is just a byproduct of, "It can't be done"

    Classics Enthusiast? Here's my 1969 Mustang Mach I Fastback. Her sister '67 Coupe has been adopted

    Newbie? Novice? Bored? Spend a few minutes browsing the FAQ section of the forum.
    Read the HitchHiker's Guide to Getting Help on the Forums.
    Here is the list of TAGs you can use to format your posts
    Here are VB6 Help Files online


    {Alpha Image Control} {Memory Leak FAQ} {Unicode Open/Save Dialog} {Resource Image Viewer/Extractor}
    {VB and DPI Tutorial} {Manifest Creator} {UserControl Button Template} {stdPicture Render Usage}

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  



Click Here to Expand Forum to Full Width