Hi everybody,
Does qWord's GetMenuBarInfo (http://www.masmforum.com/board/index.php?topic=16156.msg133580#msg133580) example still work? I am on Win7-32 now, and it fails consistently with invalid parameter...
Note some assemblers complain about redefinition. Just put an if 0 ... endif around the MENUBARINFO definition on top.
Jochen,
could you attach the right source for jWasm?
Gunther
The structure declaration in windows.inc is wrong.
Hi qWord,
Quote from: qWord on May 08, 2014, 01:18:06 AM
The structure declaration in windows.inc is wrong.
thank you for the information. What's wrong?
Gunther
The last two members (with "f" prefix) are bit fields:
typedef struct tagMENUBARINFO
{
DWORD cbSize;
RECT rcBar; // rect of bar, popup, item
HMENU hMenu; // real menu handle of bar, popup
HWND hwndMenu; // hwnd of item submenu if one
BOOL fBarFocused:1; // bar, popup has the focus
BOOL fFocused:1; // item has the focus
} MENUBARINFO, *PMENUBARINFO, *LPMENUBARINFO;
The structure in windows.inc use two BOOLs instead of one SDWORD (BOOL).
Interestingly the declaration that can be found on MSDN is also wrong.
Quote from: qWord on May 08, 2014, 01:42:59 AM
The structure in windows.inc use two BOOLs instead of one SDWORD (BOOL).
In clear violation of assembly rule #1: everything is a DWORD ;-)
Thanks, it works :t