mirror of
https://gitlab.com/freepascal.org/lazarus/lazarus.git
synced 2025-05-29 04:25:52 +02:00
menuiteminfo compatibility with win95 from Martin Smat
git-svn-id: trunk@11518 -
This commit is contained in:
parent
ae7d12aa56
commit
21bc08ec17
@ -1123,9 +1123,16 @@ end;
|
||||
procedure SetMenuFlag(const Menu:HMenu; Flag: Integer; Value: boolean);
|
||||
var
|
||||
MenuInfo: MENUITEMINFO;
|
||||
MenuItemInfoSize: DWORD;
|
||||
const
|
||||
W95_MENUITEMINFO_SIZE = 44;
|
||||
begin
|
||||
if (Win32MajorVersion = 4) and (Win32MinorVersion = 0) then
|
||||
MenuItemInfoSize := W95_MENUITEMINFO_SIZE
|
||||
else
|
||||
MenuItemInfoSize := sizeof(MENUITEMINFO);
|
||||
FillChar(MenuInfo, SizeOf(MenuInfo), 0);
|
||||
MenuInfo.cbSize := SizeOf(MENUITEMINFO);
|
||||
MenuInfo.cbSize := MenuItemInfoSize;
|
||||
MenuInfo.fMask := MIIM_TYPE;
|
||||
GetMenuItemInfo(Menu, 0, True, @MenuInfo);
|
||||
if Value then
|
||||
|
Loading…
Reference in New Issue
Block a user