Click here to Skip to main content
15,916,463 members
Home / Discussions / C / C++ / MFC
   

C / C++ / MFC

 
AnswerRe: How to run these codes? Pin
David Crow11-Jun-03 4:30
David Crow11-Jun-03 4:30 
GeneralRe: How to run these codes? Pin
FlyingDancer11-Jun-03 13:52
FlyingDancer11-Jun-03 13:52 
GeneralRe: How to run these codes? Pin
David Crow12-Jun-03 2:35
David Crow12-Jun-03 2:35 
GeneralRe: How to run these codes? Pin
FlyingDancer12-Jun-03 3:08
FlyingDancer12-Jun-03 3:08 
GeneralRegistry problems Pin
rohit.dhamija11-Jun-03 3:42
rohit.dhamija11-Jun-03 3:42 
QuestionWhat is the XP Accessibility Wizard doing? Pin
mcgahanfl11-Jun-03 3:36
mcgahanfl11-Jun-03 3:36 
QuestionHow can I create and post a web page Pin
gordingin11-Jun-03 3:28
gordingin11-Jun-03 3:28 
Generalproblem using CDialog::Create, assert error Pin
Luis E. Cuadrado11-Jun-03 3:21
Luis E. Cuadrado11-Jun-03 3:21 
Hello everybody,
Here is my problem.
I'm trying to display a dialog and in the Create() function I'm getting an assert error. I dig up through the debugger and I found out where I'm getting the assert error is in AfxGetResourceHandle(). Here is my code:

int APIENTRY WinMain(HINSTANCE hInstance,
                     HINSTANCE hPrevInstance,
                     LPSTR     lpCmdLine,
                     int       nCmdShow)
{
 	// TODO: Place code here.
	CMainDlg *mainDlg = new CMainDlg(); //Base class is a CDialog
	BOOL bRet = mainDlg->Create(IDD_MAIN_DIALOG, NULL); //-->I'm getting the assertion error here!
	if (bRet != 0)
	{
		mainDlg->ShowWindow(SW_SHOW);
	}
	else if(bRet == 0)
	{
		AfxMessageBox("Error Creating Dialog");
	}

	return 0;
}

As you noticed, all I'm trying to do is to display a dialog. Is there anything that I have to set in advance before I create the dialog and display it? Any answer is more than welcome.

Best regards,

Luis E. Cuadrado
Blush | :O )
GeneralRe: problem using CDialog::Create, assert error Pin
Tim Smith11-Jun-03 3:36
Tim Smith11-Jun-03 3:36 
GeneralRe: problem using CDialog::Create, assert error Pin
David Crow11-Jun-03 3:44
David Crow11-Jun-03 3:44 
GeneralRe: problem using CDialog::Create, assert error Pin
Luis E. Cuadrado11-Jun-03 4:13
Luis E. Cuadrado11-Jun-03 4:13 
GeneralRe: problem using CDialog::Create, assert error Pin
David Crow11-Jun-03 4:33
David Crow11-Jun-03 4:33 
GeneralRe: problem using CDialog::Create, assert error Pin
Luis E. Cuadrado11-Jun-03 4:56
Luis E. Cuadrado11-Jun-03 4:56 
GeneralRe: problem using CDialog::Create, assert error Pin
Ryan Binns11-Jun-03 5:03
Ryan Binns11-Jun-03 5:03 
GeneralSHChangeNotifyRegister Questions!!! Pin
zmnie11-Jun-03 2:58
zmnie11-Jun-03 2:58 
GeneralRe: SHChangeNotifyRegister Questions!!! Pin
David Crow11-Jun-03 3:34
David Crow11-Jun-03 3:34 
GeneralRe: SHChangeNotifyRegister Questions!!! Pin
zmnie11-Jun-03 4:30
zmnie11-Jun-03 4:30 
GeneralRe: SHChangeNotifyRegister Questions!!! Pin
David Crow11-Jun-03 4:42
David Crow11-Jun-03 4:42 
GeneralRe: SHChangeNotifyRegister Questions!!! Pin
zmnie11-Jun-03 4:48
zmnie11-Jun-03 4:48 
GeneralRe: SHChangeNotifyRegister Questions!!! Pin
zmnie11-Jun-03 4:53
zmnie11-Jun-03 4:53 
GeneralRe: SHChangeNotifyRegister Questions!!! Pin
David Crow11-Jun-03 5:07
David Crow11-Jun-03 5:07 
GeneralRe: SHChangeNotifyRegister Questions!!! Pin
zmnie11-Jun-03 5:28
zmnie11-Jun-03 5:28 
GeneralParser help Pin
Anonymous11-Jun-03 2:57
Anonymous11-Jun-03 2:57 
Questionhow to add icon to system imagelist? Pin
zmnie11-Jun-03 2:51
zmnie11-Jun-03 2:51 
GeneralI don't want MAK file Pin
harinath11-Jun-03 2:12
professionalharinath11-Jun-03 2:12 

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.