I am using VS 2015 C++. I have a variety of programs that have picked up a date by reading three separate fields.
I now have a new program that wants to read a date and I have set up a resource files using a DATETIMEPICK_CLASS CONTROL.
The problem I have is when I compile and run the program (it complies and links) and select that DIALOG nothing appears at all.
Any ideas what might be wrong?
case WM_COMMAND:
if (LOWORD(wParam) == IDOK || LOWORD(wParam) == IDCANCEL)
{
if (LOWORD(wParam) == IDOK)
{
ReadLength(hDlg);
}
EndDialog(hDlg, LOWORD(wParam));
return (INT_PTR)TRUE;
}
break;
}
return (INT_PTR)FALSE;
}
All this has worked with other DIALOGs that just read data (using fields defined with EDITTEXT)
I can't see anything obviously wrong. When I select the appropriate menu item, nothing happens. The DIALOG simply does not show and some simple trace shows that it simply doesn't get activated.
So I added an err = in front pf the call and it returned -1 (very helpful).
So I added a call to a function called ErrorExit that does a GetErrorExit().
The result of that was a dialog box that said:
Testing for error message failed with error 1814: The specified resource name cannot be found in the image file.
It would seem that although you can define it and the code will compile and apparently execute, the Date Picker doesn't actually do anything.
But I've seen this function in other applications. If Visual Studio 2015 doesn't permit its use, what other compiler is there that can use it?
It would look like I'm back to selecting the date fields individually, or am I?
So I added a call to a function called ErrorExit that does a GetErrorExit().Testing for error message failed with error 1814: The specified resource name cannot be found in the image file.
Where and how is IDD_DIALOGNEW defined?
Can you upload the files somewhere so that I can run it.