This is the problem here.
at some point in history, someone decided the callback feature causes issues and the callback is only enabled when the ApplyButton is selected in the options.
//setting CF_ENABLEHOOK shows an oldstyle dialog, unless lpTemplateName is set
//and a template is linked in as a resource,
//this also requires additional flas set:
//https://msdn.microsoft.com/en-us/library/windows/desktop/ms646832(v=vs.85).aspx
if (fdApplyButton in Options) then
begin
Flags := Flags or CF_ENABLEHOOK;
lpfnHook := @FontDialogCallBack;
lCustData := PtrInt(@ACommonDialog);
end;
The fix I have can only work if this hook is enabled all the time, not just the applyBUtton.
Tell me what you think, if you enable the applybutton, does it change the view as it claims?
does not here.
--
In the fontDialogCallBack, this is changed;
case uMsg of
WM_INITDIALOG:
begin
//debugln(['FontDialogCallBack: WM_INITDIALOG']);
//debugln([' PChooseFontW(LParam)^.lCustData=',IntToHex(PChooseFontW(LParam)^.lCustData,8)]);
PtrInt(Dlg) := PChooseFontW(LParam)^.lCustData;
If (Dlg <> Nil)and (Dlg^.Title <> '') THen SetWindowText(Wnd,Pchar(Dlg^.Title));//jp
end;
WM_COMMAND:
The line where my john handcock is!