Join The Works program to have access to the most current content, and to be able to ask questions and get answers from Revelation staff and the Revelation community

At 03 MAY 2000 11:25:50AM Paxton Scott wrote:

Is there a way to change the color of the MDI client? I have a production and a test copy of my system. When the system starts, I want to check something…say .INI file, and then depending on the result, change the color of the MDI client background…If I can't do that, at least change the Title bar text (or color). Can't figure out how to do any of these….any ideas? Thanks, arcs@arcscustomsoftware.com

[url=http://www.arcscustomsoftware.com/]ARCS, Inc.


At 03 MAY 2000 12:21PM Oystein Reigem wrote:

Paxton,

Doesn't seem to work. Neither with ordinary colours nor system colours. Neither set at design time nor programmatically.

When you want a window *background* coloured it's necessary to turn off 3-D controls, but that doesn't help here.

There is a posting by Carl Pates on how to put a bitmap in the MDI client area. (Do a site search for MDICLIENT.) And a reply saying it doesn't quite work - some problem with refreshing. Try to coax Carl into revealing if it can be done with GDI functions. If it can be made to work you can use a monochrome bitmap.

Possible workaround: Use a coloured *child*. One that's bigger than the MDI client area, and placed so the caption and border doesn't show.

Another possible workaround: Hide the MDI client area temporarily (by changing the SIZE property of @Window:".MDICLIENT"), and show some coloured control instead (e.g a static with no text, on the frame). (And perhaps you ought to check for possible problems with strange values of MDICLIENT's SIZE.)

- Oystein -

Øystein Reigem,

Humanities Information Technologies,

Allégt 27,

N-5007 Bergen,

Norway.

Tel: +47 55 58 32 42.

Fax: +47 55 58 94 70.

oystein.reigem@hit.uib.no

Home tel/fax: +47 56 14 06 11.


At 03 MAY 2000 03:31PM WinWin/Revelation Support wrote:

Title bar color is mandated by Windows standards ( I think ), can only be changed by US Dept of Justice.

Text in the title bar is just the TEXT property of the window, you can set it as you please.

Thank you Oystein for the writeup on the MDI client.

Hope this helps.

Bob Carten

WinWin Solutions


At 04 MAY 2000 05:04AM Oystein Reigem wrote:

Bob,

I remember a couple of years ago I tried to get rid of a form's caption bar. But I didn't succeed. Do you know if it's possible? See below.

If it is, Paxton could use a static as a replacement. It's easy to change the colour of a static. With the DUMMYCAPTION property set the static would even get some of the behaviour of a caption.

Here's something I wrote back then about my decapitation struggles. It's from a document on my harddisk. It looks like a posting made on one of the lists here, but I've been unable to locate it. And I doubt if I got any replies.

What I wanted to do was to have the client area of a child fill the MDI client area completely. So I wanted to remove the child's caption, system menus, border, and everything:

… … … I really would prefer to just get rid of the title bar and window frame of a child window. I have tried to change the style of the window by setting the appropriate style bits to zero (see below), but that just removes the title bar and window frame without repositioning the window. And the title bar has a tendency to linger on. This is the mask I use (with BitAnd) to set the style bits to zero: <code> 1111 1111 0011 0000 1111 1111 1111=0XFF30FFFF ^^ ^^^^ || |||| || |||Maximize Box || ||Minimize Box || |Thick Frame || System Menu |Dialog Frame Border </code> Is this correct? I change the style in the child window's CREATE handler. That may be too late, perhaps. Can I use Start_Window with getstructureflag to get to the window structure and change it before I start it for real? One can do such things with ordinary windows, but what about MDI child windows? And are the bits of the style I want to change a part of the structure so that they can be changed? I have also used System Editor to see if I could find anything to hack in the child window's SYSREPOSWIN row. I found a hex value that looked like it could be the window's style, but since the style bits I wanted to change already were zero I assume they are set at launch time.

- Oystein -

PS. This is not something I currently need so don't spend much time on this for my sake.


At 04 MAY 2000 02:10PM Bob Carten wrote:

I'm pretty sure that the color, size and presence of the title bar are mandated by the windows operating system. There is a windows api

function called SetSysColor that changes the title color for the system, probably to implement in a color scheme, but I don't think you can change specific windows.

Bob


At 04 MAY 2000 03:38PM Oystein Reigem wrote:

Bob - thanks for further info.

Paxton - didn't notice until now you might be content with changing the child's caption text. That should be easy. You need to know the id of the child. Haven't you got a Start_MDIChild call somewhere that starts the child? Start_MDIChild returns the id of the child. If there's ever only one instance of each child the id is the same as the window name. Else it's name followed by asterisk and some number. To change the caption text you set property TEXT of the child window.

- Oystein -

View this thread on the Works forum...

  • third_party_content/community/commentary/forums_works/86bb92cdde28483d852568d40054c368.txt
  • Last modified: 2024/01/04 20:57
  • by 127.0.0.1