[Newbie] MDI child window confusion

Tech-Archive recommends: Repair Windows Errors & Optimize Windows Performance

From: Rodney B. Elliott (rodney.elliott_at_canterbury.ac.nz)
Date: 07/29/04


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.



Relevant Pages

  • Re: 120mm roll film widths and frames
    ... depending on the camera, what width do the frame numbers on the back - ... that appear in the little window in the camera back - refer to? ... The is a Kodak standard film size "120", ...
    (uk.rec.photo.misc)
  • Re: In the need for some advice!
    ... int WINAPI WinMain (HINSTANCE hInstance, HINSTANCE hPrevInnstance, ... PSTR szCmdLine, int iCmdShow) ... //CONFIGURE WINDOW APPLICATION ... //CONFIGURE CHILD WINDOW #1 ...
    (microsoft.public.vc.language)
  • Re: GetTextExtent and Window Placement
    ... the pDC comes from the OnPaint handler. ... I've two windows: a parent window and a child window. ... because the CPaintDC is not a CDC *. ...
    (microsoft.public.vc.mfc)
  • Re: Saving and Restoring a Child Window to its Former Position and Size
    ... By child window do you mean ChildFrame? ... views Frame position. ... It is as if the storage is referenced to the upper ...
    (microsoft.public.vc.mfc)
  • Re: GetTextExtent and Window Placement
    ... the pDC comes from the OnPaint handler. ... I've two windows: a parent window and a child window. ... because the CPaintDC is not a CDC *. ...
    (microsoft.public.vc.mfc)