Hi to all, I'm new here, and before asking my question I have to adimit that I'm to an asm programmer (but I can understand it, at least :)). I use C and Win32 API but every tutorial I found on internet are written for MFC, so I use yours, even if they are for win32asm. I hope you will answer my question even I'm not 'one of your big family'. Well, I'm writing a MDI application using lcc-win32. Main window is splitted in two areas with a splitter bar (I have read a tutorial about this here: http://www.catch22.uk.net) and to obtain this effect I have created a child 'splitter window' inside main window, and inside this one I have put two childs of 'splitter window' that use all the space available (there are also a rebar and a status bar, but both of them are in MDI Frame): a tree view and a MDICLIENT both with WS_EX_CLIENTEDGE style and leaving few pixels between each other in order to create the splitter bar effect.



+-MDI Frame-----------+
| +-Splitter Wnd----+ |
| |+---+ +---------+| |
| ||T V| |MDICLIENT|| |
| ||r i| | || |
| ||e e| | || |
| ||e w| | || |
| || | | || |
| |+---+ +---------+| |
| +-----------------+ |
+---------------------+


I hope you have undertsand my situation (I know, my english is far from perfect :)). My problem is that since I have created the 'splitter window' between MDI frame and MDICLIENT when I maximize a MDI child window min/restore/close buttons are not drawed on menu bar of MDI Frame and when a child window isn't maximized its title bar is not painted with active color unless I force a repaint (iconizing/restoring my app). Is all that due to the fact that MDICLIENT is not a direct child of MDI Frame? If so can I forward the right WM_* messages from splitter window to MDI Frame to make all works well? If yes, which are these messages?

Thank you,

LuHa.
Posted on 2001-07-29 15:45:31 by LuHa
I've had this problem myself!
What you need to make sure and do is:
call invoke DefMDIChildProc,hChild,uMsg,wParam,lParam
NOT ONLY at the end of you ChildProc, but ALSO at the end of WM_SIZE in your child proc...

That should fix your problem ;)
Posted on 2001-07-29 16:03:45 by karl
Thank for your answer karl, but I allready call DefMDIChildProc at the end of WM_SIZE massage in MDI child procedure (well, actually I have a break at the end of the WM_SIZE case, so also 'default:' option is executed with a call to DefMDIChildProc). I think (I'm sure, sice if I remove splitter window and put MDICLIENT as a direct child of MDI Frame all works well) that the problem is this structure:



MDI Frame
|
| child
V
Splitter window
|
| child
V
MDICLIENT


instead of this one:



MDI Frame
|
| child
V
MDICLIENT


Thankyou again, karl.

LuHa.
Posted on 2001-07-29 16:56:52 by LuHa
Yes the mdichild must have a frame parent i think, but i'm so too sure, as i've never tried to do differently
Posted on 2001-07-29 19:36:12 by karl
LuHa,

Interesting you use ASM as I use C: just to get explanations of raw API calls. Of course, most of the stuff I read is from '95 because after that C++ took over for C.

I did something similar once for a very involved MDI interface in a long abandoned project combining COM objects with MDI windows, with docking toolbars thrown in for extra fun.

This is not the sort of code one can work on in spare time, it needs a 100% commitment.

Anyway, I did have splitter bars a plenty on there dynamically forming and unforming, and the MDI children had no trouble communicating with the parent. All I had to go on was Icz tut on MDI (#32).

Perhaps if you rearange your windows like this your MDI will work better: make the splitter just as wide as it need be to show, place it, the tree view, AND the MDI client area directly on the main window.

This way, you avoid all side issues with what top window gets the menu. However, you are stuck with how to tell the splitter how to split which windows. This isn't that hard to do, and I even have a tut on THAT part.
Posted on 2001-07-29 22:57:49 by Ernie
My app works well if I remove splitter window, I think the problem is not in MDI implementation. The problem lies in my implementation of splitter bar, since I use a container window (splitter window) in which all children are drawen with WS_EX_CLIENTEDGE. I know that if I remove splitter window between MDI Frame and MDICLIENT all will go well, but I posted this question here to avoid redesigning my app from scratch. Does any of the numerous ASM IDE use my same technique to simulate a splitter bar?
What can I say? If I will not find a solution to 'hide' splitter window I will delete half of my code and I will rewrite it in a different way (I will follow your suggestions and draw it as wide as a splitter bar instead use it as a container). Anyway thankyou all.

LuHa.

PS: With MFC app wizard all that can be fixed with two mouse clicks (I think, I don't know MFC), but... where is the fun? :)
Posted on 2001-07-30 15:45:07 by LuHa
Ernie,
I'm reading your tutorials about splitter bars, they are fantastic :). I took my decision, I will redesign my app using your technique.

LuHa.
Posted on 2001-07-31 15:14:42 by LuHa
LuHa, I don't know exactly where the fun it MFC programming comes from, but what I have gathered from a friend of mine is that it comes from trying to help your boss understand that all the computers in the company need to be upgraded (again!) to support the new features of your application. :grin:
Posted on 2001-07-31 16:10:07 by bitRAKE