PDA

Click to See Complete Forum and Search --> : Coverting HFONT to unsigned int


V(ery) Basic
Aug 20th, 2000, 12:54 PM
Ermmm. Sorry to waste your time (Truesteppers and that Victoria ***** are on the radio :rolleyes: ).

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.

Aug 20th, 2000, 01:41 PM
HFONT MyVar;
unsiged int MyVar2;
MyVar = whatevervalue;
cout << (MyVar = MyVar2) << endl;


that converts MyVar to an Unsigned integer.

parksie
Aug 21st, 2000, 01:51 PM
Why do you want to convert a font handle to an integer?
Anyway, though, to convert use this:

HFONT i;
long i = (long)i;

Although in a lot of cases the compiler will choke on pointer->integer conversions.

V(ery) Basic
Aug 21st, 2000, 03:28 PM
**** you thery much

parksie
Aug 21st, 2000, 03:34 PM
Hehe