win32 intf: fixed TWin32WidgetSet.AttachMenuToWindow using the AMenu.Parent instead of AMenu.Owner for handle

git-svn-id: trunk@15016 -
This commit is contained in:
mattias 2008-04-29 22:53:21 +00:00
parent 6ca2263037
commit 4e712a00be

View File

@ -488,7 +488,7 @@ begin
AMenu := AMenuObject as TMenu;
if AMenu is TMainMenu then
begin
AWinControl := TWinControl(AMenu.Owner);
AWinControl := TWinControl(AMenu.Parent);
Windows.SetMenu(AWinControl.Handle, AMenu.Handle);
//Set the right order menu after attach the menu
SetMenuFlag(AMenu.Handle, MFT_RIGHTORDER or MFT_RIGHTJUSTIFY, AMenu.IsRightToLeft);