Jump to content


This is a ready-only archive of the InstallSite Forum. You cannot post any new content here. / Dies ist ein Archiv des InstallSite Forums. Hier können keine neuen Beiträge veröffentlicht werden.
Photo

custom bitmap in dialog


11 replies to this topic

Adam

Adam
  • Members
  • 107 posts

Posted 08 February 2002 - 00:10

Hello everyone,

I bought a game the other day that had a sweet installer.

Instead of that drab blue bitmap on the far left (approx 255x374) they had an actual photo. It looked so much better.

I have tried the KB article http://support.insta...ticleid=Q104953
But have been unsuccessful at getting it to work.

I have the bitmap ready at with the exact same dimensions as the old ugly blue one.


Is there anyone that can show me how to place a bitmap I made in that exact dimension as the old blue ugly one,  into the dialogs?

Do i have to change every dialog, or can i just change the 1 bitmap all the dialogs draw from.

Thankyou for your time



clvrmnky

clvrmnky
  • Members
  • 27 posts

Posted 08 February 2002 - 00:21

You change the one bitmap, #103.  You also have to copy the three dialogs that use that bitmap.

Compile, and add it to your project Setup Files.  *Rebuild* the setup, and calls to SdWelcome() and friends will use the new bitmap.

Don't follow the instructions in the kb article to the letter -- I posted a request for them to get their facts straight.

If you've done everything right, and it is still not working, check your build config (Build -> Configurations...) in MSVC.  Make sure that you are making a "Release" version.  A new workspace usually defaults to Debug, and so if you follow the instructions, you've been adding the _isuser.dll as supplied in the example project, which doesn't have your changes in it!


Adam

Adam
  • Members
  • 107 posts

Posted 08 February 2002 - 19:47

Does anyone have a step by step turorial on this?
Has anyone actually done this that can explain it to me?

The KB article doesnt work for me. And all the second reply here did was confuse me more.


Clvrmnky-- i could not get my new bmp to paste into the spot of #103 - i had to make a new one #102 - delete the old #103 and then rename the #102 to #103.

I have to copy what and where? what dialogs?

Heeeeellllllpppppppp

(Edited by Adam at 6:48 pm on Feb. 8, 2002)


Ide Nentjes

Ide Nentjes
  • Members
  • 222 posts

Posted 12 February 2002 - 10:37

Hi Adam,

In your IS project, goto 'Setup Files'>Language Independent > Operating System Independent'. Using the Windows Explorer, drag&drop your bitmap there.

In the OnBegin event, place the folowing line:

DialogSetInfo (DLG_INFO_ALTIMAGE, SUPPORTDIR ^ "MyBitmap.bmp", TRUE);

(with of course the the name of your bitmap substituted for 'MyBitmap.bmp')

Rebuild your project, and there you are.

Success, Ide


clvrmnky

clvrmnky
  • Members
  • 27 posts

Posted 12 February 2002 - 22:22

I found the same thing with the bitmap editor -- I had to create a new bitmap and rename it to #103.

Dialogs: only 3 dialogs have a larger image on the left.  I assumed you were discussing that one, and not the "title bar" image that is controlled by DialogSetInfo().

To change the SdWelcome and SdFinish() and SdFinishReboot() dialogs such that the largish left-hand panel contains your fancy image, you must recompile these three resources after changing an imported image #103.  You create an IsUser.dll based on these changes, which you add to your Setup Files.  Calling these dialogs will now use the resources found in this file.

To change the image in the "title bar" of all the other dialogs, use DialogSetInfo().  If you do both, like I did, you will have to create a transparent image to use for the three custom dialogs to keep the custom or default image from appearing in the left-hand image panel.


Adam

Adam
  • Members
  • 107 posts

Posted 15 February 2002 - 19:43

ok i tried it and i can only get it to work if i have the _ires.dll modified with the bitmap. I tried dropping the _iuser.dll into the setup files and adding teh define lines to the script, but it didnt show anything unless i had a modified _ires.dll.

However i think i missed a step, I just replaced the bitmap #103, then recompiled the _iuser.dll. Are you saying i need to do somthing seperate with the dialogs that use this bitmap?


clvrmnky

clvrmnky
  • Members
  • 27 posts

Posted 18 February 2002 - 21:19

To replace the left-hand image on SdWelcome(), SdFinish() and SdFinishReboot() dialogs:

1. create a MSVC 6 workspace based on the one provided in the installshield installation directory (mine is in  "D:/usr/IS631/Examples/Custom Dialog/VC++ 6 Project")

That is, copy it over to a new work area, and open it up in MSVC 6.

2. Add the three dialogs and the bitmap resources to this new project.  You can cut and paste these by opening up _isres.dll as a "resource".  Cut resources (bitmap) #103,  (dialogs) #12006, 12031, 12032 from the _isres.dll and paste them into your project.

3. Modify #103, and save your changes.  You can test your dialogs to see if they have the new bitmap in the MSVC IDE.

4. Build -> Configurations... and select "Win32 Release" (you should only have to do this once).

5. Build -> Build All.  Check for errors.  The last line should be: "_IsUser.dll - 0 error(s), 0 warning(s)"

6. Copy the _IsUser.dll from the project "Release" directory into your IS project's Setup Files.  You might want to make sure it has a recent timestamp on it.

7. Rebuild your media.

Now, when you call one of these dialogs, the one from _IsUser.dll will be used.

Note that _no_ header files or includes have to modified or added!  All you are doing is changing some resources in a DLL that is _always_ looked for by IS when it makes your media.  That is _IsUser.dll is always used if found, and any resources in this DLL override any in the _isres.dll.

Because we are only changing static fields, there is no need to do any of the other stuff for truly custom dialogs.  This is not a "custom" dialog in any real sense.  It is a "modified" dialog.  You cannot modify the real one, but you can modify a copy, and that is what IS uses.

DO NOT make changes to _isres.dll unless you really know what you are doing!

Any other changes to existing dialogs can be made in this way, as long as they are static changes (changes to bitmaps, text &etc.).  You can also use the templates to create custom dialogs from scratch -- by custom, I mean "dialogs that do not exist in IS and are of your own design and layout".  If you do this, then you have to write IS code to handle the events this dialog will generate.

In all cases, we are adding resources to this same project.  I've modified SdWelcome(), SdFinish(), SdFinishReboot(), 12016 and 12018 in this manner, and created a 100% custom dialog in this manner, which are all in _IsUser.dll.

If you have problems getting the custom bitmap to show up in these dialogs, work backwards until you find the disconnect.  First place I'd start: can you see the results you want in the MSVC IDE?  Is the DLL you expect the actual one being created by MSVC?

Good luck.


jive02

jive02
  • Members
  • 40 posts

Posted 21 February 2002 - 10:34

Do I need to do this for every language?

clvrmnky

clvrmnky
  • Members
  • 27 posts

Posted 22 February 2002 - 00:52

Since we aren't changing the string resources in the original isres.dll, I'm thinking no.

I'm not sure how the static fields are handled, but since they've retained their resource IDs, everything should be fine.  Except that the resource ID for static text fields is always "-1", isn't it?

Maybe it magically works anyway.


Taco Bell

Taco Bell

    IS6 Expert

  • Moderators
  • 1,281 posts

Posted 22 February 2002 - 04:30

<IMHO>

Wow, that's a lot of work for not a lot of added benefit.  I'd rather spend my time pursuing more meaningful additions to my install than a custom setup bitmap.

</IMHO>


clvrmnky

clvrmnky
  • Members
  • 27 posts

Posted 22 February 2002 - 20:13

I'd agree on most days, but as build master and install author, I'm told: "thou shalt put our standard bitmap in yon window".

So I do it.

Actually, it isn't that much work.  I had no knowledge of MSVC resource editors when I started, and I had several tweaked dialogs in a few hours.  I spent more time tracking down the "debug vs. release" problem, but this was a result of my ignorance with the MSVC GUI.

I think it was a reasonable amount of effort for a highly visible part of our installer.


Adam

Adam
  • Members
  • 107 posts

Posted 22 February 2002 - 21:57

Actually i just modified the _ires.dll  with the company logo, so that it would go with any install i do.

Thx for all the replies