\r
void AddOption(int x, int y, Control type, int i)\r
{\r
- int extra;\r
+ int extra, num = ES_NUMBER;\r
\r
switch(type) {\r
+ case Slider+100:\r
+ num = 0; // needs text control for accepting negative numbers\r
case Slider:\r
case Spin:\r
AddControl(x, y+1, 95, 9, 0x0082, SS_ENDELLIPSIS | WS_VISIBLE | WS_CHILD, i);\r
- AddControl(x+95, y, 50, 11, 0x0081, ES_AUTOHSCROLL | ES_NUMBER | WS_BORDER | WS_VISIBLE | WS_CHILD | WS_TABSTOP, i+1);\r
+ AddControl(x+95, y, 50, 11, 0x0081, ES_AUTOHSCROLL | num | WS_BORDER | WS_VISIBLE | WS_CHILD | WS_TABSTOP, i+1);\r
break;\r
case TextBox:\r
extra = 13*activeList[layoutList[i/2]].min; // when extra high, left-align and put description text above it\r
}\r
j = layoutList[i];\r
if(j >= 0) {\r
- AddOption(x+155-150*(i&1), y+13*(i>>1)+5, optionList[j].type, 2*i);\r
+ int neg = (optionList[j].type == Spin && optionList[j].min < 0 ? 100 : 0); // flags spin with negative range\r
+ AddOption(x+155-150*(i&1), y+13*(i>>1)+5, optionList[j].type + neg, 2*i);\r
// listboxes have the special power to adjust the width of the column they are in\r
if(optionList[j].type == ListBox) x -= optionList[j].value, template.header.cx -= optionList[j].value;\r
}\r