MDI app: Can't get window focus of modeless child dialog window

MDI app: Can't get window focus of modeless child dialog window

Post by Aienthiwa » Thu, 29 Jul 2004 14:47:11


Hey again,

Ok - so I'm designing an application which uses a MDI without MFC, but this
ain't no vanilla MDI - it's actually a single document application which
uses many dialog boxes as child windows inside the MDI frame. So normal
tutorials/rules don't seem to apply here.

I init my frame, client and one of the dialog boxes in the app just fine -
but this dialog window (which is a child of the client) has its title bar
greyed out, like it doesn't have the focus. I can still move the dialog
around the screen - but no mouse clicks seem to do anything to *some* of the
contents - I have an edit control and a few buttons in there. I can't edit
the contents of the edit control by setting focus via mouse click; I can
click one of the buttons, and then tab over to the edit control, then it
works - but no mouse clicks seem to activate the focus.

If I set the "Control" property (under misc) of my dialog box all of sudden
things work as they should, but my dialog box loses my title bar and I can't
drag the thing anywhere. So that's no good.

My proc's have nothing special in them - the frame proc has a WM_CREATE for
the client window, and returns to DefFrameProc, and my dialog box has a
standard DialogProc, returning false.

This is driving me crazy, and the help isn't revealing any info - does
anyone have any ideas? I don't think I need any special WM_ messages in my
frame proc, 'cause standard MDI examples work just fine..

Thanks in advance,
Aienthiwan
 
 
 

MDI app: Can't get window focus of modeless child dialog window

Post by Aienthiwa » Fri, 30 Jul 2004 04:45:12

Wow that was irritating.

I ended up just creating a basic MDI child window, and placed the dialog box
with no border and caption - and then just fixed the size of the MDI child
window to get things working the way I wanted it.

Aienthiwan



this
the
sudden
can't
for