What does the _APS_NEXT implies?

366 views
Skip to first unread message

Pradeep

unread,
May 3, 2001, 11:02:05 AM5/3/01
to
Hello,

The resource.h file in a mfc project contains 4 #defines
_APS_NEXT_RESOURCE_VALUE, _APS_NEXT_COMMAND_VALUE, _APS_NEXT_CONTROL_VALUE,
_APS_NEXT_SYMED_VALUE

Obviously the _APS_NEXT_RESOURCE_VALUE is used for allocating the id of the
next resource. But how is the id for a string in a string table allocated?
The MSDN document(TN035) says that the resource value should be between
1-0x6FFF, but the string ids go beyond this range. Also the string ids and
the resource ids of other resources are not unique. How is it handled? or
does it have a different range.

Also when is the _APS_NEXT_CONTROL_VALUE incremented? Is it when a new
control is added to a dialog/form? or is it incremented during some other
time?

TIA,
Pradeep


Johan Rosengren

unread,
May 4, 2001, 12:21:14 AM5/4/01
to
Pradeep!

I just experimented a little with this. Stringtable entries take their
values calculated as the next free value from the selected string in the
table.
Different types of resources can have identical values - *must* have the
same values in some cases (witness menu items and string table entries for
the statusbar/tooltip), controls can even have the same value, as long as
they are located on different dialog templates.

Do what I did! Create an empty project, adding resources, inspecting the
_AFX_NEXT definitions. Change the _AFX_-definitions by hand and add yet more
resources.

Johan Rosengren
Responsable Informatique
PACTA S.A.

"Pradeep" <jain.p...@de.bosch.com> wrote in message
news:9crrtr$2f3$1...@proxy.fe.internet.bosch.com...

kyse...@gmail.com

unread,
Jul 4, 2017, 4:28:57 AM7/4/17
to
четверг, 3 мая 2001 г., 18:02:05 UTC+3 пользователь Pradeep написал:
Look at https://msdn.microsoft.com/en-us/library/6t3612sk.aspx

_APS_NEXT_RESOURCE_VALUE is the next symbol value that will be used for a dialog resource, menu resource, and so on. The valid range for resource symbol values is 1 to 0x6FFF.
_APS_NEXT_COMMAND_VALUE is the next symbol value that will be used for a command identification. The valid range for command symbol values is 0x8000 to 0xDFFF.
_APS_NEXT_CONTROL_VALUE is the next symbol value that will be used for a dialog control. The valid range for dialog control symbol values is 8 to 0xDFFF.
_APS_NEXT_SYMED_VALUE is the next symbol value that will be issued when you manually assign a symbol value using the New command in the Symbol Browser.
Reply all
Reply to author
Forward
0 new messages