calling parent from child

This is a discussion on calling parent from child within the Windows Programming forums, part of the Platform Specific Boards category; Im working on my first windows app, trying to recreate Notepad or something similar. I've googled and searched this forum, ...

  1. #1
    Registered User
    Join Date
    Jul 2007
    Posts
    6

    calling parent from child

    Im working on my first windows app, trying to recreate Notepad or something similar. I've googled and searched this forum, but havent found a function that allows you to access the parent from the child. Im sure its simple, but can anyone help?

  2. #2
    Kernel hacker
    Join Date
    Jul 2007
    Location
    Farncombe, Surrey, England
    Posts
    15,677
    What "parent" and what "child" are you talking about?

    I'm pretty sure it can be done, but there are so many things that are "parent" and "child" in some way - and you probably knew EXACTLY what you meant, but we don't.

    --
    Mats

  3. #3
    Registered User
    Join Date
    Jul 2007
    Posts
    6
    My bad. I tend to abrieviate when I know what i mean. I have my main window, which is the parent. I stick an Edit window inside of it, which is the child. I pass the Edit window into one of my functions, but not the main window. In that function, I want to access the main window, so either I could get it through the Edit window (child) or I guess I could just pass it in...

    Edit: forgot to mention, Im using Dev-C++ 4.9.9.2
    Last edited by Aemon07; 07-25-2007 at 11:40 AM. Reason: just incase

  4. #4
    Tropical Coder Darryl's Avatar
    Join Date
    Mar 2005
    Location
    Cayman Islands
    Posts
    503
    It's pretty intuitive - GetParent(HWND child)

  5. #5
    Registered User
    Join Date
    Jul 2007
    Posts
    6
    I knew it would be simple. I thought i tried that though. Oh well. Thanks

  6. #6
    train spotter
    Join Date
    Aug 2001
    Location
    near a computer
    Posts
    3,859
    Quote Originally Posted by matsp View Post
    What "parent" and what "child" are you talking about?

    I'm pretty sure it can be done, but there are so many things that are "parent" and "child" in some way - and you probably knew EXACTLY what you meant, but we don't.

    --
    Mats
    I knew EXACTLY what he ment......
    "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

Popular pages Recent additions subscribe to a feed

Similar Threads

  1. inter process communcation, parent - child
    By tallan in forum C Programming
    Replies: 5
    Last Post: 02-28-2009, 03:04 AM
  2. Replies: 3
    Last Post: 10-15-2008, 09:24 AM
  3. process programming
    By St0rM-MaN in forum Linux Programming
    Replies: 2
    Last Post: 09-15-2007, 07:53 AM
  4. child classes calling parent constructors (with arguments)
    By reanimated in forum C++ Programming
    Replies: 3
    Last Post: 05-01-2006, 10:52 AM
  5. Request for comments
    By Prelude in forum A Brief History of Cprogramming.com
    Replies: 15
    Last Post: 01-02-2004, 09:33 AM

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