AfxOleInit CoInitializeEx 问题

mfc程序中使用CoInitializeEx(NULL, COINIT_MULTITHREADED),不能显示对话框,原因是要换STA的参数

MFC applications must be initialized as single threaded apartment (STA). If you call CoInitializeEx in your InitInstance override, specify COINIT_APARTMENTTHREADED (rather than COINIT_MULTITHREADED).

你可能感兴趣的:(AfxOleInit)