CodeGuru Home VC++ / MFC / C++ .NET / C# Visual Basic VB Forums Developer.com
Results 1 to 2 of 2

Thread: Child windows?

  1. #1
    Join Date
    May 1999
    Posts
    1

    Child windows?


    I am very new to this stuff so any assistance would be welcome.
    When creating a child window there is a unique int allocated to differentiate it from any
    other child window (should you have more than one) My query is how do I know what the
    number is and then how can I have an action (say WM_LMBUTTONDOWN) trapped to
    set a counter for that child window eg:
    Imagine a parent winndow split by two child windows both have a counter int set to 0 at
    the initialisation. When a left mouse button is clicked with the cursor over a child window
    the counter for that child window (say _windowA) increments by one.

    Eventually I would like to have a tally menu button to show the total for each child
    window but that is probably another question.
    Thanks in anticipation.



  2. #2
    Join Date
    Apr 1999
    Location
    Chennai, India
    Posts
    48

    Re: Child windows?

    hi,

    One way is to create an 2d array of HWND of the window and number of clicks made. This is fine but cannot be extended so easily.

    Another way is to use the facility provided by windows. Check the 'cbWndExtra' member in WNDCLASSEX. This goes along with Get/SetWindowLong API. This is easy to find out for u !

    Have a nice time


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

Featured