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. Tabbing in a dialog stored in a DLL

Tabbing in a dialog stored in a DLL

Scheduled Pinned Locked Moved C / C++ / MFC
helpc++question
6 Posts 2 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.
  • S Offline
    S Offline
    Steve The Plant
    wrote on last edited by
    #1

    Hey! I have a dialog box stored in a DLL. From my parent app, I load the DLL and present the dialog to the user. Problem is, tabbing doesn't seem to work. (I don't even have that the little dotted rectangle to show which control has focus). I've read somewhere that this is a known problem with MFC. Is this true? Is there anything I can do to fix it? Steve The Plant

    T 1 Reply Last reply
    0
    • S Steve The Plant

      Hey! I have a dialog box stored in a DLL. From my parent app, I load the DLL and present the dialog to the user. Problem is, tabbing doesn't seem to work. (I don't even have that the little dotted rectangle to show which control has focus). I've read somewhere that this is a known problem with MFC. Is this true? Is there anything I can do to fix it? Steve The Plant

      T Offline
      T Offline
      Tomasz Sowinski
      wrote on last edited by
      #2

      Hmmmm... I worked on multiple-dll projects with many dialogs and never encountered this problem. Can you check your controls with Spy++ - do they have WS_TABSTOP style set? Tomasz Sowinski -- http://www.shooltz.com

      S 1 Reply Last reply
      0
      • T Tomasz Sowinski

        Hmmmm... I worked on multiple-dll projects with many dialogs and never encountered this problem. Can you check your controls with Spy++ - do they have WS_TABSTOP style set? Tomasz Sowinski -- http://www.shooltz.com

        S Offline
        S Offline
        Steve The Plant
        wrote on last edited by
        #3

        Spy++ says that they do. All the controls are set to their default settings (ie I didn't change them), so that means they should all have WS_TABSTOP set. Steve The Plant

        T 1 Reply Last reply
        0
        • S Steve The Plant

          Spy++ says that they do. All the controls are set to their default settings (ie I didn't change them), so that means they should all have WS_TABSTOP set. Steve The Plant

          T Offline
          T Offline
          Tomasz Sowinski
          wrote on last edited by
          #4

          Hmmm... Are your DLLs build as 'MFC extensions'? Tomasz Sowinski -- http://www.shooltz.com

          S 1 Reply Last reply
          0
          • T Tomasz Sowinski

            Hmmm... Are your DLLs build as 'MFC extensions'? Tomasz Sowinski -- http://www.shooltz.com

            S Offline
            S Offline
            Steve The Plant
            wrote on last edited by
            #5

            I used the AppWizard to Generate a "Regular MFC Dll using shared MFC DLL". In the DLL, I have an exported function that the client app uses. I have the exported function, I initialize a dialog like so: { AFX_MANAGE_STATE(AfxGetStaticModuleState()); m_oMainDialog.Create(IDD_MAINDIALOG); m_oMainDialog.ShowWindow(SW_SHOW); dwLastErr = ::GetLastError(); } This is the dialog where tabbing doesn't work. The dialog needs to be modeless, so that it doesn't interfere with the operation of the client app. Steve The Plant

            T 1 Reply Last reply
            0
            • S Steve The Plant

              I used the AppWizard to Generate a "Regular MFC Dll using shared MFC DLL". In the DLL, I have an exported function that the client app uses. I have the exported function, I initialize a dialog like so: { AFX_MANAGE_STATE(AfxGetStaticModuleState()); m_oMainDialog.Create(IDD_MAINDIALOG); m_oMainDialog.ShowWindow(SW_SHOW); dwLastErr = ::GetLastError(); } This is the dialog where tabbing doesn't work. The dialog needs to be modeless, so that it doesn't interfere with the operation of the client app. Steve The Plant

              T Offline
              T Offline
              Tomasz Sowinski
              wrote on last edited by
              #6

              From VC++ help: Regular DLLs must have a CWinApp-derived class and a single object of that application class, as does an MFC application. Unlike the CWinApp object of an application, the CWinApp object of the DLL does not have a main message pump. [...] If the DLL opens modeless dialog boxes or has a main frame window of its own, the application's main message pump must call a routine exported by the DLL, which in turn calls the CWinApp::PreTranslateMessage member function of the DLL's application object. This should clear things a little bit. Tomasz Sowinski -- http://www.shooltz.com

              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