Thread: How can we really group the controls in groupbox

  1. #1

    How can we really group the controls in groupbox

    I want to change a groupbox position on dialog with all button, edit etc. controls on it. And using SetWindowPos API but only groupbox moving, the controls on it is left. How can I move groupbox with all includes in it? How can I really group them? I'm using LCC-win32 compiler("C" and API). Also prefer using Dialog editor, not runtime windows creation.


  2. #2
    Registered User sean345's Avatar
    Join Date
    Mar 2002
    I do not know if this will help but Could you move all the controls inside the group box to the new location.

    - Sean
    If cities were built like software is built, the first woodpecker to come along would level civilization.
    Black Frog Studios

  3. #3
    train spotter
    Join Date
    Aug 2001
    near a computer
    The only way I can think of is to create the group as a small dlg and create it as a child of the main dlg. Put a frame ctrl or similar on the main dlg and paste the small dlg to here. Use SetWindowLong() (with GWL_WNDPROC) to assign both the same callback.
    Then the whole lot can be moved/resized with SetWindowPos().
    "Man alone suffers so excruciatingly in the world that he was compelled to invent laughter."
    Friedrich Nietzsche

    "I spent a lot of my money on booze, birds and fast cars......the rest I squandered."
    George Best

    "If you are going through hell....keep going."
    Winston Churchill

  4. #4
    Thanks for all,
    Yes I can do which both you said. But I prefered to do it for example as VB. I suppose there must be a trick...or not? I want to know is it possible as mentioned before.

    Thanks again

Popular pages Recent additions subscribe to a feed

Similar Threads

  1. brace-enclosed error
    By jdc18 in forum C++ Programming
    Replies: 53
    Last Post: 05-03-2007, 05:49 PM
  2. Radio buttons MSVC 2003 not working like I think they should.
    By Bajanine in forum Windows Programming
    Replies: 10
    Last Post: 12-12-2006, 10:40 PM
  3. ray casting
    By lambs4 in forum Game Programming
    Replies: 62
    Last Post: 01-09-2003, 06:57 PM
  4. child windows of group boxes and static controls
    By alandrums in forum Windows Programming
    Replies: 3
    Last Post: 12-05-2001, 12:12 AM