Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • World
  • Users
  • Groups
Skins
  • Light
  • Cerulean
  • Cosmo
  • Flatly
  • Journal
  • Litera
  • Lumen
  • Lux
  • Materia
  • Minty
  • Morph
  • Pulse
  • Sandstone
  • Simplex
  • Sketchy
  • Spacelab
  • United
  • Yeti
  • Zephyr
  • Dark
  • Cyborg
  • Darkly
  • Quartz
  • Slate
  • Solar
  • Superhero
  • Vapor

  • Default (No Skin)
  • No Skin
Collapse
Code Project
  1. Home
  2. General Programming
  3. C / C++ / MFC
  4. Accelerators not working in MFC dll

Accelerators not working in MFC dll

Scheduled Pinned Locked Moved C / C++ / MFC
csharpc++visual-studiohelpquestion
9 Posts 4 Posters 0 Views 1 Watching
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • N Offline
    N Offline
    ncitom
    wrote on last edited by
    #1

    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

    S P 2 Replies Last reply
    0
    • N 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

      S Offline
      S Offline
      Satheesh1546
      wrote on last edited by
      #2

      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

      N 1 Reply Last reply
      0
      • N 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

        P Offline
        P Offline
        patup9
        wrote on last edited by
        #3

        Try to change the regular dll to MFC extension dll.

        N 1 Reply Last reply
        0
        • S Satheesh1546

          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

          N Offline
          N Offline
          ncitom
          wrote on last edited by
          #4

          Thanks Satheesh, Unfortunately the link you suggest is one that I started in MSDN. Since it didn't get resolved there, I tried this forum.

          1 Reply Last reply
          0
          • P patup9

            Try to change the regular dll to MFC extension dll.

            N Offline
            N Offline
            ncitom
            wrote on last edited by
            #5

            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?

            L 1 Reply Last reply
            0
            • N ncitom

              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?

              L Offline
              L Offline
              Lost User
              wrote on last edited by
              #6

              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

              N 1 Reply Last reply
              0
              • L Lost User

                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

                N Offline
                N Offline
                ncitom
                wrote on last edited by
                #7

                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

                L 1 Reply Last reply
                0
                • N ncitom

                  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

                  L Offline
                  L Offline
                  Lost User
                  wrote on last edited by
                  #8

                  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

                  N 1 Reply Last reply
                  0
                  • L Lost User

                    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

                    N Offline
                    N Offline
                    ncitom
                    wrote on last edited by
                    #9

                    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

                    1 Reply Last reply
                    0
                    Reply
                    • Reply as topic
                    Log in to reply
                    • Oldest to Newest
                    • Newest to Oldest
                    • Most Votes


                    • Login

                    • Don't have an account? Register

                    • Login or register to search.
                    • First post
                      Last post
                    0
                    • Categories
                    • Recent
                    • Tags
                    • Popular
                    • World
                    • Users
                    • Groups