For the beginning it would not be necessary to integrate the custom size feature, because people can make their own custom header UIs with the bitmap size they need and the labels set to foreground through reshacker. Then the transparent label feature would be good for people who really need to customize the ui and can wait for the easier commands in the later builds.
Change top bitmap in modern ui
43 posts
Maybe a feature for transparency will be added to NSIS in the future.
Is it not just a matter of calling SetBkMode(dc,TRANSPARENT) ?
I'm not sure. I think you also have to respond to a message.
Yea, it must be in a message. There is already some partly transparent code for the MUI's branding text, I'll try to get a transparent text option out of it too.
The message you're thinking of is WM_CTLCOLORSTATIC
You probably want something like this:
case WM_CTLCOLORSTATIC:
{
HWND ctl = (HWND)lp;
HDC hdc = (HDC)wp;
if(ctl == APPROPRIATE_CONTROL)
SetBkMode(hdc, TRANSPARENT);
else
SetBkMode(hdc, OPAQUE);
return 0; // we're meant to return a brush, but this should
// get us a default
}
This didn't work quite right the one time I tried it, but that was on the PocketPC, where nothing works quite as it should :/
You probably want something like this:
case WM_CTLCOLORSTATIC:
{
HWND ctl = (HWND)lp;
HDC hdc = (HDC)wp;
if(ctl == APPROPRIATE_CONTROL)
SetBkMode(hdc, TRANSPARENT);
else
SetBkMode(hdc, OPAQUE);
return 0; // we're meant to return a brush, but this should
// get us a default
}
This didn't work quite right the one time I tried it, but that was on the PocketPC, where nothing works quite as it should :/
Sorry
Fist sorry my post.
Second: Cool. The bitmap is COOL.
Third: How I can use my own headbitmap?
I think, it is better, when I can make an own bitmap, which is right for the program I want to install, am I right?
So long,
raffiX, 15; Germany, NRW, Cologne
Fist sorry my post.
Second: Cool. The bitmap is COOL.
Third: How I can use my own headbitmap?
I think, it is better, when I can make an own bitmap, which is right for the program I want to install, am I right?
So long,
raffiX, 15; Germany, NRW, Cologne
Check the Modern UI Readme:
Use MUI_HEADERIMAGE to enable the image and MUI_HEADERIMAGE_BITMAP to use a custom bitmap.
(Modern UI 1.67/1.68)
Use MUI_HEADERIMAGE to enable the image and MUI_HEADERIMAGE_BITMAP to use a custom bitmap.
(Modern UI 1.67/1.68)
As I said, I'm quite to dumb for this 😁 I had Errors with MUI_HEADERIMAGE_BITMAP but I used a simple way which I used in InstallShield some time ago:
take your bitmap, and save it as
...\NSIS\Contrib\Graphics\Header\nsis.bmp
As me and my friends say: if you don't understand how to do it, try to find another way...
I know this isn't the best way and in fact not the way you mentioned, but it works well 🙂
so long -L-B-
take your bitmap, and save it as
...\NSIS\Contrib\Graphics\Header\nsis.bmp
As me and my friends say: if you don't understand how to do it, try to find another way...
I know this isn't the best way and in fact not the way you mentioned, but it works well 🙂
so long -L-B-
It's a very simple setting:
!define MUI_HEADERIMAGE_BITMAP "yourbitmap.bmp"
No need to overwrite the default image file.
!define MUI_HEADERIMAGE_BITMAP "yourbitmap.bmp"
No need to overwrite the default image file.
Well, I'm trying to add a header bitmap with NSIS 2.0 RC4 and not having much success.
I do not get any bitmap with any of these:
!define MUI_HEADERIMAGE_BITMAP "${NSISDIR}\Contrib\Graphics\Header\nsis.bmp"
!define MUI_HEADERIMAGE_BITMAP "nsis.bmp"
But with:
!define MUI_HEADERIMAGE
or
!define MUI_HEADERIMAGE "whatever.bmp"
I get the default nsis.bmp from the ${NSISDIR}\Contrib\Graphics\Header\ dir.
If I replace the default nsis.bmp with my own bmp my custom bmp works as well.
My custom bmp is 150x57 as required.
I do not get any bitmap with any of these:
!define MUI_HEADERIMAGE_BITMAP "${NSISDIR}\Contrib\Graphics\Header\nsis.bmp"
!define MUI_HEADERIMAGE_BITMAP "nsis.bmp"
But with:
!define MUI_HEADERIMAGE
or
!define MUI_HEADERIMAGE "whatever.bmp"
I get the default nsis.bmp from the ${NSISDIR}\Contrib\Graphics\Header\ dir.
If I replace the default nsis.bmp with my own bmp my custom bmp works as well.
My custom bmp is 150x57 as required.
!define MUI_HEADERIMAGE
!define MUI_HEADERIMAGE_BITMAP "whatever.bmp"
!define MUI_HEADERIMAGE_BITMAP "whatever.bmp"
Oh, you mean I need both? Yup that solved it. But I just couldn't figure that out from the docs.