TinyCAD installed on Windows 8, language set to English, locale is Dutch.
Any menu action that uses the file Open or 'Save As' dialog throws an 'Invalid argument encountered' exception. Same installation runs fine on other Windows 7 or Windows XP machine
Solution:
The file functions crash because they cannot find the resource strings for the dialog title. This probably has to do with the fact that the locale is not US or UK English. Adding the following strings to the String Table solves the problem:
IDS_STRING61440 61440 "OPEN"
IDS_STRING61440 61441 "SAVE AS"
IDS_STRING61440 61440 "."
Tested the solution on Windows 7 and Windows XP and it works there too.
Hi Cees -
This is very consistent with my unsuccessful search for a solution several years ago. I will add these to the string table and make a new release. Thanks very much for your solution.
Best regards,
Don
Hi Cees -
These resource numbers are already present in afxres.rc and are included in the TinyCAD String Table resource. Which source version of TinyCAD are you able to compile your fix with, and are you adding these resources to TinyCAD.rc2 or some other resource file? When I add them to TinyCAD.rc2, they cause the resource compiler in Visual Studio 2008 to generate an error saying that those resource numbers have already been used in afxres.rc and cannot be defined again. Are you using the Visual Studio solutions files, or have you modified your solution file (such as changing the default locale)?
Hi Don,
I indeed added the numbers to TinyCAD.rc2, and it compiles fine with me.
As far as I remember I did not have to change any setting at all to get
the the code compiled the first time I checked it out. And I certainly
used the original VS -solution. Of course the afxres.rc is not part of
your code and is added by VS. And I assume it selects the right one
based on your locale settings.
I included the .rc2 and the afxres.rc file that are used in my build so
you can check for yourself if there is any difference. I did see that
the afxres.rc has the section that includes all the resources is only
included if '_AFX_NO_APPMENU_RESOURCES' is not defined. This however is
(as far as I can tell from my buildlog) not the case on my system.
Best regards,
Cees
Just as another data point, I can make open/save etc work on Windows 8 by adding the following lines to Tinycad.rc
I am building revision 610 using the VS2010 compilers, and had no problems building in either Debug or Release after this change. I added the lines by editing the RC file as text. Right now I don't have VS2008 installed, but I could install it to test if you still have problems getting a build with the resources added.
Robin
FWIW, I'm getting this too.
Does anyone have working build available or should I compile it myself, like Robin has?
(I have VS2008 installed, so that might help..)
Love tinycad btw! :)
I compiled it myself. Works well. Thanks!
Here's the patch, if it helps. I had to comment out acase in the windows version detection code to compile on Win8.1 (VS2008).