Archive: Custom Dialogs


Custom Dialogs
I was just wondering how easy it would be
to create custom dialogs in the installer.
Right now, I'm using the modern UI. I would like to create an entirely new set of dialogs that are, in a way, skinned. I realize that I'd have to create them in C++, but that's cool. Is there a spec I can follow for resource and dialog names? Is there any tutorial out there for doing such a thing?

What my company wants is a fully skinned installer, which means the dialog wouldn't even look like a typical windows dialog. The buttons would be skinned, and so would the min/max/close buttons.

thanks,

-Dennis


Well, as far as I know, to skin a window you have to respond to Windows messages such as WM_PAINT and paint it yourself. For that, you can create a plug-in that will take over the windows procedure of NSIS and load it using /NOUNLOAD. You'll also have to know whenever a new dialog or a button is created and take over those too. I won't call it easy, but not much harder than regular skinning either. This has never been done as far as I know, and so there aren't any tutorials or examples available. If you do this eventually I would love seeing the results. If you need any help with creating the plug-in, or even changing the source code if you find it easier don't hesitate to ask.


Hi Kichik !

I'm gonna try to paint the Installer dialog, need some help:
I'm starting with this (take from the brand text):


GetDlgItem $R0 $HWNDPARENT 1028
;1028 is brand-text, what's for the hole installer dialog
CreateFont $R1 "Tahoma" 10 700
SendMessage $R0 ${WM_PAINT} $R1 0

dark_boy, you need to respond to ${WM_PAINT} not send it, and you can't do that without a plug-in. To set the font you need to send ${WM_SETFONT}.