Thanks. Things went pretty well... though, I'm getting more trouble now...


The thing I'm trying to do is... well, I have a dialog (defined in my resource script, resource.rc), and I'm trying to call or "bring up" that dialog with DialogBox(). The thing is, it always return -1 (error), and the dialog never shows up. Now I don't know what part I'm doing wrong, but can you please help me with this? I've tried asking the folks at #winprog on EFNet, but they couldn't help much with this. I've also doubled checked at MSDN and my call to DialogBox seems correct. Here's what I have:


Code:
 
	int ret = DialogBox(hmod, MAKEINTRESOURCE(IDD_ABOUT), NULL, AboutDlgProc2);
	if(ret == -1) {
		MessageBox(mWnd, "Dialog failed!", "Error", MB_OK | MB_ICONINFORMATION);
	}


It always shows "Dialog failed!". hmod is a global variable that points to hinstDLL (that is passed to DllMain). IDD_ABOUT is some integer (I tried different ones), and AboutDlgProc2 is the dialog's message handler. I don't really see what the problem is....