Click to See Complete Forum and Search --> : Child windows?


shayes01
May 9th, 1999, 11:40 PM
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.

rajasekar.s
May 10th, 1999, 12:24 AM
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