______________________________________

MDI Wallpaper Delphi Component
version 6
by Robert Rossmair
______________________________________



Description
Compatibility
Current file versions
Installation

Component installation
Help file installation
File list
Component files
Demo application files
Copying policy
History
New versions


Description

TMDIWallpaper is a background graphic component for windowed controls (TWinControl descendants).
It has been written to be used especially with MDI frame windows (that is, forms with FormStyle set to fsMDIForm), but it will work with any TWinControl that delegates the task of background painting to the WM_ERASEBKGND message handler.

Compatibilty (tested)

Delphi 2, 3 and 5

Current file versions

Package: 27-Jan-2000
MDIWallp unit: 6.00.4 (27-Jan-2000)
Demo project: 2.0 (21-Dez-1999)

Note that version 5 was never released to the public.

What's new

Release 6.00.4: severe bug in ClientWndProc fixed.  Some code clean-up.

Release 6.00.2: fixed scrolling for non-TScrollingWinControl clients.

TMIDWallpaper has undergone a complete code revision. It is now compatible to the latest Delphi version, Delphi 5.

property Client: TWinControl;
Version 6 allows to specify the windowed control to be illuminated by the TMDIWallpaper component.  In earlier versions, this was fixed to the component's owner form.
Note that TMDIWallpapers functionality is restricted to controls which delegate the background painting to the WM_ERASEBKGND message handler.
property FitPictureSize: Boolean;
Specifies whether the MDIWallpaper's picture is scaled to fit the Client's client area.  Other than Mode=wpStretch, FitPictureSize preserves the picture's aspect ratio.
Other Changes:
Four new values, wpLeft, wpTop, wpRight and wpBottom, have been added to the Mode property.

Using RxWindowHook components from the RxLib ,it is now possible that a single TMDIWallpaper component handles background painting for multiple controls.

Installation

Important hint: Since TMDIWallpaper's Bitmap property has been removed in version 3.0, you are advised to save to disk any bitmap data contained in any pre-3.0 version TMDIWallpaper components and not available otherwise before installing the new version! After having installed version 3.0 or greater, you can load them into the new Picture property.

Component installation

I suggest to unpack the zip-file into a private directory.

Delphi 2.0:

Select Component|Install... to install units mURLLabel.pas, CompInfo_reg.pas and MDIWallp_reg.pas.
Delphi 3, 4, 5:

Help file installation

Basically, MDIWallp.hlp and CompInfo.hlp are designed for Delphi versions ³ 3. That means that links into Delphi help files (e.g. to TComponent) won't work with Delphi 2.0. However, they include both A- and B-links and thus provide context-sensitive help for Delphi 2.0 as well as Delphi 3 and above.

Delphi 2.0:

Delphi 3: Delphi 4/5:
Choose Help|Customize... and add CompInfo.hlp and MDIWallp.hlp to the "Index" and "Link" pages of the OpenHelp customization dialog.

File List

File Description Copying policy
rr.inc global conditional compilation symbols 1
rrColors.pas auxiliary unit 1
CompInfo_reg.pas auxiliary unit 1
CompInfo.dfm "Component Information" dialog 1
CompInfo.pas auxiliary unit 1
CompInfo.hlp help file for CompInfo 1
CompInfo.kwf Keyword file for CompInfo.hlp 1
CopyrInf.pas auxiliary unit 1
dclrrci3.dpk Component Information
Delphi 3 designtime package
1
dclrrci4.dpk Component Information
Delphi 4 designtime package
1
dclrrci5.dpk Component Information
Delphi 5 designtime package
1
rrCmpInf.dpk Component Information
Delphi 3 runtime package
1
rrCmpInf4.dpk Component Information
Delphi 4 runtime package
1
rrCmpInf5.dpk Component Information
Delphi 5 runtime package
1
mUrlLabel.pas auxiliary unit for CompInfo 2
mUrlLabel.dcr mUrlLabel resource file 2
mUrlLabel.res mUrlLabel resource file 2
MDIWallp.pas Component unit 1
MDIWallp_reg.pas Component unit 1
MDIWallp_reg.dcr Component resource 1
MDIWallp.hlp Component help file 1
MDIWallp.kwf keyword file for MDIWallp.hlp 1
MDI Wallpaper
package readme.htm
this file 1

Demo application files, located in subdirectory "Demos\MDIWallpaper"

File Description Copying policy
MDIWDemo.dpr demo app. project file 1
MDIWDemo.dof demo app. project options 1
MDIWMain.dfm demo app. main form 1
MDIWMain.pas demo app. main unit 1
MDIWChld.dfm demo app. MDI child form 1
MDIWChld.pas demo app. MDI child form unit 1
HookDemo.dfm demo app. MDI child form 1
HookDemo.pas demo app. MDI child form unit 1

Copying policy

Copying policy 1 means:
Use, modification and distribution is allowed without limitation, warranty, or liability of any kind.
Copying policy 2 means:
These files are freeware copyright Ahto Tanner, Moon Software.

History

Version Release Date Remarks
5 (Dec-1999) Never released to the public
4.0.1 05-Jun-99 Big transparent bitmaps caused form background painting to be awkwardly slow in earlier versions; a fact which successfully escaped my attention until recently, when the implementation of the GrayMapped property required some code redesign. This is fixed in version 4.
Introduces new properties GrayMapped (a substantially enhanced variant of a feature suggested by Harald Marschalek), AutoSizeTile, TileWidth and TileHeight
3.1 03-Feb-99 Fixes bug which prevented the background from being updated when the Picture property is set to nil.
Adds the Enabled property.
3.0.1 13-Aug-98 As a goodie for D2 users, TMDIWallpaper sets the proper (WS_EX_CLIENTEDGE) border style for the MDI client window.
3.0 06-Aug-98 Introduces Picture, Shift, ShiftMode and Info properties; the Picture property replaces the Bitmap property of prior component versions.
Some code sent to me by Kristoffer Henriksson pointed me to a way how to overcome the problems which caused me to remove the Mode property in V2.0.  Hence V3.0 has a Mode property again.
Includes a demo application demonstrating the use of the new properties Mode, Shift, ShiftMode and ZigZag.
Registers TGraphicEditor as component editor for TMDIWallpaper, thus changing the double-click behavior in design mode (due to the broken PicEdit unit this feature is not available with Delphi 3).
2.1.1 25-Jun-98 Cosmetic changes
2.1.0 11-Jun-98 Zigzag property implemented (proposed by Fabio Cavicchio)
2.0.0 26-Apr-98 This version fixes the bug that version 1.6 only claimed to fix... (versions < 2.0.0 will not redraw correctly if a MDI child window which has been moved partially out of view is scrolled in view again (unfortunately this hadn't been tested ever).
Note that I found the values for internal constants ScrollUnit and ScrollLineSize by experimenting, so there is no guarantee that they are valid under all circumstances. However, tests did not give any hints that they are not.
The Mode property has been removed.  The virtual desktop of a MDI frame window is best considered as infinite in size (you may move a MDI child to the left until it's almost completely outside the window, then scroll it in view, then again move it to the left and so forth...); therefore notions like 'top', 'left', 'center' are meaningless in this context.
The component now always works in a mode equivalent to Mode=wpTile in earlier versions.
Bug fix: Previous versions won't redraw correctly for scrollbar positions <> 0.
1.5 06-Mar-98 MDIWallpaper package comes with an online-help file now.
Added transparency code by Mike Burton, with some modifications, among others:
  • SetTransparent property access method
  • TransparentColor property
  • TransparentMode property
1.4 03-Mar-98 Bug fix: Prior versions will not redraw correctly on form resize if Mode property not in [wpTile, wpTopLeft].
1.3 09-Dez-97 Make it work with non-MDI windows by commenting out two lines in TMDIWallpaper.Create.
Minor fix.
1.2 28-Nov-97 Added Mode property values wpTopRight, wpBottomLeft and wpBottomRight.
Some fixes.
1.1 06-Nov-97 Added Mode property value wpStretch
1.0 22-Oct-97 First public release

New versions of mdiwallp.zip

The most recent version of mdiwallp.zip is available at my WWW-homepage.


If you have any comments, bug reports etc., send me an email.

Last updated January 27, 2000.