Archive: How to change background color of custom page in NSIS


How to change background color of custom page in NSIS
Hi there,

I'm using NSIS with Ultra Modern UI. Now I made custom page with the NSIS Dialogs plugin (Good work, BTW). I want to change the background color of the page, as the other pages are blue, but this is grey. How do I do this?

Here's an excerpt of the code:


Function nsDialogsPage

nsDialogs::Create /NOUNLOAD 1018
Pop $0

GetFunctionAddress $0 OnBack
nsDialogs::OnBack /NOUNLOAD $0

${NSD_CreateCheckbox} 20 20 100% 12u Test
Pop $checkbox1
GetFunctionAddress $0 OnChange
nsDialogs::OnChange /NOUNLOAD $checkbox1 $0

${NSD_CreateText} 200 35 100% 12u hello
Pop $edit1
GetFunctionAddress $0 OnChange2
nsDialogs::OnChange /NOUNLOAD $edit1 $0

${NSD_CreateLabel} 0 40u 75% 40u "Hello.$\n* This is just a test.$\n* Nothing will happen."
Pop $0

nsDialogs::Show

FunctionEnd

Use SetCtlColors on the HWND nsDialogs::Create returns (the first Pop $0).


Thank you very much, kichik.

But now, I have another problem. When I leave the custom page via the next-button, the following page is not working, e.g. if you click the buttons, nothing happens. I attached the script.


You're calling nsDialogs::Show in the same page function twice. You should separate each nsDialogs::Create, ${NSD_Create...}, nsDialogs::Show sequence and put it in a different page function.


Thank you very much for your help.