#1659 Incorrect declaration of dwItemData member of MENUITEMINFO


The definition of the MENUITEMINFO structure in winuser.h is as follows:

typedef struct tagMENUITEMINFOA {
UINT cbSize;
UINT fMask;
UINT fType;
UINT fState;
HMENU hSubMenu;
HBITMAP hbmpChecked;
HBITMAP hbmpUnchecked;
DWORD dwItemData;
LPSTR dwTypeData;
UINT cch;
#if (_WIN32_WINNT >= 0x0500)
HBITMAP hbmpItem;

and similarly for the Unicode version.

However, according to MSDN, the dwItemData member should be declared ULONG_PTR, so that it is portable both to 32-bit and 64-bit Windows.


  • Earnie Boyd

    Earnie Boyd - 2012-07-22
    • assigned_to: nobody --> earnie
  • Earnie Boyd

    Earnie Boyd - 2012-07-22

    It probably changed in MSDN at some point.

  • Earnie Boyd

    Earnie Boyd - 2012-08-01
    • milestone: --> Known_bugs
    • status: open --> closed-fixed
  • Earnie Boyd

    Earnie Boyd - 2012-08-01

    The problem you report has caused modification in some fashion in
    the official CVS for the given package. The w32api and
    mingw-runtime official CVS reside in the winsup CVS directory tree for Cygwin. If you still find problems then please open a
    new report.


Log in to post a comment.

Get latest updates about Open Source Projects, Conferences and News.

Sign up for the SourceForge newsletter:

No, thanks