Accelerators not working in MFC dll
-
I'm building a simple editor in a CFrameWnd using a CRichEditCtrl for the text. As a stand-alone application everything works. When I put the same frame code into a regular DLL, most things still work, but all custom accelerators don't function (things like Ctrl-V, Ctrl-C, etc. which are handled by the CRichEditCtrl do). I've been able to recreate this same problem with the CMainFrame code generated by the Visual Studio Wizard. Does anyone have any suggestions?
NciTom
-
I'm building a simple editor in a CFrameWnd using a CRichEditCtrl for the text. As a stand-alone application everything works. When I put the same frame code into a regular DLL, most things still work, but all custom accelerators don't function (things like Ctrl-V, Ctrl-C, etc. which are handled by the CRichEditCtrl do). I've been able to recreate this same problem with the CMainFrame code generated by the Visual Studio Wizard. Does anyone have any suggestions?
NciTom
Hi, May be the following link will help you. http://social.msdn.microsoft.com/Forums/en-US/vcmfcatl/thread/8bbdbd37-8034-4489-bd86-2351f0febb37 Cheers
-
I'm building a simple editor in a CFrameWnd using a CRichEditCtrl for the text. As a stand-alone application everything works. When I put the same frame code into a regular DLL, most things still work, but all custom accelerators don't function (things like Ctrl-V, Ctrl-C, etc. which are handled by the CRichEditCtrl do). I've been able to recreate this same problem with the CMainFrame code generated by the Visual Studio Wizard. Does anyone have any suggestions?
NciTom
-
Hi, May be the following link will help you. http://social.msdn.microsoft.com/Forums/en-US/vcmfcatl/thread/8bbdbd37-8034-4489-bd86-2351f0febb37 Cheers
-
Patup, Thanks, Easier said than done. :( I took the trivial mainfrm code from a wizard generated single document app and massaged it into an extension DLL. I can get it to compile, but it traps during the load of the MainFrm window. Does anyone know of an example of an extension DLL that loads a CFrameWnd?
-
Patup, Thanks, Easier said than done. :( I took the trivial mainfrm code from a wizard generated single document app and massaged it into an extension DLL. I can get it to compile, but it traps during the load of the MainFrm window. Does anyone know of an example of an extension DLL that loads a CFrameWnd?
ncitom wrote:
I took the trivial mainfrm code from a wizard generated single document app and massaged it into an extension DLL.
Based on your brief description... it sounds like something related to either activation context[^] or the MFC module state[^]. I would be willing to have a look at your test case if you could put it up somewhere where I could download. However I offer no guarantees. :) Best Wishes, -David Delaune
-
ncitom wrote:
I took the trivial mainfrm code from a wizard generated single document app and massaged it into an extension DLL.
Based on your brief description... it sounds like something related to either activation context[^] or the MFC module state[^]. I would be willing to have a look at your test case if you could put it up somewhere where I could download. However I offer no guarantees. :) Best Wishes, -David Delaune
David, I must have put a typo into my program somewhere. I started over and successfully made an extension dll that works (albeit just a trivial version of my project). It also seemed to solve the accelerator problem. Hopefully that's the answer to quite a few issues I've seen with MFC in a DLL. :) Thanks, Tom Wanat
-
David, I must have put a typo into my program somewhere. I started over and successfully made an extension dll that works (albeit just a trivial version of my project). It also seemed to solve the accelerator problem. Hopefully that's the answer to quite a few issues I've seen with MFC in a DLL. :) Thanks, Tom Wanat
Tom, That's great to hear. Feel free to come back if you have any other problems. It's amazing that after you joined the codeproject that you were able to remain silent for 8 years, 8 months. Hopefully we will hear back from you before another 8 years pass. :) Best Wishes, -David Delaune
-
Tom, That's great to hear. Feel free to come back if you have any other problems. It's amazing that after you joined the codeproject that you were able to remain silent for 8 years, 8 months. Hopefully we will hear back from you before another 8 years pass. :) Best Wishes, -David Delaune
David, I have visited codeproject many times during that period. I think of it as one of the most reliable sources of information. I don't usually ask questions until I've exhausted other avenues, and I don't feel that confident to offer my experience. Thanks for noticing, Tom Wanat