在我的应用程序中,我想从不同的线程向对话框发送消息。我想将 std::exception 派生类引用传递给对话框。
像这样的东西:
try {
//do stuff
}
catch (MyException& the_exception) {
PostMessage(MyhWnd, CWM_SOME_ERROR, 0, 0); //send the_exception or the_exception.error_string() here
}
我想在我的对话框中接收消息并显示其中的错误 the_exception.error_string()
LPARAM CMyDlg::SomeError(WPARAM, LPARAM)
{
show_error( ?????
return 0;
}
我想通过std::string the_exception.error_string()
使用 PostMessage 也可以。