Results 1 to 5 of 5

Thread: Coverting HFONT to unsigned int

  1. #1

    Thread Starter
    Fanatic Member
    Join Date
    Apr 2000
    Location
    Whats a location?
    Posts
    516

    Question

    Ermmm. Sorry to waste your time (Truesteppers and that Victoria ***** are on the radio ).

    How do you convert a value of one type (hFont in this case) to another type (unsigned int). There's got to be a way to do this, but could somebody tell me?

    parksie, Meg Ryan A-Tron? Anybody. Pleeeeeeeeeeaaaaaasssssseeeeee.
    Courgettes.

  2. #2
    Guest
    Code:
    HFONT MyVar;
    unsiged int MyVar2;
    MyVar = whatevervalue;
    cout << (MyVar = MyVar2) << endl;
    that converts MyVar to an Unsigned integer.


  3. #3
    Monday Morning Lunatic parksie's Avatar
    Join Date
    Mar 2000
    Location
    Mashin' on the motorway
    Posts
    8,169
    Why do you want to convert a font handle to an integer?
    Anyway, though, to convert use this:
    Code:
    HFONT i;
    long i = (long)i;
    Although in a lot of cases the compiler will choke on pointer->integer conversions.
    I refuse to tie my hands behind my back and hear somebody say "Bend Over, Boy, Because You Have It Coming To You".
    -- Linus Torvalds

  4. #4

    Thread Starter
    Fanatic Member
    Join Date
    Apr 2000
    Location
    Whats a location?
    Posts
    516

    Red face A small typo:

    **** you thery much
    Courgettes.

  5. #5
    Monday Morning Lunatic parksie's Avatar
    Join Date
    Mar 2000
    Location
    Mashin' on the motorway
    Posts
    8,169
    Hehe
    I refuse to tie my hands behind my back and hear somebody say "Bend Over, Boy, Because You Have It Coming To You".
    -- Linus Torvalds

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  



Click Here to Expand Forum to Full Width