Cheug's Blog

当前位置:网站首页 / C/C++ / 正文

C++ MFC_Dll初始化窗口显示

2022-12-02 / C/C++ / 454 次围观 / 0 次吐槽 /
#include"DeBug_dll.h"
DWORD WINAPI 显示窗口(LPVOID arg) {
	AFX_MANAGE_STATE(AfxGetStaticModuleState());

	DeBug_dll deBug_dll;//实例化对象 DeBug_dll
	deBug_dll.DoModal();//DoMoDal 以模态的方式显示窗口 
	FreeLibraryAndExitThread(theApp.m_hInstance, 0);//释放Dll
	return 1;
}
// CMy11App 初始化

BOOL CMy11App::InitInstance()
{
	CWinApp::InitInstance();

	DWORD 线程ID = 0;
	::CreateThread(0, 0, 显示窗口, 0, 0, &线程ID);//创建显示窗口的线程

	return TRUE;
}


Powered By Cheug's Blog

Copyright Cheug Rights Reserved.