mirror of
https://gitlab.com/freepascal.org/lazarus/lazarus.git
synced 2025-06-13 19:08:25 +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);
|
procedure SetMenuFlag(const Menu:HMenu; Flag: Integer; Value: boolean);
|
||||||
var
|
var
|
||||||
MenuInfo: MENUITEMINFO;
|
MenuInfo: MENUITEMINFO;
|
||||||
|
MenuItemInfoSize: DWORD;
|
||||||
|
const
|
||||||
|
W95_MENUITEMINFO_SIZE = 44;
|
||||||
begin
|
begin
|
||||||
|
if (Win32MajorVersion = 4) and (Win32MinorVersion = 0) then
|
||||||
|
MenuItemInfoSize := W95_MENUITEMINFO_SIZE
|
||||||
|
else
|
||||||
|
MenuItemInfoSize := sizeof(MENUITEMINFO);
|
||||||
FillChar(MenuInfo, SizeOf(MenuInfo), 0);
|
FillChar(MenuInfo, SizeOf(MenuInfo), 0);
|
||||||
MenuInfo.cbSize := SizeOf(MENUITEMINFO);
|
MenuInfo.cbSize := MenuItemInfoSize;
|
||||||
MenuInfo.fMask := MIIM_TYPE;
|
MenuInfo.fMask := MIIM_TYPE;
|
||||||
GetMenuItemInfo(Menu, 0, True, @MenuInfo);
|
GetMenuItemInfo(Menu, 0, True, @MenuInfo);
|
||||||
if Value then
|
if Value then
|
||||||
|
Loading…
Reference in New Issue
Block a user