The convention of controls on my dialog is:
#define DLG_NAME 1 #define DLG_NAME_CONTROL_NAME 2 I want to build a function which will know the control name, and has to get the defined value.
It's clear that I can't write int i = DLG_NAME + _ + CONTROL_NAME.
So how can I mix the first #define and another text to get the second #define value?
##operator to combine macro names. However, I do not understand what you want to achieve. Do you want to get1_2as an identifier ? (its is not a valid one).int i = DLG_NAME_CONTROL_NAME.#define DLG_NAME_FIRST_COMBO 2and#define CONTROL_NAME FIRST_COMBO, and in the class's function I'll writeint i = DLG_NAME##CONTROL_NAME. Each class will operate it as defined in it. Am I right?