|
제가 메인 Exe파일에서 여러개의 DLL로 되어 있는 폼을 불러 메인에 한패널에 계속 parent로 붙입니다.
멤버로
TForm *m_pCurrentForm;
HINSTANCE m_DllInstance;
요 두개를 가지고 있어서 넘어 갈때마다 이두개를 초기화 해줍니다.
try
{
if( m_DllInstance )
{
FreeLibrary(m_DllInstance);
m_DllInstance = 0;
}
if( m_pCurrentForm )
{
m_pCurrentForm->Close();
delete m_pCurrentForm;
m_pCurrentForm = 0;
}
}
catch( Exception &e )
{
}
여런식으로 그런데 m_pCurrentForm를 close나 delete가 되지 않습니다.
초기화를 해주고 다른 dll을 붙여야 하는데...
어떻게 해야 되나영....
????
|