Click here to Skip to main content
15,907,905 members
Home / Discussions / C / C++ / MFC
   

C / C++ / MFC

 
GeneralOwner draw CTreeCtrl Pin
Tran Hoang Chuong14-Nov-00 23:22
Tran Hoang Chuong14-Nov-00 23:22 
GeneralRe: Owner draw CTreeCtrl Pin
VitSoft15-Nov-00 1:33
VitSoft15-Nov-00 1:33 
GeneralRe: Owner draw CTreeCtrl Pin
SudhaShriram16-Nov-00 23:56
SudhaShriram16-Nov-00 23:56 
GeneralDrag and drop a text Pin
Tran Hoang Chuong14-Nov-00 23:14
Tran Hoang Chuong14-Nov-00 23:14 
GeneralAltering Explorer's Save As dialog box. Pin
14-Nov-00 22:05
suss14-Nov-00 22:05 
GeneralMicrosoft platform SDK Pin
John Zhou14-Nov-00 8:02
John Zhou14-Nov-00 8:02 
GeneralRe: Microsoft platform SDK Pin
Christian Graus15-Nov-00 14:49
protectorChristian Graus15-Nov-00 14:49 
GeneralStrange problem with an MFC application Pin
Arvind Pai14-Nov-00 7:58
Arvind Pai14-Nov-00 7:58 
The following is a summary of the problem we are having with our application:

The application is a SDI MFC application with a single view. There are quite a few dialogs brought up by the main view.

When we try to bring up a dialog, the application returns a Debug Assertion Failure. The code used to bring up the dialog is:

CPayorBenefitDlg dlgPayorBenft;
int nDlgRetState;
//subsequent lines of code

If the above block of code is executed in the Debug mode, we can observe that immediately on execution of the 1st line (where we instantiate the dialog object) the this pointer (the pointer to the view object) changes. This event causes the program to assert further down the line since in the subsequent lines of code we access the view's data.

However, if we change the above code as:

int nDlgRetState;
CPayorBenefitDlg dlgPayorBenft;
//subsequent lines of code

Then the dialog comes up fine but the program raises a General Protection Fault on closing the dialog. In this case, the this pointer does not change when the dialog is instantiated.

Finally, if we change the above code as:

int nDlgRetState;
char chArray[100];
CPayorBenefitDlg dlgPayorBenft;
//subsequent lines of code

Then the program works perfectly fine!!

What could be the reason for such an inconsistent behaviour? And any suggestions as to how we can fix the problem??

Thanks,
Arvind

GeneralRe: Strange problem with an MFC application Pin
Erik Funkenbusch14-Nov-00 10:21
Erik Funkenbusch14-Nov-00 10:21 
GeneralRe: Strange problem with an MFC application Pin
28-Nov-00 13:35
suss28-Nov-00 13:35 
GeneralKeyboard dialog Pin
Roger14-Nov-00 4:33
Roger14-Nov-00 4:33 
GeneralRe: Keyboard dialog Pin
14-Nov-00 5:34
suss14-Nov-00 5:34 
GeneralRe: Keyboard dialog Pin
Roger14-Nov-00 8:07
Roger14-Nov-00 8:07 
GeneralRe: Keyboard dialog Pin
Erik Funkenbusch14-Nov-00 10:25
Erik Funkenbusch14-Nov-00 10:25 
GeneralRe: Keyboard dialog Pin
SudhaShriram17-Nov-00 0:41
SudhaShriram17-Nov-00 0:41 
GeneralListCtrl w/ list view style Pin
Thomas Freudenberg14-Nov-00 2:54
Thomas Freudenberg14-Nov-00 2:54 
GeneralCopying vector arrays problem Pin
14-Nov-00 1:08
suss14-Nov-00 1:08 
GeneralRe: Copying vector arrays problem Pin
Erik Funkenbusch14-Nov-00 10:28
Erik Funkenbusch14-Nov-00 10:28 
GeneraliThis's gonna kill the server!! Pin
Baling13-Nov-00 23:39
Baling13-Nov-00 23:39 
GeneralRe: iThis's gonna kill the server!! Pin
14-Nov-00 4:22
suss14-Nov-00 4:22 
GeneralRe: iThis's gonna kill the server!! Pin
David Cunningham14-Nov-00 8:57
cofounderDavid Cunningham14-Nov-00 8:57 
GeneralRe: iThis's gonna kill the server!! Pin
21-Nov-00 3:24
suss21-Nov-00 3:24 
GeneralNTML/Proxy/WinInet/WinSock Pin
13-Nov-00 20:42
suss13-Nov-00 20:42 
Generalnot really a C++ question Pin
13-Nov-00 15:33
suss13-Nov-00 15:33 
GeneralRe: not really a C++ question Pin
14-Nov-00 5:36
suss14-Nov-00 5:36 

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.