How do I remove the warning "conversion from 'int' to 'HMENU' of greater size"?

CDev-8220 220 Reputation points

I followed the guide on Creating, Enumerating, and Sizing Child Windows, but I'm getting a warning on this line of code:

(HMENU) (int) (ID_FIRSTCHILD + i), 

warning C4312: 'type cast': conversion from 'int' to 'HMENU' of greater size

How do I fix this?

A high-level, general-purpose programming language, created as an extension of the C programming language, that has object-oriented, generic, and functional features in addition to facilities for low-level memory manipulation.
3,625 questions
{count} votes

1 additional answer

Sort by: Most helpful
  1. Barry Schwarz 2,506 Reputation points

    Look up the #pragma warning disable feature.

    0 comments No comments