-
button storing problem
Code:
case HEX_BUTTON_1:
SetDlgItemText(HexWindow,HEX_HEDIT,"1");
store_info[counter] = 1;
counter++;
break;
case HEX_CALCULATE:
{
SetDlgItemInt(HexWindow,HEX_HEDIT,store_info,false);
counter = 0;
}
break;
Im trying to find a way to have it so all the information gets stored into store_info and then printed out >.>, but that makes the edit box hold 4215384 everytime i click on calculate.
-
Well, store_info looks like an array. You will need to make a character buffer and fill it with all the data from store_info, and then SetDlgItemText.
-
already tried
Thats what I tried first, which in the long run will make this difficult >.>, Here is what I had when I tried it making store_info a char array:
Code:
case HEX_BUTTON_1:
SetDlgItemText(HexWindow,HEX_HEDIT,"1");
store_info[counter] = (char)1;
counter++;
break;
case HEX_CALCULATE:
{
SetDlgItemText(HexWindow,HEX_HEDIT,store_info);
counter = 0;
}
break;
and I get the same problem, it prints out a weird character instead of 1.
At this point, Im just trying to get store info to print out right, once I get this done, I can easily build the rest.
-
No, something more like this probably
Code:
char buf[1024];
sprintf(buf, "%d %d %d", store_info[0], store_info[1], store_info[2]);
SetDlgItemText(HexWindow, HEX_HEDIT, buf);