Results 1 to 2 of 2

Thread: Getting Messages from Child's Child

  1. #1

    Thread Starter
    Junior Member
    Join Date
    Jan 2001
    Posts
    26

    Getting Messages from Child's Child

    My objects are setup like this:

    Code:
    hFrame1 = CreateWindow("BUTTON", "Edit", WS_CHILD | WS_VISIBLE | BS_GROUPBOX | BS_NOTIFY, 10, 300, 740, 200, hWnd, (HMENU)R_Frame1, hInst, NULL);
    hFrame2 = CreateWindow("BUTTON", "Layer:", WS_CHILD | WS_VISIBLE | BS_GROUPBOX | BS_NOTIFY, 10, 10, 160, 180, hFrame1, (HMENU)R_Frame2, hInst, NULL);
    hButton1 = CreateWindow("BUTTON", "Add", WS_CHILD | WS_VISIBLE | BS_CENTER | BS_PUSHBUTTON | BS_VCENTER, 10, 160, 70, 18, hFrame2, (HMENU)R_Button1, hInst, NULL);
    Is there any way for my main form (hWnd) to get the BN_CLICKED message when hButton1 is clicked?
    Cartethus Artraze
    Visual Studio 6 (SP3)
    http://www.angelfire.com/pa3/cartethus
    "The ideal answer comes only from the ideal question."

  2. #2
    Kitten CornedBee's Avatar
    Join Date
    Aug 2001
    Location
    In a microchip!
    Posts
    11,594
    Group boxes have no childs. Create all 3 windows as direct childs of your main window then you have no problems. Why do you want this strange hierarchy?

    If you really want to do it this way, you need to subclass the inner frame and forward the messages you want to the main window.
    All the buzzt
    CornedBee

    "Writing specifications is like writing a novel. Writing code is like writing poetry."
    - Anonymous, published by Raymond Chen

    Don't PM me with your problems, I scan most of the forums daily. If you do PM me, I will not answer your question.

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