Keeping child windows in their place

This is a discussion on Keeping child windows in their place within the Windows Programming forums, part of the Platform Specific Boards category; I've created a bunch of custom widgets for my latest application. Now I have a thought of expanding them to ...

  1. #1
    Registered User
    Join Date
    Jul 2006
    Posts
    19

    Keeping child windows in their place

    I've created a bunch of custom widgets for my latest application.

    Now I have a thought of expanding them to include setting child windows within these widgets, however before I attempt it I have a bit of a problem in concept.

    How oh how do I keep those darn child windows in their place?

    Say I have a scrolling area, nothing simple just a boring old widget with scrollbars. Now if I add a child to this widget, i would say want them to wrap vertically, and I might add a bit of padding between the children and the parent for looks.

    Now, when this is resized or something I may have to move the children or whatever (this is a bad example I realise but I'm too lazy to come up with another.) should I just enumChildWindows() and simply relocate them according to my rules and numbers?

    I guess, trial and error for this most likely but I really cant think of any other ways so I have nothing to fall back on if this method is an error.

    Cheers guys

  2. #2
    ... arjunajay's Avatar
    Join Date
    May 2005
    Posts
    203
    If I remember correctly there were some good tutorials and code samples on this exact requirement in codeproject.com.

Popular pages Recent additions subscribe to a feed

Similar Threads

  1. Child windows
    By Gordon in forum Windows Programming
    Replies: 1
    Last Post: 04-25-2008, 12:53 PM
  2. Child windows
    By beene in forum Windows Programming
    Replies: 2
    Last Post: 12-13-2006, 03:22 AM
  3. SendMessage(add txt 2 listbox) won't work in WM_COMMAND
    By scwizard in forum Windows Programming
    Replies: 5
    Last Post: 12-12-2006, 06:25 PM
  4. Removing/Hiding Child Windows
    By Hysteresis in forum Windows Programming
    Replies: 4
    Last Post: 07-14-2006, 11:50 AM
  5. adding child windows in mfc?
    By Terrance in forum Windows Programming
    Replies: 1
    Last Post: 03-02-2003, 11:35 AM

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21