Click here to Skip to main content
15,902,830 members
Home / Discussions / C / C++ / MFC
   

C / C++ / MFC

 
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 
GeneralGet back to 'parent' (hook & dll) Pin
nne-vitamin18-Jan-05 14:57
nne-vitamin18-Jan-05 14:57 
Generalestimates for bejeweled game Pin
bigdeeoo718-Jan-05 13:21
bigdeeoo718-Jan-05 13:21 
GeneralRe: estimates for bejeweled game Pin
ThatsAlok18-Jan-05 17:28
ThatsAlok18-Jan-05 17:28 
Generalcalling member of parent from popup window Pin
Close Network18-Jan-05 13:00
Close Network18-Jan-05 13:00 
GeneralRe: calling member of parent from popup window Pin
ThatsAlok18-Jan-05 18:05
ThatsAlok18-Jan-05 18:05 
GeneralEnumDesktopWindows Pin
Max Santos18-Jan-05 12:54
Max Santos18-Jan-05 12:54 
GeneralRe: EnumDesktopWindows Pin
ThatsAlok18-Jan-05 17:34
ThatsAlok18-Jan-05 17:34 
GeneralFind the focused item in ListCtrl Pin
Cyrus Dang18-Jan-05 10:18
Cyrus Dang18-Jan-05 10:18 
GeneralRe: Find the focused item in ListCtrl Pin
Tom Wright18-Jan-05 10:26
Tom Wright18-Jan-05 10:26 
GeneralRe: Find the focused item in ListCtrl Pin
Cyrus Dang18-Jan-05 10:37
Cyrus Dang18-Jan-05 10:37 
GeneralRe: Find the focused item in ListCtrl Pin
Serge Krynine18-Jan-05 12:38
Serge Krynine18-Jan-05 12:38 
GeneralRe: Find the focused item in ListCtrl Pin
Cyrus Dang18-Jan-05 12:43
Cyrus Dang18-Jan-05 12:43 

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.