Is APSTUDIO_INVOKED stuff necessary in a resource file header that generated by Visual Studio?

thebluetropics 1,046 Reputation points

Visual Studio generates resource.h when creating a new .rc file.

Here is the generated file looks like:

   #  define _APS_NEXT_RESOURCE_VALUE        102  
   #  define _APS_NEXT_COMMAND_VALUE         40001  
   #  define _APS_NEXT_CONTROL_VALUE         1001  
   #  define _APS_NEXT_SYMED_VALUE           102  
   # endif  

I have tried to compile and run without these stuff, it works perfectly like nothing is changed.

So, what are these stuff? Is it necessary to define it?

Probably Visual Studio uses it for incremental identifier for "next resource"?
However, I manually editing the .rc file, so I didn't use VS' resource manager...

A high-level, general-purpose programming language, created as an extension of the C programming language, that has object-oriented, generic, and functional features in addition to facilities for low-level memory manipulation.
3,600 questions
0 comments No comments
{count} votes

Accepted answer
  1. Minxin Yu 10,466 Reputation points Microsoft Vendor

    Hi, @thebluetropics

    You could refer to the similar thread:
    What are the macros in resource.h used for?

    Best regards,

    Minxin Yu

    If the answer is the right solution, please click "Accept Answer" and kindly upvote it. If you have extra questions about this answer, please click "Comment".
    Note: Please follow the steps in our documentation to enable e-mail notifications if you want to receive the related email notification for this thread.

    1 person found this answer helpful.
    0 comments No comments

1 additional answer

Sort by: Most helpful
  1. RLWA32 42,006 Reputation points

    The information is used by the resource editor.