Archive: inetc background colour on banner mode?


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.


You probably need to modify the plug-in.

Stu


Try to modify IDD_DIALOG1 or IDD_DIALOG2 in .rc file of plugin using Visual Studio and recompile it.


Thanks, I'll give it a go and report back.


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;
}