CodeGuru Home VC++ / MFC / C++ .NET / C# Visual Basic VB Forums Developer.com
Results 1 to 3 of 3
  1. #1
    Join Date
    Jun 2001
    Posts
    126

    Easy question needs answering

    I am wanting to put some CButtons on my dialog that are the same size as buttons on toolbars. Problem is I dont know how big the buttons on toolbars are. Also, just for my own enlightenment, are the rulers on the dialog editors measured in pixels or what? I dont know where to find this type of info, so if you know please help a brotha out.
    Thanks


  2. #2
    Join Date
    Nov 2000
    Location
    Colorado Springs,USA
    Posts
    491

    Re: Easy question needs answering

    hi,
    U can get the toolbar button size using GetItemRect. U can set the size of the button using that rectangle.

    Regards,
    soundar


  3. #3
    Join Date
    Oct 1999
    Location
    Broomfield, CO
    Posts
    3,382

    Re: Easy question needs answering

    >> ...are the rulers on the dialog editors measured in pixels or what?

    They are measured in Dialog Box Units, also called DLUs.

    From MSDN:

    "Dialog Unit:

    A unit of horizontal or vertical distance within a dialog box. A horizontal DLU is the average width of the current dialog-box font divided by 4. A vertical DLU is the average height of the current dialog-box font divided by 8."


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

Featured