Getting error 1813: ERROR_RESOURCE_TYPE_NOT_FOUND, don't know why
Posted on 2004-08-19
I've got a .NET 2003 solution where part of it is a large unmanaged C++ class (not MFC) that needs to request user input. I created the dialog (IDD_DIALOG1) using the resource editor, then #include'd the resource.h file in the class file. Both of the following tries at displaying the dialog box produces the 1813 error:
iRet = DialogBox(NULL, TEXT("IDD_DIALOG1"), NULL, (DLGPROC)Calculate::ToldDlgProc);
iRet = DialogBox(NULL, MAKEINTRESOURCE(IDD_DIALOG1), NULL, (DLGPROC)Calculate::ToldDlgProc);
When I hover the mouse over IDD_DIALOG1 in the call to MAKEINTRESOURCE, the Intellisense tooltip displays "#define IDD_DIALOG1 103", so it seems to know at least what the ID is. Following the DialogBox call, iRet is set to -1.
I've been trying to solve this for a couple days, and it's taking way too long. It would sure be nice if it was as easy as displaying a MessageBox. It probably isn't that difficult, but the urgency of this problem is worth 500 points to me. Am I somehow missing a link between the class and the resource?
Thanks in advance for any help on this.