Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • Home
  • SEARCH
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 8287739
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 8, 20262026-06-08T12:07:46+00:00 2026-06-08T12:07:46+00:00

Someone can explain me how to convert dialog box units to screen coordinates values

  • 0

Someone can explain me how to convert dialog box units to screen coordinates values ?
I saw that there is MapDialogRect function, but its converting RECT, i want to convert the x,y and cx,cy values to screen coordinate values and i dont really understand how to achieve this.

Thanks in advance.

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-08T12:07:47+00:00Added an answer on June 8, 2026 at 12:07 pm

    If you already have a window handle, then just use the MapDialogRect function. As others have noted, MapDialogRect takes a RECT, so if you don’t have a RECT, you can create one.

    RECT rc;
    rc.left = x;
    rc.top = y;
    rc.right = x + cx;
    rc.bottom = y + cy;
    MapDialogRect(hdlg, &rc);
    

    If your problem is that you don’t have a dialog box handle in the first place, then the documentation for the MapDialogRect function tells you how to perform the calculations: Determine the the average character dimensions for the dialog box (which the documentation calls baseunitX and baseunitY) and then plug it into the formulas.

    Note that this calculates the client rectangle of the dialog box. You still have to add non-client space. It’s not clear what you’re trying to do, so I don’t know whether adding non-client space is appropriate or not.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

Can someone please explain why I'm getting this error Type mismatch: cannot convert from
Can someone explain this simple, yet deceiving, anomaly? There are two models, where B
Can someone explain to me how I convert a 32-bit floating point value to
can someone explain to me how to convert BCD to Hexadecimal? For example how
can someone explain to me how to convert BCD to Hexadecimal? For example how
Can someone explain to or link to an article that explains how the parameters
Can someone explain this behavior in Generics? I have a generic function in C#
I'm having trouble to convert this SQL to Linq To Entities. Can someone explain
Can someone explain the jQuery equivalent of Form.event.findElement to me? $('.ad-publish-button').bind('click', function(e) { //
Hallo can someone explain the behaviour of strtotime function with year in non-standard format.

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.