Click here to Skip to main content
15,918,041 members
Home / Discussions / C / C++ / MFC
   

C / C++ / MFC

 
AnswerRe: Terminating a process Pin
#realJSOP13-Nov-06 10:15
professional#realJSOP13-Nov-06 10:15 
JokeRe: Terminating a process Pin
led mike13-Nov-06 10:43
led mike13-Nov-06 10:43 
AnswerRe: Terminating a process Pin
Stephen Hewitt13-Nov-06 13:21
Stephen Hewitt13-Nov-06 13:21 
QuestionAutomation server - Coclass registration problem Pin
User 21559713-Nov-06 6:48
User 21559713-Nov-06 6:48 
QuestionMessage Map doesn't work in dynamically loaded dll Pin
Stefan Rehling13-Nov-06 6:39
Stefan Rehling13-Nov-06 6:39 
AnswerRe: Message Map doesn't work in dynamically loaded dll Pin
Mark Salsbery13-Nov-06 7:29
Mark Salsbery13-Nov-06 7:29 
GeneralRe: Message Map doesn't work in dynamically loaded dll Pin
Stefan Rehling13-Nov-06 8:05
Stefan Rehling13-Nov-06 8:05 
GeneralRe: Message Map doesn't work in dynamically loaded dll Pin
Mark Salsbery13-Nov-06 8:27
Mark Salsbery13-Nov-06 8:27 
ulretsam wrote:
DDX is for the automatic data transfer between controls and associated member variables of CDialog or CFormView derived classes.


My mistake....I didn't realize DDX was part of CWnd, not CDialog.
Do you need to call UpdateData() to get MFC to call DoDataExchange()?

ulretsam wrote:
My DLLs are linked at runtime via a call to LoadLibrary()


How do you link all the MFC classes once the DLL is loaded?? Wouldn't implicitly linking be
much easier??

Also, if you haven't done so already ... make sure you have something like this in your extension
dll:
static AFX_EXTENSION_MODULE MyDLLProjectDLL = { NULL, NULL };
 
extern "C" int APIENTRY
DllMain(HINSTANCE hInstance, DWORD dwReason, LPVOID lpReserved)
{
	// Remove this if you use lpReserved
	UNREFERENCED_PARAMETER(lpReserved);
 
	if (dwReason == DLL_PROCESS_ATTACH)
	{
		// Extension DLL one-time initialization
		if (!AfxInitExtensionModule(MyDLLProjectDLL, hInstance))
			return 0;

		// Insert this DLL into the resource chain
		// NOTE: If this Extension DLL is being implicitly linked to by
		//  an MFC Regular DLL (such as an ActiveX Control)
		//  instead of an MFC application, then you will want to
		//  remove this line from DllMain and put it in a separate
		//  function exported from this Extension DLL.  The Regular DLL
		//  that uses this Extension DLL should then explicitly call that
		//  function to initialize this Extension DLL.  Otherwise,
		//  the CDynLinkLibrary object will not be attached to the
		//  Regular DLL's resource chain, and serious problems will
		//  result.
 
		new CDynLinkLibrary(MyDLLProjectDLL);
	}
	else if (dwReason == DLL_PROCESS_DETACH)
	{
		// Terminate the library before destructors are called
		AfxTermExtensionModule(MyDLLProjectDLL);
	}
	return 1;   // ok
}

Also, your EXE should be set to use MFC in a dll, not statically linked.
GeneralRe: Message Map doesn't work in dynamically loaded dll Pin
Mark Salsbery13-Nov-06 8:46
Mark Salsbery13-Nov-06 8:46 
GeneralRe: Message Map doesn't work in dynamically loaded dll Pin
Stefan Rehling13-Nov-06 22:31
Stefan Rehling13-Nov-06 22:31 
QuestionafxOccMgr and pWndCtrl problems Pin
earlgraham13-Nov-06 6:36
earlgraham13-Nov-06 6:36 
QuestionMultiLanguage Engine Pin
dannygilbert313-Nov-06 6:11
dannygilbert313-Nov-06 6:11 
AnswerRe: MultiLanguage Engine Pin
toxcct13-Nov-06 6:19
toxcct13-Nov-06 6:19 
AnswerRe: MultiLanguage Engine Pin
ThatsAlok13-Nov-06 7:00
ThatsAlok13-Nov-06 7:00 
QuestionExtern and CLASS Pin
dannygilbert313-Nov-06 6:10
dannygilbert313-Nov-06 6:10 
AnswerRe: Extern and CLASS Pin
Mark Salsbery13-Nov-06 6:16
Mark Salsbery13-Nov-06 6:16 
AnswerRe: Extern and CLASS Pin
toxcct13-Nov-06 6:17
toxcct13-Nov-06 6:17 
AnswerRe: Extern and CLASS Pin
James R. Twine13-Nov-06 6:26
James R. Twine13-Nov-06 6:26 
AnswerRe: Extern and CLASS Pin
ThatsAlok13-Nov-06 7:00
ThatsAlok13-Nov-06 7:00 
Question2 CFileDialogs Pin
Desmo1613-Nov-06 6:07
Desmo1613-Nov-06 6:07 
AnswerRe: 2 CFileDialogs Pin
James R. Twine13-Nov-06 6:09
James R. Twine13-Nov-06 6:09 
AnswerRe: 2 CFileDialogs Pin
toxcct13-Nov-06 6:09
toxcct13-Nov-06 6:09 
GeneralRe: 2 CFileDialogs Pin
Desmo1613-Nov-06 6:36
Desmo1613-Nov-06 6:36 
GeneralRe: 2 CFileDialogs [modified] Pin
toxcct13-Nov-06 6:47
toxcct13-Nov-06 6:47 
GeneralRe: 2 CFileDialogs Pin
Desmo1613-Nov-06 6:54
Desmo1613-Nov-06 6:54 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.