Old 16th September 2011, 11:33   #1
benjohnson
Junior Member
 
Join Date: Dec 2010
Posts: 7
inetc background colour on banner mode?

Hi All

I've changed the background colour of my nsDialogs pages using the normal SetCtlColors technique but when I trigger an inetc download in banner mode it has a grey background (see picture).

Does anyone know how to change this? I've had a look using AutoIt (to find the ID) and Resource Hacker but can't seem to find what I'm looking for.

If it helps, the inetc download is in the leave function of my page.

Cheers.
Attached Thumbnails
Click image for larger version

Name:	screen.png
Views:	210
Size:	40.3 KB
ID:	49145  
benjohnson is offline   Reply With Quote
Old 16th September 2011, 14:06   #2
Afrow UK
Moderator
 
Afrow UK's Avatar
 
Join Date: Nov 2002
Location: Surrey, England
Posts: 8,433
You probably need to modify the plug-in.

Stu
Afrow UK is offline   Reply With Quote
Old 19th September 2011, 05:09   #3
T.Slappy
Senior Member
 
T.Slappy's Avatar
 
Join Date: Jan 2006
Location: Slovakia
Posts: 497
Send a message via ICQ to T.Slappy
Try to modify IDD_DIALOG1 or IDD_DIALOG2 in .rc file of plugin using Visual Studio and recompile it.

Cool looking skinned Graphical Installers: www.graphical-installer.com
I offer NSIS scripting, C/C++/C#/Delphi programming: www.unsignedsw.com
Develop NSIS projects in Visual Studio 2005-2017: www.visual-installer.com
or RAD Studio 2009, 2010, XE-10.2 Tokyo: www.rad-installer.com
T.Slappy is offline   Reply With Quote
Old 19th September 2011, 08:48   #4
benjohnson
Junior Member
 
Join Date: Dec 2010
Posts: 7
Thanks, I'll give it a go and report back.
benjohnson is offline   Reply With Quote
Old 25th September 2011, 08:07   #5
rmangroliya
Junior Member
 
Join Date: Aug 2011
Posts: 3
Thumbs up solved set background of inetc dialogs

hello

i have solved this issue. we could not able to set background color on .rc files. so, you have to modify code of inetc.

i have attached inetc.cpp you can look at on that with below code.



HBRUSH g_hbrBackground = CreateSolidBrush(RGB(217, 212, 213)); // background //color
/*****************************************************
* FUNCTION NAME: dlgProc()
* PURPOSE:
* dlg message handling procedure
* SPECIAL CONSIDERATIONS:
* todo: better dialog design
*****************************************************/
BOOL WINAPI dlgProc(HWND hDlg,
UINT message,
WPARAM wParam,
LPARAM lParam ) {
switch(message) {
case WM_INITDIALOG:
onInitDlg(hDlg);
centerDlg(hDlg);
break;
case WM_PAINT:
// child dialog redraw problem. return false is important
RedrawWindow(GetDlgItem(hDlg, IDC_STATIC1), NULL, NULL, RDW_INVALIDATE);
RedrawWindow(GetDlgItem(hDlg, IDCANCEL), NULL, NULL, RDW_INVALIDATE);
RedrawWindow(GetDlgItem(hDlg, IDC_PROGRESS1), NULL, NULL, RDW_INVALIDATE);
UpdateWindow(GetDlgItem(hDlg, IDC_STATIC1));
UpdateWindow(GetDlgItem(hDlg, IDCANCEL));
UpdateWindow(GetDlgItem(hDlg, IDC_PROGRESS1));
return false;
case WM_TIMER:
if(!silent && IsWindow(hDlg))
{
// long connection period and paused state updates
if(status != ST_DOWNLOAD && GetTickCount() - transfStart > PROGRESS_MS)
transfStart += PROGRESS_MS;
if(popup) onTimer(hDlg);
else progress_callback();
RedrawWindow(GetDlgItem(hDlg, IDC_STATIC1), NULL, NULL, RDW_INVALIDATE);
RedrawWindow(GetDlgItem(hDlg, IDCANCEL), NULL, NULL, RDW_INVALIDATE);
RedrawWindow(GetDlgItem(hDlg, IDC_PROGRESS1), NULL, NULL, RDW_INVALIDATE);
}
break;
case WM_COMMAND:
switch(LOWORD(wParam))
{
case IDCANCEL:
if(nocancel) break;
if(szQuestion &&
MessageBox(hDlg, szQuestion, *szCaption ? szCaption : PLUGIN_NAME, MB_ICONWARNING|MB_YESNO) == IDNO)
break;
status = ST_CANCELLED;
case IDOK:
if(status != ST_CANCELLED && HIWORD(wParam) != INTERNAL_OK) break;
// otherwise in the silent mode next banner windows may go to background
// if(silent) sf(hDlg);
KillTimer(hDlg, 1);
DestroyWindow(hDlg);
break;
}
break;
case WM_CTLCOLORSTATIC:
{
HDC hdcStatic = (HDC)wParam;
SetTextColor(hdcStatic, RGB(24, 49, 75)); // foreground color
SetBkMode(hdcStatic, TRANSPARENT);
return (LONG)g_hbrBackground;
}
break;
case WM_CTLCOLORDLG:
return (LONG)g_hbrBackground;

default: return false;
}
return true;
}
Attached Files
File Type: zip inetc.zip (14.5 KB, 145 views)
rmangroliya is offline   Reply With Quote
Old 8th February 2017, 18:49   #6
Nutzzz
Junior Member
 
Join Date: May 2007
Location: Orange County, CA, U.S.A.
Posts: 3
Thought I'd resurrect this thread for an updated solution.

Our installer uses UltraModernUI with alternate branding that uses 2 different color schemes, so I needed a more flexible solution than rmangroliya's, so my quick and dirty solution was to adapt the idea here, basing it on the current latest version (1.0.5.2), and adding 2 parameters, /textcolor="RRGGBB" and /bgcolor="RRGGBB".

This way, I can just pass along the ${UMUI_TEXT_COLOR} and ${MUI_BGCOLOR} defines.
Attached Files
File Type: txt inetc.cpp.txt (56.4 KB, 18 views)
Nutzzz is offline   Reply With Quote
Reply
Go Back   Winamp & SHOUTcast Forums > Developer Center > NSIS Discussion

Tags
background, color, colour, inetc

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump