1. This site uses cookies. By continuing to use this site, you are agreeing to our use of cookies. Learn More.

Decimal to Hex Convert c++

Discussion in 'Programming' started by GroundZero, Aug 25, 2010.

  1. GroundZero

    GroundZero LOL Banned Coder Donor

    I will finish my Kami dll
    so i need a function which will convert my Decimal Value in Integer to a Hex.
    For Range x and y!

    greetz Piaggio
  2. [D.R.T]

    [D.R.T] (҂ `з´ ).︻╦̵̵̿╤── Coder Donor

    Code (Text):
    2. DWORD testHex;
    3. int integertest = 500;
    5. testHex = (DWORD)integertest;
  3. DarkSpace

    DarkSpace Well-Known Member Coder

    DWORD rangeX = 150;

    it really doesnt matter what whole number you pass in. it will get converted to hex on its own.

    example being

    DWORD example = 0x15E;

    textBox->Text = example.ToString(); //350
  4. GroundZero

    GroundZero LOL Banned Coder Donor

    x = Convert::ToInt32(textBox1->Text);
    y = Convert::ToInt32(textBox2->Text);
    dwRangeX = (DWORD)x;
    dwRangeY = (DWORD)y;

    this Procedur show no Compile Errors i think it will work or?
  5. [D.R.T]

    [D.R.T] (҂ `з´ ).︻╦̵̵̿╤── Coder Donor


    Code (Text):
    2. dwRangeX = (DWORD)(Convert::ToInt32(textBox1->Text));
  6. GroundZero

    GroundZero LOL Banned Coder Donor

    Ty to w8dark and drt
    thanks for the fast help
    only 2 minutes to wait

Share This Page