Click here to Skip to main content
15,909,939 members
Home / Discussions / C / C++ / MFC
   

C / C++ / MFC

 
AnswerRe: CSpinButtonCtrl and WM_VSCROLL Pin
Mark Salsbery17-Sep-07 8:38
Mark Salsbery17-Sep-07 8:38 
GeneralRe: CSpinButtonCtrl and WM_VSCROLL Pin
Californian217-Sep-07 8:55
Californian217-Sep-07 8:55 
GeneralRe: CSpinButtonCtrl and WM_VSCROLL Pin
Mark Salsbery17-Sep-07 9:10
Mark Salsbery17-Sep-07 9:10 
QuestionVS2005 assertion when DoModal called from DLL Pin
Russell Gantman17-Sep-07 5:57
Russell Gantman17-Sep-07 5:57 
AnswerRe: VS2005 assertion when DoModal called from DLL Pin
Mark Salsbery17-Sep-07 8:48
Mark Salsbery17-Sep-07 8:48 
GeneralRe: VS2005 assertion when DoModal called from DLL Pin
Russell Gantman17-Sep-07 10:57
Russell Gantman17-Sep-07 10:57 
GeneralRe: VS2005 assertion when DoModal called from DLL Pin
Mark Salsbery17-Sep-07 13:07
Mark Salsbery17-Sep-07 13:07 
GeneralRe: VS2005 assertion when DoModal called from DLL Pin
Russell Gantman18-Sep-07 9:00
Russell Gantman18-Sep-07 9:00 
Mark Salsbery wrote:
DLLs are always linked dynamically, at runtime, so the same rules apply whether you use
early binding (ie an import library) or late binding (ie LoadLibrary()) to link an app to a DLL.


I am doing early binding.
Could my problem be that I do not have a class which is derived from CWinApp?
I have a normal C++ class (as an interface to my exe) which then displaysthe dialog...
Here are the class declarations

As I stated before, this worked without a problem in VS2003, it just when I went to VS2005, I saw this problem


Here are the definition for the classes in my DLL
This class is the interface between my application and my dialogs:

<br />
#ifdef _DLGPWENTRY_<br />
#define CLASSSTATE __declspec(dllexport)<br />
#else<br />
#define CLASSSTATE __declspec(dllimport)<br />
#endif<br />
<br />
class CLASSSTATE CPasswordPrompt<br />
{<br />
   public:<br />
      CPasswordPrompt();<br />
      bool showDialog( int &lDialogReturn );<br />
};<br />


The dialog class (which is contained in the same DLL as the above class) is defined as follows:

<br />
class CPasswordPromptDlg : public CDialog<br />
{<br />
   DECLARE_DYNAMIC(CPasswordPromptDlg)<br />
<br />
public:<br />
   CPasswordPromptDlg(CWnd* pParent = NULL);   // standard constructor<br />
   virtual ~CPasswordPromptDlg();<br />
<br />
// Dialog Data<br />
   enum { IDD = IDD_PWPROMPT };<br />
<br />
protected:<br />
   virtual void DoDataExchange(CDataExchange* pDX);    // DDX/DDV support<br />
<br />
   DECLARE_MESSAGE_MAP()<br />
};<br />


From my main app (exe) I instantiate a CPasswordPrompt class and call showDialog()

It is in CPasswordPrompt::showDialog() where I instantiate my dialog class and call the
DoModal() after a call to: AFX_MANAGE_STATE(AfxGetStaticModuleState())

This is done to abstract the GUI work from the rest of execution,
now I can change how my GUIs are drawn by replacing the DLL and my code does not change.

Thank you for your help.


I skate to where the puck is going to be, not where it is.
Wayne Gretzky

GeneralRe: VS2005 assertion when DoModal called from DLL Pin
Mark Salsbery18-Sep-07 9:34
Mark Salsbery18-Sep-07 9:34 
GeneralRe: VS2005 assertion when DoModal called from DLL Pin
Russell Gantman20-Sep-07 7:33
Russell Gantman20-Sep-07 7:33 
QuestionMigration of a VCPP program to Windows Vista Pin
kchatterjee17-Sep-07 5:04
kchatterjee17-Sep-07 5:04 
AnswerRe: Migration of a VCPP program to Windows Vista Pin
David Crow17-Sep-07 5:50
David Crow17-Sep-07 5:50 
GeneralRe: Migration of a VCPP program to Windows Vista Pin
jhwurmbach17-Sep-07 6:12
jhwurmbach17-Sep-07 6:12 
Questionchoosing Threads Pin
Gofur Halmurat17-Sep-07 4:35
Gofur Halmurat17-Sep-07 4:35 
AnswerRe: choosing Threads Pin
DevMentor.org17-Sep-07 4:38
DevMentor.org17-Sep-07 4:38 
GeneralRe: choosing Threads Pin
Gofur Halmurat17-Sep-07 6:02
Gofur Halmurat17-Sep-07 6:02 
GeneralRe: choosing Threads Pin
DevMentor.org17-Sep-07 6:33
DevMentor.org17-Sep-07 6:33 
AnswerRe: choosing Threads Pin
jhwurmbach17-Sep-07 4:39
jhwurmbach17-Sep-07 4:39 
AnswerRe: choosing Threads Pin
Nemanja Trifunovic17-Sep-07 4:45
Nemanja Trifunovic17-Sep-07 4:45 
AnswerRe: choosing Threads Pin
El Corazon17-Sep-07 6:30
El Corazon17-Sep-07 6:30 
QuestionWindows / Container like application Pin
Programm3r17-Sep-07 4:19
Programm3r17-Sep-07 4:19 
AnswerRe: Windows / Container like application Pin
Iain Clarke, Warrior Programmer17-Sep-07 4:28
Iain Clarke, Warrior Programmer17-Sep-07 4:28 
QuestionRe: Windows / Container like application Pin
Programm3r17-Sep-07 4:59
Programm3r17-Sep-07 4:59 
AnswerRe: Windows / Container like application Pin
Iain Clarke, Warrior Programmer17-Sep-07 5:15
Iain Clarke, Warrior Programmer17-Sep-07 5:15 
GeneralRe: Windows / Container like application Pin
Programm3r17-Sep-07 19:33
Programm3r17-Sep-07 19:33 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.