Work at SourceForge, help us to make it a better place! We have an immediate need for a Support Technician in our San Francisco or Denver office.

Close

#1659 Incorrect declaration of dwItemData member of MENUITEMINFO

Known_bugs
closed-fixed
Earnie Boyd
2012-08-01
2012-07-22
Eli Zaretskii
No

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

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

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.

Discussion

  • 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.