Click here to Skip to main content
15,917,565 members
Home / Discussions / C / C++ / MFC
   

C / C++ / MFC

 
GeneralRe: General C++ question on constructors Pin
Emilio Garavaglia18-Jan-05 21:56
Emilio Garavaglia18-Jan-05 21:56 
GeneralRe: General C++ question on constructors Pin
markkuk19-Jan-05 2:02
markkuk19-Jan-05 2:02 
GeneralRe: General C++ question on constructors Pin
Mike Dimmick19-Jan-05 2:47
Mike Dimmick19-Jan-05 2:47 
QuestionGet FileName of a file if know position ?? Pin
Le Hong Anh18-Jan-05 19:33
Le Hong Anh18-Jan-05 19:33 
QuestionHow to integrate background color with button control Pin
phijophlip18-Jan-05 19:23
phijophlip18-Jan-05 19:23 
AnswerRe: How to integrate background color with button control Pin
Aamir Butt18-Jan-05 20:26
Aamir Butt18-Jan-05 20:26 
AnswerRe: How to integrate background color with button control Pin
Aamir Butt18-Jan-05 20:49
Aamir Butt18-Jan-05 20:49 
GeneralAutomated press and release of keys in Keyboard and GetKeyState of keyboard Pin
vidhyas18-Jan-05 19:00
vidhyas18-Jan-05 19:00 
Generalserial numer of the CD Pin
includeh1018-Jan-05 18:40
includeh1018-Jan-05 18:40 
GeneralRe: serial numer of the CD Pin
Dudi Avramov20-Jan-05 0:35
Dudi Avramov20-Jan-05 0:35 
QuestionHow can i change the background color of a button control in vc++ Pin
phijophlip18-Jan-05 17:24
phijophlip18-Jan-05 17:24 
AnswerRe: How can i change the background color of a button control in vc++ Pin
Selvam R18-Jan-05 18:09
professionalSelvam R18-Jan-05 18:09 
GeneralRe: How can i change the background color of a button control in vc++ Pin
ThatsAlok18-Jan-05 18:26
ThatsAlok18-Jan-05 18:26 
AnswerRe: How can i change the background color of a button control in vc++ Pin
ThatsAlok18-Jan-05 18:10
ThatsAlok18-Jan-05 18:10 
GeneralRe: How can i change the background color of a button control in vc++ Pin
Selvam R18-Jan-05 22:30
professionalSelvam R18-Jan-05 22:30 
Questionwhat is the use of this pointer ? Pin
phijophlip18-Jan-05 17:22
phijophlip18-Jan-05 17:22 
AnswerRe: what is the use of this pointer ? Pin
Selvam R18-Jan-05 18:08
professionalSelvam R18-Jan-05 18:08 
AnswerRe: what is the use of this pointer ? Pin
David Crow19-Jan-05 4:23
David Crow19-Jan-05 4:23 
GeneralGrafMenu from Programming Windows Pin
LiYS18-Jan-05 17:16
LiYS18-Jan-05 17:16 
GeneralCDialog Derived run-time error Pin
LighthouseJ18-Jan-05 17:09
LighthouseJ18-Jan-05 17:09 
I have a dialog with the ID IDD_RESULTSDLG, I derived a class called CResultsDlg from CDialog that calls that dialog. It's a simple dialog, has 8 static text areas and an okay button. I have overloaded the constructor to pass 3 integers and a float. I run it by issuing these commands:

CResultsDlg * myResults;
myResults = new CResultsDlg(offsetWidth, myBitmap->getHeight() * myBitmap->getWidth(), myOutput->getBytesWritten(), compression);
myResults->DoModal();

The constructor takes the arguments and simply sets 4 out of 8 static texts to those numbers.

It compiles fine, but I get a runtime error box:
Debub Assertion Failed!
(path to executable...)
File: dlgcore.cpp
Line: 491

For information on how your program can cause an assertion
failure, see the Visual C++ documentation on asserts.
(Press Retry to debug the application)

I press retry and it brings up another window:
Unhandled exception at 0x7c205d2c (mfc70d.dll) in 489gui.exe: User breakpoint.

I can press continue and it continues running but doesn't show that dialog or I can break it.
It also brings up the file dlgcore.cpp and puts the cursor at dlgcore.cpp, line 491:

ASSERT(m_lpszTemplateName != NULL || m_hDialogTemplate != NULL || m_lpDialogTemplate != NULL);


In debug, when it reaches that line, VS tells me all three are NULL. Did I miss a step when I'm trying to do this? Can I not overload the constructor or am I doing it wrong? I can call the dialog using the default constructor and it comes up without any error. Any help would be greatly appreciated.
GeneralRe: CDialog Derived run-time error Pin
Serge Krynine18-Jan-05 18:27
Serge Krynine18-Jan-05 18:27 
GeneralRe: CDialog Derived run-time error Pin
LighthouseJ19-Jan-05 3:12
LighthouseJ19-Jan-05 3:12 
GeneralRe: CDialog Derived run-time error Pin
Blake Miller19-Jan-05 5:39
Blake Miller19-Jan-05 5:39 
GeneralMPEG decode Pin
rushing18-Jan-05 16:37
rushing18-Jan-05 16:37 
GeneralRe: MPEG decode Pin
vaibhavbvp3-Feb-13 18:15
vaibhavbvp3-Feb-13 18:15 

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.