Thanks for the tip! I Googled around a bit and found this article:
http://www.relisoft.com/win32/windlg.html
Then modified the config() (and added ErrorString()) and now the code looks like this:
char* ErrorString(DWORD err,char* error){
FormatMessage(FORMAT_MESSAGE_FROM_SYSTEM, NULL, err, 0, error, 255, NULL);
return error;
}
void config() {
HWND hDialog = NULL;
hDialog = CreateDialog
(
plugin.hDllInstance,
MAKEINTRESOURCE (IDD_CONFIG),
plugin.hwndParent,
ConfigProc
);
if(!hDialog){
char error[255];
MessageBox(NULL, ErrorString(GetLastError(),error), "Error!", MB_OK | MB_ICONEXCLAMATION);
LocalFree(error);
}
}
Then I got the error message - it was "The specified image file did not contain a resource section". The error message at the MSDN refrence: ERROR_RESOURCE_DATA_NOT_FOUND 1812