I did this:
#include<windows.h>
// WinMain
HMENU hmenu;
MENUINFO menuinfo;
menuinfo.fMask=MIM_BACKGROUND;
menuinfo.cbSize=sizeof(MENUINFO);
menuinfo.hbrBack=(HBRUSH)GetStockObject(GRAY_BRUSH );
SetMenuInfo(&menuinfo);
// ...
When compiling this code I get 11 errors. You won't believe why:
MENUINFO is a not-declared name!
// So I looked in the MSDN help, there I found out that the structure was declared in winuser.h and one could include windows.h as well. Ok, so I included winuser.h AND windows.h
#include<winuser.h>
#include<windows.h>
// And so on like before
This time (the same code) I only get 2 errors. But the error is somewhere in winuser.h (exactly line 39 where, it seems, a ";" could have been forgotten by the authors of winuser.h (but, and that lets me hope I finally will be able to include menus in my programs, MENUINFO seems to be no not-declared name any longer when including <winuser.h> directly). Is this an error that only occurs with my winuser.h or did anybody else also have this problem. And if not, what could I do to make functions, that need pointers to MENUINFO structs, work?