Tabbing in a dialog stored in a DLL
-
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
-
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
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
-
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
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
-
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
Hmmm... Are your DLLs build as 'MFC extensions'? Tomasz Sowinski -- http://www.shooltz.com
-
Hmmm... Are your DLLs build as 'MFC extensions'? Tomasz Sowinski -- http://www.shooltz.com
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
-
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
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