Displays a message box with error information.
#define DXTRACE_ERR_MSGBOX(str,hr)
Returns the HRESULT that was assigned to hr.
For debug builds, the macro will display an error message that looks similar to the following:
c:\basichlsl\basichlsl.cpp(242): D3DXCreateFont( pd3dDevice, 15, 0, FW_BOLD, 1, FALSE, DEFAULT_CHARSET, OUT_DEFAULT_PRECIS, DEFAULT_QUALITY, DEFAULT_PITCH | FF_DONTCARE, L"Arial", NULL ) hr=D3DERR_INVALIDCALL (0x8876086c)
If you are using the Visual Studio .NET debugger, you can jump to the line of source code where the error occurred by double-clicking this message in the debug output window.
If you don't want to use a message box to debug, you can send error messages to the debug output window in Visual Studio .NET using DXTRACE_ERR or DXTRACE_MSG.