Read and respond to this message at:
https://sourceforge.net/forum/message.php?msg_id=4468451
By: dzimm
In D7 I get an AV when trying to Execute a TColorDialog. I found the problem
in UTF8VCLCommDlg.ChooseColorAIntercept where he tries to translate the
lpTemplateName when CC_ENABLETEMPLATE isn't true.
I fixed with
function ChooseColorAIntercept(var CC: TChooseColorA): Bool; stdcall;
var
CCW: TChooseColorW;
begin
Move(CC, CCW, SizeOf(TChooseColorA));
with CCW do
begin
lpfnHook := nil;
lpTemplateName := nil;
end;
try
if CC.Flags and CC_ENABLETEMPLATE <> 0 then // Don't convert unless needed
CCW.lpTemplateName := ConvertFromUTF8(CC.lpTemplateName);
CCW.lpfnHook := WndProcConvertW2U(Pointer(@CC.lpfnHook),
Pointer(@StdWndProcInterceptU2W), Pointer(@StdWndProcInterceptW2U));
Result := ChooseColorW(CCW);
CC.rgbResult := CCW.rgbResult;
finally
FreeMem(CCW.lpTemplateName);
end;
end;
______________________________________________________________________
You are receiving this email because you elected to monitor this forum.
To stop monitoring this forum, login to SourceForge.net and visit:
https://sourceforge.net/forum/unmonitor.php?forum_id=671785
|