Thread: Child Windows...

  1. #1
    Registered User
    Join Date
    Feb 2005
    Posts
    22

    Child Windows...

    I've been working for some time now on my guitar project and I can't seem to get my GUI program to interface properly with my DSP software. My teacher is no help so I am hoping the interenet can.

    I have a picture link attached to give you an idea of what kind of program I'm working with:
    http://img.photobucket.com/albums/v4...an43/FXBOX.jpg

    Ok, I've figured out how to find the handle and send messages to controls on the main window (Green in pic):

    CWnd * apptr = FindWindow(NULL, "Guitar FX BOX 2.6");

    This finds me the handle and I can easily go from there...

    My problem is when I try to send messages to any of the controls inside the red box, these being child windows, I am not able to use FindWindow.

    I've tried using FindWindowEx, which is meant for child windows... but I am teaching myself so I cant seem to use it properly.

    CWnd * apptr = FindWindowEx(*apptr, NULL, NULL, "Distortion on/off");

    When I try this it can't find anything and returns a NULL value.


    If anyone has any idea how to help me or needs me to re-explain something I'd be glad to, this is for a very important final project and I need to get it working!!

  2. #2
    Anti-Poster
    Join Date
    Feb 2002
    Posts
    1,401
    You might try calling GetLastError() to get some error information. You might also try using GetTopWindow() and GetNextWindow() to search through the child windows of apptr.
    If I did your homework for you, then you might pass your class without learning how to write a program like this. Then you might graduate and get your degree without learning how to write a program like this. You might become a professional programmer without knowing how to write a program like this. Someday you might work on a project with me without knowing how to write a program like this. Then I would have to do you serious bodily harm. - Jack Klein

  3. #3
    Registered User
    Join Date
    Feb 2005
    Posts
    22
    If this helps at all, this is a Spy++ screenshot to enumerate the child windows.

    http://img.photobucket.com/albums/v474/bigdan43/SPY.jpg

  4. #4
    Registered User
    Join Date
    Feb 2005
    Posts
    22
    I got it to work, thanks for the help.

Popular pages Recent additions subscribe to a feed

Similar Threads

  1. Can't create child windows
    By OnionKnight in forum Windows Programming
    Replies: 4
    Last Post: 04-10-2011, 04:13 PM
  2. Displaying Text on MDI child windows
    By EmbeddedC in forum Windows Programming
    Replies: 4
    Last Post: 10-30-2008, 12:28 PM
  3. Keeping child windows in their place
    By Smallz in forum Windows Programming
    Replies: 1
    Last Post: 08-27-2006, 06:22 AM
  4. Child Windows and Messages
    By Terrell in forum Windows Programming
    Replies: 10
    Last Post: 09-05-2002, 06:39 AM
  5. child windows
    By face_master in forum Windows Programming
    Replies: 14
    Last Post: 03-01-2002, 07:08 AM