VOICE Home Page: http://www.os2voice.org
[Newsletter Index]
[Previous Page] [Next Page]
[Features Index]

October 1999

The Revised Young Person's Guide to Hacking the Stardock Object Desktop 2.0 Windows 95 LNF, 2nd Edition

By: The Rev. Andrew Graham awmg@yesic.com

Chapter 1.

Everybody who uses Stardock's Object Desktop 2.0, knows because it's documented in the Stardock Look 'n Feel kit for OS/2 and all OS/2 users everywhere always read the docs, that you can create new bitmap looks for your titlebars using VisualAge C++. I gave Kris Kwilas the makefile for CSET++ 2.1, and he included it in the distribution, so even if you have an old IBM compiler you can still change your "look". You can't use the Borland compiler because it won't recognize the distribution LNFs as DLLs. You can't use the Borland Resource Workshop for the same reason.

I may be the only OD2 user to have made an LNF, judging by the apathy I see around me. The first edition of this article called Stardock apathetic too, but Brad Wardell wrote me a nice thank you for posting the article, so I take it back. Stardock isn't apathetic. I was wrong. Wrong, I tell you! I didn't mind using the old IBM C Compiler to make the odd custom LNF file, but I got tired of waiting for the promised API to turn off those darned lines on the title bars! If you just want to change your titlebar bitmaps, and don't want the annoying MacIntosh-like lines on your titlebars, you can use the ResMgr package available from Hobbes, to gut the distributed Windows 95 LNF, and remake it into something palatable. The Resource Manager package contains a couple of utilities you will need to do this, and along with the OS/2 resource compiler and the icon editor, you're ready to roll your own title bars.


Operating System/2 Resource Decompiler ftp://hobbes.nmsu.edu/pub/os2/dev/util/resmgr.zip
Version 2.08.000 Feb 17 1996
(C) Copyright Martin Lafaix 1994, 1995, 1996
All rights reserved.

[13:01:46.67 C:\]rc
Operating System/2 Resource Compiler
Version 2.02.001 Feb 01 1994
(C) Copyright IBM Corporation 1988-1993
(C) Copyright Microsoft Corp. 1985-1993
All rights reserved.

ICONEDIT.EXE Copyright IBM Corporation 1991.

Here's what I did:

Copy your OBJDWN95.LNF from the \objdesk directory to an empty \tmp directory.
Rename OBJDWN95.LNF OBJDWN95.DLL, and use the resource decompiler to extract the bitmaps. Like this:

[c:\tmp]rdc OBJDWN95.DLL

Martin Lafaix tells me that the names of the .BMP files will change with every run of RDC, so my filenames will be wrong on your system. For a listing of all 66 bitmaps and their descriptions see the Bitmap cross-reference table. Because I am a lowly hacker(tm), I only ran RDC once, and made a Fatal Assumption(tm) in the first edition of this article. Compare these to the file objdwn95.rc2 that RDC will generate, and match up the descriptions with the right filename using the BITMAP number. That is, BITMAP 109 *should* always be an 18x18 Minimize-Down button, regardless of what RDC names the file on your system. (note that there's no difference between the hide and minimize bitmaps in the Windows 95 LNF as published). Also note that frame control bitmaps are actually pointers.

Now you edit the titlebar buttons you want to change, saving them with the same filename they had before. If you want to distribute your LNF, then you ought to alter all of them using OS/2 iconedit.exe. But if you know which ones your computer uses, then just alter the ones you need for your personal machine if you don't want to share your customizations with others. For instance, on my ThinkPad at 800x600, OS/2 uses only the 18x18 titlebar bitmaps, so they're the only ones I ever change. I use a batchfile to call iconedit.exe, like this:

REM -------------------------
iconedit res02514.bmp
REM 18maximize_dn
iconedit res02515.bmp
REM 18restore__up
iconedit res02789.bmp
REM 18rollup___up
iconedit res08939.bmp
rem 18minimize_dn
iconedit res09214.bmp
rem 18close____up
iconedit res18714.bmp
rem 18minimize_dn
iconedit res25139.bmp
rem 18minimize_up
iconedit res31839.bmp
rem 18rollup___dn
iconedit res38264.bmp
rem 18close____dn
iconedit res44414.bmp
rem 18minimize_up
iconedit res60614.bmp
rem 18restore__dn
iconedit res73464.bmp
rem 18maximize_up
REM --------------------------

The Finale
After you've edited the bitmaps you want, and saved them all with the same names RDC gave them when it generated them out of the DLL, you're ready to use rc.exe to make your new LNF. In the same \tmp directory, run RC.exe like this:
[c:\tmp]rc OBJDWN95.RC2 OBJDWN95.DLL

It will grind and mash all those nice bitmaps overtop the ugly old Windows lookalikes. Now you copy the new OBJDWN95.DLL to your \objdesk directory, renaming it to OBJDWN95.LNF. [c:\tmp]copy OBJDWN95.DLL \objdesk\OBJDWN95.LNF Open up your Master Setup in your Object Desktop folder, and click the Window Controls tab. Scroll down the list of available LNF's to the one that says Windows 95. Select it, and watch your new creation become the titlebar icons on all your windows. You have successfully hacked Object Desktop 2, and eradicated the cursed Look 'n Feel of Windows 95.

Congratulations, you are now a local hero.

The Rev. Andrew Graham
St Columba and All Hallows Church
2723 St. Clair Ave. East
Toronto Ontario M4B 1M8

[Previous Page ] [ Index] [Features] [Next Page ]
VOICE Home Page: http://www.os2voice.org