In Visual C++ 2008 Pro, I get one warning per value, and the question is why??
2>taskdialog.h(69) : warning C4341: 'TDIconWarning' : signed value is out of range for enum constant
2>taskdialog.h(70) : warning C4341: 'TDIconError' : signed value is out of range for enum constant
2>taskdialog.h(71) : warning C4341: 'TDIconInformation' : signed value is out of range for enum constant
2>taskdialog.h(73) : warning C4341: 'TDIconShield' : signed value is out of range for enum constant
I don't see how -1, -2, -3 and -4 are outside the range of a short int. FYI, the warning also appears when the enum is based on int.
And one more FYI: The enum seems to work OK. I use it to specify the icon I want in a given Task Dialog (I have used TDIconError so far only).
The compiler just doesn't like the fact that you're using signed numeric values instead of unsigned. However, a enumerated list that contains signed numeric values is still valid, but not as common. Enumerated lists are generally unsigned.