Newsgroups : Borland : borland.public.delphi.nativeapi.win32 : 2006 Nov : Change background dialog color
| Subject: | Change background dialog color |
| Posted by: | "Bill" (w2m..@frontiernet00.net) |
| Date: | Fri, 17 Nov 2006 19:21:19 |
I have some SFX.bin code Fro TZip that creates a dialog:
How can I change the background dialog color from clbuttonface to
clwindow. The dialog is in a res file and has menifest in the res as well.
I am used to dealing with vcl.
Thanks,
Bill
function Main(Dialog: HWnd; AMessage, WParam: LongInt;
LParam: Longint): Bool; stdcall;
var
s: string;
i: integer;
begin
result := True;
case AMessage of
wm_InitDialog:
begin
SendMessage(Dialog, WM_SETTEXT, 0, LongInt(pchar(Caption)));
SetDlgItemText(Dialog, idSTATIC2, pchar(Copyright));
CenterWindow(Dialog);
//set the application icon...
SetClassLong( Dialog, GCL_HICON, LoadIcon( hInstance, SFXICON'));
//save and show the current path...
ExtractPath := ExtractFilePath(paramstr(0));
SetDlgItemText(Dialog,idEDIT_PATH,pchar(ExtractPath));
//fill listbox with all files in archive... (halts if empty)
FillListbox(GetDlgItem(Dialog,idLISTBOX));
if AllowSelect then
begin
SendDlgItemMessage(Dialog, idRADIO_ASK, BM_SETCHECK, 1, 0 );
OverwriteOption := ooAsk;
end else
begin
SendDlgItemMessage(Dialog, idCHECKBOX, BM_SETCHECK, 1, 0 );
OverwriteOption := ooOverwrite;
end;
end;