🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Article View: borland.public.cppbuilder.nativeapi
Article #17721

MDI with CommCtl32

#17721
From: Sergey Dzekunov
Date: Tue, 04 Mar 2003 04:06
26 lines
2218 bytes
I am using a command line compiler to build an MDI application with a
toolbar. Common controls library works fine with single-document
applications, but there is a problem in MDI: the client window overlaps with
the library's ToolBar and the StatusBar (obviously, they are all equal
children of the same frame window). From my experience with OWL I recall
that some explicit measures must be taken to adjust
MDI's client window size, that's what TDecoratedFrame is basically doing.
However, it was too troublesome for me to trace this class' hierarchy all
the way up and find the code that's taking care about positioning and sizing
of the client window.

I tried to subclass the MDIClient window to gain access to it's message
loop. Then I started interfering with the WM_NCCALCSIZE message (which is a
rather complex one, and apparently it's description in win32.hlp contains
errors). Almost by accident it all worked, but instead of celebrating I was
still sure there was a standard (read: "safe") method for such a common
task. Just "it works" isn't good enough for me.

Where can I find the description of how to do it right using bare Windows
functionality?

By the way, what is the message number 0x003F ? It is not described in
winuser.h, but I noticed it always preceded sizing events.

With many thanks in advance,
Sergey
Technical Details
Message-ID: <3e642418$1@newsgroups.borland.com>
Path: arc1-ca.pugleaf.net!archiver1.google.com!news1.google.com!sn-xit-02!sn-xit-06!sn-xit-09!supernews.com!news.maxwell.syr.edu!newsfeed.wirehub.nl!news.kweb.on.ca!KWeb!newsgroups.borland.com!not-for-mail

Show Full Headers
Complete Article Headers
X-Google-Language: ENGLISH,ASCII-7-bit
X-Google-Thread: 10cc67,c789f6650d6b8561,start
X-Google-Attributes: gid10cc67,public
X-Google-ArrivalTime: 2003-03-04 11:49:52 PST
From: "Sergey Dzekunov" <si@sprintmail.com>
Newsgroups: borland.public.cppbuilder.nativeapi
Subject: MDI with CommCtl32
Date: Mon, 3 Mar 2003 23:06:42 -0500
Lines: 28
X-Priority: 3
X-MSMail-Priority: Normal
X-Newsreader: Microsoft Outlook Express 5.50.4522.1200
X-MimeOLE: Produced By Microsoft MimeOLE V5.50.4522.1200
NNTP-Posting-Host: 64.157.58.170
Message-ID: <3e642418$1@newsgroups.borland.com>
X-Trace: newsgroups.borland.com 1046750232 64.157.58.170 (3 Mar 2003 19:57:12 -0800)
Path: arc1-ca.pugleaf.net!archiver1.google.com!news1.google.com!sn-xit-02!sn-xit-06!sn-xit-09!supernews.com!news.maxwell.syr.edu!newsfeed.wirehub.nl!news.kweb.on.ca!KWeb!newsgroups.borland.com!not-for-mail