Question : Resource unavailable when calling modeless dialog from regular MFC dll

I created a regular MFC dll with some database routines. In the same solution I created another project - MFC SDI application. Within this application I created some dialogs (some modal, some not). I made them work with the functionality exported from the dll.
Now I'm trying to put those dialogs inside the dll. I copied the dialog resources and apropriate classes to the dll project and removed them from application. I try to show modeless Property Sheet in an exported function (the code below). CMyPropertySheet is constructed, the pages are added. The problem occurs when I call Create() for this property sheet. It errors out when trying to find resource for a first property page.
function ::FindResource() returns empty resource.
Now, I'm certain that the ID stated in IDD of the Property Page derived class is the correct one. Is it possible, that the application looks in its resources instead of dll's, even though the function is in the dll? If so, how to make it look for this resource in the dll? It has to be "other dll's friendly" so the solution can't be "from now on look for all resources in this dll", because the final application will use many similar dlls.
Code Snippet:
1:
2:
3:
4:
5:
6:
7:
8:
9:
10:
ASSERT(pParent);//this is the main window of application
	CMyPropertySheet* pSheet;// my based on CPropertySheet
	if (!pApp->m_pPSBiblioteka) //here I store the pointer to the dialog (as CWnd*)
	{
		CString str = _T("Biblioteka");
		str.LoadString(IDS_PS_CAPTION);
		pApp->m_pPSBiblioteka = new CMyPropertySheet(str);//the constructor calls AddPage() for each page
	}
	pSheet = (CMyPropertySheet*)(pApp->m_pPSBiblioteka);
	if (!pSheet->GetSafeHwnd()) pSheet->Create(pParent);//create if it's not already created

Answer : Resource unavailable when calling modeless dialog from regular MFC dll

Random Solutions  
 
programming4us programming4us