Go Back   Winamp Forums > Developer Center > NSIS Discussion

Reply
Thread Tools Search this Thread Display Modes
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:	68
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: Birmingham, England
Posts: 8,202
You probably need to modify the plug-in.

Stu

Need an installer? http://www.afrowsoft.co.uk
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: 361
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.

Create cool looking Graphical Installers in NSIS: www.graphical-installer.com -see below
I offer NSIS scripting, C/C++/C#/Delphi programming: www.unsigned-softworks.sk
Develop NSIS projects directly in Visual Studio 2005-2012: www.unsigned-softworks.sk/visual-installer/
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, 46 views)
rmangroliya is offline   Reply With Quote
Reply
Go Back   Winamp 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