Fixes bug #11391 and adds automatic compilation of the .rc file.

git-svn-id: trunk@15308 -
This commit is contained in:
sekelsenmat 2008-06-04 18:13:03 +00:00
parent 0ddf238101
commit 404a6a93b8
4 changed files with 36 additions and 23 deletions

View File

@ -1,6 +1,10 @@
//*****************************************************
// Resource file necessary for menu support
//*****************************************************
STRINGTABLE
MOVEABLE PURE LOADONCALL DISCARDABLE
LANGUAGE LANG_ENGLISH, 1
//LANGUAGE LANG_ENGLISH, 1
BEGIN
102, " "
103, " "
@ -9,22 +13,24 @@ END
STRINGTABLE
MOVEABLE PURE LOADONCALL DISCARDABLE
LANGUAGE LANG_ENGLISH, 1
//LANGUAGE LANG_ENGLISH, 1
BEGIN
40037, " "
END
// 2 menu items
101 MENU
MOVEABLE PURE LOADONCALL DISCARDABLE
LANGUAGE LANG_ENGLISH, 1
//LANGUAGE LANG_ENGLISH, 1
BEGIN
MENUITEM " ", 40052
MENUITEM " ", 40053
END
// 1 popup menu and 1 menu item
105 MENU
MOVEABLE PURE LOADONCALL DISCARDABLE
LANGUAGE LANG_ENGLISH, 1
//LANGUAGE LANG_ENGLISH, 1
BEGIN
MENUITEM " ", 40052
POPUP " "
@ -33,9 +39,10 @@ BEGIN
END
END
// 1 popup menu and 1 menu item
106 MENU
MOVEABLE PURE LOADONCALL DISCARDABLE
LANGUAGE LANG_ENGLISH, 1
//LANGUAGE LANG_ENGLISH, 1
BEGIN
POPUP " "
BEGIN
@ -44,9 +51,10 @@ BEGIN
MENUITEM " ", 40053
END
// 2 popupmenu items
107 MENU
MOVEABLE PURE LOADONCALL DISCARDABLE
LANGUAGE LANG_ENGLISH, 1
//LANGUAGE LANG_ENGLISH, 1
BEGIN
POPUP " "
BEGIN
@ -58,7 +66,7 @@ BEGIN
END
END
101 RCDATA
/* 101 RCDATA
MOVEABLE PURE LOADONCALL DISCARDABLE
LANGUAGE LANG_ENGLISH, 1
BEGIN
@ -78,7 +86,7 @@ END
106 RCDATA
MOVEABLE PURE LOADONCALL DISCARDABLE
LANGUAGE LANG_ENGLISH, 1
//LANGUAGE LANG_ENGLISH, 1
BEGIN
'6A 00 02 00 FE FF 74 9C 04 00 18 00 65 9C 00 00 '
'00 00 FE FF 75 9C 04 00 10 00 65 9C 00 00 FF FF '
@ -92,5 +100,9 @@ BEGIN
'6B 00 02 00 FE FF 74 9C 04 00 18 00 65 9C 00 00 '
'00 00 FE FF 75 9C 04 00 18 00 65 9C 00 00 01 00 '
END
*/
//*****************************************************
// Uncomment the line below to run application in real VGA mode
// HI_RES_AWARE CEUX {1}
//*****************************************************

View File

@ -1185,14 +1185,14 @@ end;
Function: DisableWindowsProc
Params: Window - handle of toplevel windows to be disabled
Data - handle of current window form
Returns: Whether the enumeration should continue
Returns: True if the enumeration should continue, False otherwise
Used in LM_SHOWMODAL to disable the windows of application thread
except the current form.
-----------------------------------------------------------------------------}
function DisableWindowsProc(Window: HWND; Data: LParam): LongBool; {$ifdef Win32}stdcall;{$else}cdecl;{$endif}
var
Buffer: array[0..15] of Char;
Buffer: array[0..15] of WideChar;
DisableWindowsInfo: PDisableWindowsInfo absolute Data;
begin
Result:=true;
@ -1205,8 +1205,8 @@ begin
if Window = DisableWindowsInfo^.NewModalWindow then exit;
// Don't disable any ComboBox listboxes
if (GetClassName(Window, @Buffer, sizeof(Buffer))<sizeof(Buffer))
and (StrIComp(Buffer, 'ComboLBox')=0) then exit;
if (GetClassNameW(Window, @Buffer, sizeof(Buffer))<sizeof(Buffer))
and (WideCompareText(widestring(@Buffer), 'ComboLBox')=0) then exit;
if not IsWindowVisible(Window) or not IsWindowEnabled(Window) then exit;
@ -1224,8 +1224,8 @@ var
begin
// prevent recursive calling when the AppHandle window is disabled
If InDisableApplicationWindows then exit;
InDisableApplicationWindows := True;
InDisableApplicationWindows:=true;
New(DisableWindowsInfo);
DisableWindowsInfo^.NewModalWindow := Window;
DisableWindowsInfo^.DisabledWindowList := TList.Create;

View File

@ -422,6 +422,7 @@ class procedure TWinCEWSCustomForm.ShowModal(const ACustomForm: TCustomForm);
begin
DisableApplicationWindows(ACustomForm.Handle);
ShowWindow(ACustomForm.Handle, SW_SHOW);
// BringWindowToTop(ACustomForm.Handle);
end;

View File

@ -82,8 +82,6 @@ type
class procedure Popup(const APopupMenu: TPopupMenu; const X, Y: integer); override;
end;
function FindMenuItemAccelerator(const ACharCode: char; const AMenuHandle: HMENU): integer;
const
//having left or right submenus [true,false] means right have submenu,left doesnt have
MenuBarIDS : array[Boolean, Boolean] of integer =
@ -96,13 +94,15 @@ const
var
MenuItemsList : TStringList;
function FindMenuItemAccelerator(const ACharCode: char; const AMenuHandle: HMENU): integer;
procedure CeSetMenu(Wnd: HWND; Menu: HMENU);
implementation
uses strutils;
{$R wincemenures.res}
{$R wincemenures.rc}
{ helper routines }