vendredi 6 mars 2015

How to convert HDC to WORD (unsigned short)


Vote count:

0




Is there a way to convert HDC (afxwin.h) to WORD (unsigned short)? I tried to use static_cast and C style cast but both it doesn't help. Anyone have idea?



HDC x;
WORD y = static_cast<WORD>(x);

[invalid type conversion]

HDC x;
WORD y = (WORD)x;


[warning C4302: 'type cast': truncation from 'HDC' to 'WORD']



asked 15 secs ago







How to convert HDC to WORD (unsigned short)

Aucun commentaire:

Enregistrer un commentaire