27.07.2018, 15:57
I personally prefer an enum for dialog IDs, simply because you do not need to keep counting on and on. Also, if you add dialogs in between you'd either need to take an ID that doesn't belong there (a new one), or change all other IDs.
Other than that I don't think there's anything wrong with either solution, except that an enum is way more convenient. Also you can change all IDs at once if there are conflits by doing:
And the Dialog IDs will start at 500. Using defines you'd have to change all the IDs manually, or work with an offset from the start.
Other than that I don't think there's anything wrong with either solution, except that an enum is way more convenient. Also you can change all IDs at once if there are conflits by doing:
Код:
enum { DIALOG_REGISTER = 500, DIALOG_LOGIN, ... };