mirror of
https://gitlab.com/freepascal.org/lazarus/lazarus.git
synced 2026-01-05 23:41:23 +01:00
Adds support for testing the atDesktop menus under wince-win32-x86. Also fixes some include file ide directives
git-svn-id: trunk@27372 -
This commit is contained in:
parent
a3b60a072f
commit
f21517ba5c
@ -1,4 +1,4 @@
|
||||
// included by win32int.pp
|
||||
{%MainUnit winceint.pp}
|
||||
|
||||
{******************************************************************************
|
||||
win32listslh.inc
|
||||
|
||||
@ -1,4 +1,4 @@
|
||||
{%MainUnit ../lclintf.pp}
|
||||
{%MainUnit winceint.pp}
|
||||
|
||||
(******************************************************************************
|
||||
All Winapi related stuff goes here.
|
||||
@ -2939,11 +2939,19 @@ begin
|
||||
end;
|
||||
|
||||
function TWinCEWidgetSet.SetMenu(AWindowHandle: HWND; AMenuHandle: HMENU): Boolean;
|
||||
{$ifndef Win32}
|
||||
{$ifdef Win32WithWin32Menus}
|
||||
begin
|
||||
Result := Windows.SetMenu(AWindowHandle, AMenuHandle);
|
||||
end;
|
||||
{$else}
|
||||
var
|
||||
lLCLMenu: TMenu;
|
||||
i: Integer;
|
||||
begin
|
||||
{$ifdef VerboseWinCEMenu}
|
||||
DebugLn('[TWinCEWidgetSet.SetMenu]');
|
||||
{$endif}
|
||||
|
||||
Result := False;
|
||||
|
||||
if AMenuHandle = 0 then
|
||||
@ -2955,14 +2963,14 @@ begin
|
||||
lLCLMenu := TMenu(MenuLCLObjectList.Items[i]);
|
||||
end;
|
||||
|
||||
{$ifdef Win32}
|
||||
CeSetMenuDesktop(AWindowHandle, AMenuHandle, lLCLMenu);
|
||||
{$else}
|
||||
CeSetMenu(AWindowHandle, AMenuHandle, lLCLMenu);
|
||||
{$endif}
|
||||
AddToChangedMenus(AWindowHandle);
|
||||
Result := True;
|
||||
end;
|
||||
{$else}
|
||||
begin
|
||||
Result := Windows.SetMenu(AWindowHandle, AMenuHandle);
|
||||
end;
|
||||
{$endif}
|
||||
|
||||
|
||||
|
||||
@ -101,9 +101,9 @@ var
|
||||
MenuHandleList, MenuLCLObjectList: TFPList;
|
||||
|
||||
function FindMenuItemAccelerator(const ACharCode: char; const AMenuHandle: HMENU): integer;
|
||||
{$ifndef Win32}
|
||||
procedure PocketPCAddMenuToToolbar(Wnd: HWND; Menu: HMENU; LCLMenu: TMenu; toolBar: Handle);
|
||||
procedure CeSetMenuDesktop(Wnd: HWND; Menu: HMENU; LCLMenu: TMenu);
|
||||
{$ifndef Win32}
|
||||
procedure CeSetMenu(Wnd: HWND; Menu: HMENU; LCLMenu: TMenu);
|
||||
{$endif}
|
||||
|
||||
@ -129,7 +129,6 @@ type
|
||||
|
||||
//menus
|
||||
|
||||
{$ifndef Win32}
|
||||
procedure PocketPCAddMenuToToolbar(Wnd: HWND; Menu: HMENU; LCLMenu: TMenu; toolBar: Handle);
|
||||
var
|
||||
mi: MENUITEMINFO;
|
||||
@ -329,6 +328,7 @@ begin
|
||||
PocketPCAddMenuToToolbar(Wnd, Menu, LCLMenu, menuBar);
|
||||
end;
|
||||
|
||||
{$ifndef Win32}
|
||||
{
|
||||
The main menu setting routine, it is called by LCLIntf.SetMenu, which
|
||||
associates a menu with a window.
|
||||
|
||||
Loading…
Reference in New Issue
Block a user