用过AX的都知道,在进行一个大的操作时,如果无法立刻执行完成,那运行这个操作的过程经常出现的就是系统的大白板,系统系统窗口没有响应,就算是加了进度条,也是一样没有响应,这样用户就无法查看当前操作的运行进度,通过下面的补丁就可以解决这个问题
在WinApi类中增加方法
1 /// <summary> 2 /// Call user32.DisableProcessWindowsGhosting 3 /// </summary> 4 /// <remarks> 5 /// Disables the window ghosting feature for the calling GUI process. Window 6 /// ghosting is a Windows Manager feature that lets the user minimize, move, 7 /// or close the main window of an application that is not responding. 8 /// </remarks> 9 public static client void disableProcessWindowsGhosting() 10 { 11 DLL dll = new DLL(#UserDLL); 12 DLLFunction dllFunc = new DLLFunction(dll, @"DisableProcessWindowsGhosting"); 13 ; 14 dllFunc.returns(ExtTypes::void); 15 dllFunc.arg(); 16 17 dllFunc.call(); 18 }
在info.startupPost()中添加调用
1 /* 2 No SYS code must exist in this method 3 */ 4 void startupPost() 5 { 6 if (clientKind() == ClientType::Client) 7 { 8 // BP deviation documented 9 WinAPI::disableProcessWindowsGhosting(); 10 } 11 }
这个补丁需要操作系统WIN XP SP3 或者WIN2003 SP2以上才能支持