Maurilio Viana wrote:Antonio,
I renamed the resource and don't worked
If I add or delete a resource into rc file it work fine.
To avoid app exiting I place 'activate dialog' inside a try/end...
Do you have any naming rule that I can follow to avoid this type of error?
Regards,
Maurilio
Hi Maurilio,
The subject issue is a pain in the butt indeed.
I have come into a serious straggling with FWH, dealing with the Error 3, cannot create dialog box, and here is how I finally managed to get it going...
1. The name of the resource, even if correct, does not always work,
although with Workshop there is no error.
2. The more important thing is to define these in the beginning of your MAIN prg file, because most of the time, dialogs cannot be created because their respective controls have not been registered. For example, if you use a TWBROWSE control in a dialog, it is almost sure that it will not work, unless you define each control:
Here's a copy of what I register in my main prg. Just below the local, private functions:
TWindow():Register()
TWBrowse():Register()
TBitmap():Register()
TFolder():Register()
TTabs():Register()
TDialog():Register()
TMeter():Register()
TMetafile():Register()
TComboBox():Register()
More about the resource name...
Unfortunatelly, there is no rule that I have come up with...
It seems that Windows does not "like" some names, although there is nothing wrong with the names, and most important, they worked fine in the 16-bit environment....
So, if a dialog I use (from resource, in the stand-alone exe file), does not work, the next thing I do is to add the letter "Z", or "Q" or something like that infront of the resource's name, and retry running the program.
Important: The same thing (with names) happens with other kinds of resource, especially with the bitmaps... Another pain in the butt...
You can try the same approach described above (add an extra character infront of the resource's name.
I hope that this helped you...
Kind regards
Evans