[Newbie] MDI child window confusion
From: Rodney B. Elliott (rodney.elliott_at_canterbury.ac.nz)
Date: 07/29/04
- Next message: Dave: "lib"
- Previous message: The Cardinal: "Print Preview buttons "Prev Page" and "Zoom Out" are never enabled"
- Next in thread: Scott McPhillips [MVP]: "Re: [Newbie] MDI child window confusion"
- Reply: Scott McPhillips [MVP]: "Re: [Newbie] MDI child window confusion"
- Messages sorted by: [ date ] [ thread ]
Date: 28 Jul 2004 19:43:43 -0700
Hi Everyone,
I am trying to write a MDI application and am having great difficulty
figuring out how to arrange communications between my main frame
window and my two child windows.
What I have is a modeless dialog with two buttons on it - one marked
camera 0 and the other camera 1. Pushing the button sends a message
to the main frame which then executes the code necessary to capture an
image from one of two cameras.
That works fine, and the next step is to display the images in two
child windows. Now here is where things get tricky (well for me
anyway). Imagine that the user has pushed the camera 0 button, an
image has been taken, and now it needs to be displayed in a child
window (the zeroth one). What I would like to be able to do is send a
message to the zeroth child window saying "please update your view
using the pointer to the image you were provided with".
The thing is I am not sure how to direct a message to a particular
child window - unlike sending a message to the main frame, there is no
GetParent() method I can use to return the handle of a particular
child window.
Can someone please provide some direction here? Should I create a
list of child windows at the start of my application, and then send
each window a message saying "you are window 0" and "you are window
1"? Or should I perhaps override the child window create method and
incorporate a window_number variable that is updated every time a new
window is created?
I am feeling a bit lost at sea here, so any replies would be really
appreciated.
- Next message: Dave: "lib"
- Previous message: The Cardinal: "Print Preview buttons "Prev Page" and "Zoom Out" are never enabled"
- Next in thread: Scott McPhillips [MVP]: "Re: [Newbie] MDI child window confusion"
- Reply: Scott McPhillips [MVP]: "Re: [Newbie] MDI child window confusion"
- Messages sorted by: [ date ] [ thread ]
Relevant Pages
|