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

Displaying text on top of a bitmap/image


8 replies to this topic

ptyrrell

ptyrrell
  • Members
  • 10 posts

Posted 19 January 2006 - 13:11

We have several (in excess of 10) products that all have to have installers that look the same as much as possible. Our UI people want there to be an image/bitmap on the left hand side of every installer dialog to brand it as 'ours'. They also want all the installers to have the same 'basic' steps such as a welcome dialog, a license dialog, a pre-install summary dialog, an installation progess dialog and an install complete dialog.

To indicate these steps to the user and to highlight the current step they (the UI people) want to add the titles of these dialogs ('Welcome', 'License', 'Pre-install summary', 'Install', 'Install complete') on top of the image/bitmap mentioned above. In addition they want the 'current' step to be in white text and the others to be grey. They also want a 'indicator' image next to the current step to make it stand out even more and to help with the branding.

Currently I've created a different image for each step, added the same (gery) text in the same location to each image and then added the indicator image and changed the text to white for that step. So I've spent lots of time (I'm no graphic designer!) and got 5 images that look exactly as the UI people want them to look. I've then used these images on the appropriate custom dialogs and everyone's happy.

However they now want to do two things - the first is to make the installers localisable and to add new steps to the installers for some of the products (e.g. configuration). Of course continuing with the 'separate images for each step' approach is not suitable.

So I need to be able to add a piece of text (obtained from the String Table) on top of an image at a particular location in a particular font and colour as well as being able to add an image (with part of it being transparent) on top of an image.

Does anyone have any idea of how I can acheive either of these? I've found things like the Windows GDI call DrawText but I can't work out how to use it! And I can't see how to set the font or colour in that call!

Apologies for the lengthy post!

Cheers,

Paul.


Stefan Krueger

Stefan Krueger

    InstallSite.org

  • Administrators
  • 13,269 posts

Posted 19 January 2006 - 13:41

Can't you simply put a static text control on top of the bitmap, using the dialog editor? I think the standard dialogs do this by placing text on top of the banner bitmap at the upper edge of the dialogs.

ptyrrell

ptyrrell
  • Members
  • 10 posts

Posted 19 January 2006 - 14:05

I can do that but I can't work out how to alter the colour of the text!

Also I can't find it now (and so may well be imagining it!) but I'm sure I read somewhere in the Help that I shouldn't put a text control/label on top of a bitmap/image.

Paul.


ptyrrell

ptyrrell
  • Members
  • 10 posts

Posted 19 January 2006 - 14:36

I've tried putting a text control on top of an image on one of the standard dialogs and it look OK. I've also tried putting a text control on top of an image on a custom dialog and it doesn't appear to be transparent.

Any ideas? Is there something I need to do when I create the dialog to get it to work? Here's the dialog code:

szDialogName = "DialogTest";
if EzDefineDialog (szDialogName, ISUSER, szDialogName,0 ) < 0 then
return -1;
endif;

repeat
nCmdValue = WaitOnDialog (szDialogName);

switch (nCmdValue)
case DLG_INIT:
// do nothing
case NEXT_BUTTON:
bDone = TRUE;
case BACK_BUTTON:
bDone = TRUE;
case -1:
bDone = TRUE;

endswitch;
until bDone;

EndDialog (szDialogName);
ReleaseDialog (szDialogName);

Attached Images

  • DialogTest.gif


Stefan Krueger

Stefan Krueger

    InstallSite.org

  • Administrators
  • 13,269 posts

Posted 19 January 2006 - 14:40

To change the text color you may need to write code in the dialog script.
Given that text may take more space in other languages I think the idea of creating sets of language specific images may be a good solution.

ptyrrell

ptyrrell
  • Members
  • 10 posts

Posted 19 January 2006 - 15:05

Stefan,

Thanks for the reply.

The problem with the images solution is that there is a requirement to be able to change the localisation/text without having to have any InstallShield knowledge. Also as you can imagine the text is changing constantly as the products evolve so its a full-time but also tedious job!!

Regarding the space issue what I had thought was that we may well have a 'base' dialog for each locale so the English/UK and English/US are probably the same size/dimensions/layout. But the German,Germany may well be wider to accomodate the (potentially) longer words required. Basically trying to reduce the number of changes to be made when the product and company branding/colours/etc change!

Do you have any idea about the code to change the colour of the text? I've done plenty of InstallScript before - changing font etc. I just need a pointer in the right direction.

Any idea on why the label transparency works on the standard dialog but not on the custom dialog?

Cheers,

Paul.


Stefan Krueger

Stefan Krueger

    InstallSite.org

  • Administrators
  • 13,269 posts

Posted 20 January 2006 - 16:52

QUOTE
Do you have any idea about the code to change the colour of the text?
I haven't had to do that before, so I don't know. I know how to do it in MSI but not in InstallScript.
QUOTE
Any idea on why the label transparency works on the standard dialog but not on the custom dialog?
No, maybe some setting is different (might even be a setting that's not visible in dialog editor. Did you create your custom dialog as copy of a predefined dialog?

ptyrrell

ptyrrell
  • Members
  • 10 posts

Posted 23 January 2006 - 09:01

Can you tell me how to do the colour change in MDI in case that points me in the right direction?

No - the custom dialog was created 'from scratch' and not from a standard dialog.

Paul.


Stefan Krueger

Stefan Krueger

    InstallSite.org

  • Administrators
  • 13,269 posts

Posted 24 January 2006 - 08:55

Windows Installer (aka MSI) uses a database to define the instalaltion. It has a TextStyle table where you can define the text color. Unfortunately this will not help you at all for InstallScript.