|
From: Tariq on 10 Feb 2005 09:01 I have an MFC based dll that only exports some classes. I need to ask where should i place this macro (AFX_MANAGE_STATE) in the class, do i really need it? Tariq
From: Ajay Kalra on 10 Feb 2005 09:58 You need this if your dll is a Regular DLL. If you have a MFC Extension DLL, you should not use this Macro. In a regular DLL this really has nothing to do with exporting but rather with changing the state to the one used in the function. For example, resources used in the function may want to refer to application or for the dll itself. You will then change the state using AFX_MANAGE_STATE. State also has relevance when you call methods like AfxGetMainWnd. In a regular DLL, if your method wants to access main frame window, you will need to use AFX_MANAGE_STATE(AfxGetAppModuleState()). ---------- Ajay Kalra ajaykalra(a)yahoo.com Tariq wrote: > I have an MFC based dll that only exports some classes. I need to ask where > should i place this macro (AFX_MANAGE_STATE) in the class, do i really need > it? > > Tariq
|
Pages: 1 Prev: the number of controls is dynamic Next: XMl creation using msxml 3.0 |