RT

解决方案 »

  1.   

    你的回答还不如“google 之”来的痛快
      

  2.   

    这类错误用try..catch捕捉不了。试下用SetErrorMode()函数吧。
    UINT SetErrorMode(
      UINT uMode
    );uMode 
    [in] Process error mode. This parameter can be one or more of the following values. Value Meaning
     
    0 Use the system default, which is to display all error dialog boxes. SEM_FAILCRITICALERRORS
    0x0001 The system does not display the critical-error-handler message box. Instead, the system sends the error to the calling process.
     
    SEM_NOALIGNMENTFAULTEXCEPT
    0x0004 The system automatically fixes memory alignment faults and makes them invisible to the application. It does this for the calling process and any descendant processes. This feature is only supported by certain processor architectures. For more information, see the Res section. 
    After this value is set for a process, subsequent attempts to clear the value are ignored.
     
    SEM_NOGPFAULTERRORBOX
    0x0002 The system does not display the general-protection-fault message box. This flag should only be set by debugging applications that handle general protection (GP) faults themselves with an exception handler.
     
    SEM_NOOPENFILEERRORBOX
    0x8000 The system does not display a message box when it fails to find a file. Instead, the error is returned to the calling process. 
      

  3.   

    我是要捕捉到这个消息(错误),然后阻止系统自带的messagebox弹出, 然后用自绘的messagebox做提示