My project is windows form application (using Microsoft Visual C++ Studio 2010).
I've created a textBox. There are 3 radio buttons below that textBox (named Hex, Dec, Bin). What I need is after the user chooses one of the option given by clicking on a radio button, he enters some number (let's say he chooses Bin and enters 11100). Then he clicks on Dec the number in textBox will be changed to 28 (the decimal value of 11100). If he clicks on Hex then the number will be changed to 1C (the hexcimal of 11100).
Now is the point: let's assume that the user chooses Hex and enters 1C. After I retrieve that text as a string, I have to declare a variable of type DWORD like DWORD d; that holds the hexcimal value of the text. How could I do that because I don't know what number the user is going to enter. If I knew that he is going to enter 1C, then I could declare like this DWORD d = 0x1C.
Please help me with this!
Any help would be appreciated!
Thank in advance!