Generally, Dax error is interpreted as follows: in Delphi ActiveX, a process has only one parkingwindow, And the parkingwindow function of axctrls. PAS in VCL needs to be modified:
Function parkingwindow: hwnd;
VaR
Tempclass: twndclass;
Parkingname: string;
Begin
Result: = xparkingwindow;
If result <> 0 Then exit;
// Fix Dax error: accessviolation (Win2k, Win XP)
Parkingname: = 'daxparkingwindow _ '+ format (' % P', [@ parkingwindowproc]);
Fillchar (tempclass, sizeof (tempclass), 0 );
If not getclassinfo (hinstance, pchar (parkingname), tempclass) Then // fix Dax error: accessviolation (Win2k, Win XP)
Begin
Tempclass. hinstance: = hinstance;
Tempclass. lpfnwndproc: = @ parkingwindowproc;
Tempclass. lpszclassname: = pchar (parkingname); // fix Dax error: accessviolation (Win2k, Win XP)
If windows. registerclass (tempclass) = 0 then
Raise eoutofresources. Create (swindowclass );
End;
Xparkingwindow: = createmediawex (ws_ex_toolwindow, tempclass. lpszclassname, nil,
Ws_popup, getsystemmetrics (sm_cxscreen) Div 2,
Getsystemmetrics (sm_cyscreen) Div 2, 0, 0, 0, 0, hinstance, nil );
Setwindowpos (xparkingwindow, 0, 0, 0, 0, 0, swp_noactivate or swp_noredraw
Or swp_nozorder or swp_showwindow );
Result: = xparkingwindow;
End;
However, if the preceding modification does not solve all the problems, a Dax error will still be reported. After debugging and testing, the problem is found in the sentence "If result <> 0 Then exit, you also need to comment out or remove it and re-compile it.