Intel® Fortran Compiler
Build applications that can scale for the future with optimized code designed for Intel® Xeon® and compatible processors.
Announcements
FPGA community forums and blogs on community.intel.com are migrating to the new Altera Community and are read-only. For urgent support needs during this transition, please visit the FPGA Design Resources page or contact an Altera Authorized Distributor.

Duplicate Values in resources.fd ?

jackosullivan
Beginner
1,320 Views
I've discovered duplicate values in the "resources.fd" for one of my projects. Several of the 250+ symbols have the same values:
IDC_STATICvo4 1102
IDC_STATICv41 1102
IDValveAdjusterCANCEL 1106
IDC_STATICv43 1106
IDC_STATICs1 1107
IDC_STATICv44 1107
IDC_BUTTON1 1233
IDC_CHECK102 1233
NoConvergeOK 1248
IDNoConvergeOK 1248
NoConvergeCANCEL 1249
IDNoConvergeCANCEL 1249

But somehow this does not seem right to me. Especially since the resource.h upon which the .fd is based seems very intent upon keeping track of the next values for the various objects.

Is my concern unfounded, or is there something I should do to remake my various controls?

Thanksand God bless!
Jack

0 Kudos
5 Replies
Paul_Curtis
Valued Contributor I
1,320 Views

I've noticed this also. It doesn't seem to matter if the same control ids are used in different dialogs so long as there is no ambiguity as to which control is being referenced; it is the combination of the control id and the dialog which must be unique. There doesn't seem to be any means of controlling how id values are assigned by the resource editor. Note also that when controls are deleted from a dialog, their ids are retained by the resource editor and you have to review all your controls from time to time and manually remove the ids which are unreferenced.
0 Kudos
jimdempseyatthecove
Honored Contributor III
1,320 Views

I too have noticed this. Although unlike in Paul's case, I've had multiple ID's within the same dialog generate the same code number. Hand editing of the .FD file would correct this.

Jim Dempsey
0 Kudos
Steven_L_Intel1
Employee
1,320 Views
The resource editor looks in this section of resource.h

[cpp]// Next default values for new objects
// 
#ifdef APSTUDIO_INVOKED
#ifndef APSTUDIO_READONLY_SYMBOLS
#define _APS_NEXT_RESOURCE_VALUE        102
#define _APS_NEXT_COMMAND_VALUE         30003
#define _APS_NEXT_CONTROL_VALUE         1022
#define _APS_NEXT_SYMED_VALUE           101
#endif
#endif[/cpp]
to decide what the next values should be. I have seen the editor get confused at times. You can edit these values to get it back in synch.
0 Kudos
jackosullivan
Beginner
1,320 Views
Now I'm a bit more confused (as if that were possible).

I can understand Paul's removing IDs that are now unreferenced because of their controls' being deleted, and I can understand Steve's adjusting of the resource.h "next values" to get everything caught up. But Jim's "hand editing" of duplicate IDs puzzles me.

Would I just arbitrarily assign a different value to one of the duplicates and then adjust the resource.h "next values" accordingly? Where would I do this? Is resource.h the actual original source and then resources.fd results from its being "compiled", or should I just edit the .fd directly?

On the other hand ... does this make any difference? If I don't fix this, could the controls not function sometimes?

A bit of explanation or pointing towards appropriate Help/Reference sections would be a real help.

Thanks and God bless!
Jack

0 Kudos
Steven_L_Intel1
Employee
1,320 Views
resource.h is the source - resource.fd is created based on that.
0 Kudos
Reply