MFC 확장 DLL에 포함된 다이얼로그를 생성할때 Create() 에서 실패하는 경우에 참고할 점


아래 내용과 같이 Custom Class 의 RegisterWindowClass() 안에서 윈도우 스타일에 CS_GLOBALCLASS를 추가하면 정상적으로 인식된다.!!



After using AfxGetInstanceHandle() to load a language DLL for my application I 
found the resource dialogs which contained the custom controls began to fail
from within CreateDialogIndirect.

When a window class is registered that class name is good for that application's
instance. After loading the language DLL the dialogs now reside within a separate
instance. 

The solution I found was to add CS_GLOBALCLASS to the class registration.
wndcls.style = CS_GLOBALCLASS | CS_DBLCLKS | CS_HREDRAW | CS_VREDRAW;

Further reading: 
Registering a Class in a DLL



https://support.microsoft.com/ko-kr/help/97758/registering-a-class-in-a-dll

+ Recent posts