a
下面伪代码中如何捕捉静态对象抛出的异常WndProc()
,Win32 API中的标准消息处理函数在哪里?
class A
{
public:
class Exception{};
A() throw(Exception) { ... }
};
LRESULT CALLBACK WndProc (HWND hwnd, UINT message, UINT wParam, LONG lParam)
{
static A a;
switch( message )
{
case WM_CREATE:
...
break;
...
default:
return DefWindowProc(hwnd, message, wParam, lParam);
}
return 0;
}