CodeGuru Home VC++ / MFC / C++ .NET / C# Visual Basic VB Forums Developer.com
Results 1 to 5 of 5
  1. #1
    Join Date
    Oct 2019
    Posts
    82

    Changing GroupBox Title/Label Position

    Can anyone tell ,how to change the GroupBox Title/Label Position .Since resource script(.rc) file has coordinates of groupbox but not of the title/label of groupbox, by deafult it comes on the top left !! I want to set it at certain pixels,how can i do that.

  2. #2
    Arjay's Avatar
    Arjay is offline Moderator / EX MS MVP Power Poster
    Join Date
    Aug 2004
    Posts
    13,490

    Re: Changing GroupBox Title/Label Position

    Use the mfc class wizard to add a control variable to the group box. Then use the control variable's methods to manipulate the group box.

  3. #3
    VictorN's Avatar
    VictorN is offline Super Moderator Power Poster
    Join Date
    Jan 2003
    Location
    Hanover Germany
    Posts
    20,396

    Re: Changing GroupBox Title/Label Position

    Quote Originally Posted by Beginner_MFC View Post
    Can anyone tell ,how to change the GroupBox Title/Label Position .Since resource script(.rc) file has coordinates of groupbox but not of the title/label of groupbox, by deafult it comes on the top left !! I want to set it at certain pixels,how can i do that.
    The simplest way would be use the GroupBox without title and put a static control with the desired title at the desired position above the GroupBox.
    Victor Nijegorodov

  4. #4
    Join Date
    Oct 2019
    Posts
    82

    Re: Changing GroupBox Title/Label Position

    Yeah its simplest but issue is this place title/text above the groupbox and not what i want to achieve. I want to shift the default position of title/label from top left to certain pixels

  5. #5
    VictorN's Avatar
    VictorN is offline Super Moderator Power Poster
    Join Date
    Jan 2003
    Location
    Hanover Germany
    Posts
    20,396

    Re: Changing GroupBox Title/Label Position

    Quote Originally Posted by Beginner_MFC View Post
    Yeah its simplest but issue is this place title/text above the groupbox and not what i want to achieve. I want to shift the default position of title/label from top left to certain pixels
    Then, I guess. You will need some custom control or, at least, custom draw.
    Victor Nijegorodov

Tags for this Thread

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