Recent

Author Topic: Applications for Windows 7 Embedded Compact  (Read 15736 times)

SonnyBoyXXl

  • New member
  • *
  • Posts: 44
Applications for Windows 7 Embedded Compact
« on: February 15, 2016, 08:43:12 pm »
Hi there,
since I have to do a project wit Windows 7 Embedded Compact (WinCE 7.0) and only found error descriptions on the www and I h.a.t.e to do programing in .NET I now figured out how to get applications compiled for CE7.0. Both native code without LCL and with LCL is running now, look at the screenshots. I will clean my code and then post it here, so that this can be included in a later official release of lazarus!

greatings!

FPC strikes once again :D

SonnyBoyXXl

  • New member
  • *
  • Posts: 44
Applications for Windows 7 Embedded Compact
« Reply #1 on: February 15, 2016, 11:57:02 pm »
So what I have done:

The most important thing is to remove the dependency to aygshell.dll.

modify the unit WinCEWSMenus this way:

Add a definition
Code: Pascal  [Select]
  1. {$DEFINE WINCE7}

comment the reference to aygshell out
Code: Pascal  [Select]
  1. {$ifndef win32}{aygshell,}{$endif}

in the procedure CeSetMenu make the following change:
Code: Pascal  [Select]
  1. {$IFNDEF WINCE7}
  2.   mbi: SHMENUBARINFO;
  3.   {$ENDIF}
and out comment the whole procedure:

Code: Pascal  [Select]
  1. begin
  2. (*
  3.   {$ifdef VerboseWinCEMenu}
  4. ...
  5. //DrawMenuBar(wnd);
  6. *)
  7. end;
  8.  


In the file wincecallback.inc change as follow:

Add again a definition of
Code: Pascal  [Select]
  1.   {$DEFINE WINCE7}
  2.  

modify around line 207
Code: Pascal  [Select]
  1. {$ifndef win32}
  2.   {$IFNDEF WINCE7}
  3.   Info: SHRGINFO; // used by SHRecognizeGesture in WM_LBUTTONDOWN
  4.   {$endif}
  5.   {$endif}

also around line 257

Code: Pascal  [Select]
  1. if PopupMenu <> nil then //processing popup menu
  2.     begin
  3.       WindowInfo^.PopupMenu := nil;
  4.       // LOWORD(WParam) = MENUITEM_ID
  5.       Result := PopupMenu.FindItem(LOWORD(WParam), fkCommand);
  6.     end;
  7.     {$ifndef win32}
  8.     {$ifndef WinCE7}
  9.     if Result = nil then //if Result is still nil, process main menu
  10.     begin
  11.       MainMenuHandle := SHFindMenuBar(Window);

and

Code: Pascal  [Select]
  1. WM_LBUTTONDOWN:
  2.     begin
  3.       {$ifndef win32}
  4.       {$IFNDEF WINCE7}
  5.       // Gesture recognition process to enable popup menus.
  6.       if (lWinControl.PopupMenu <> nil) then
  7.       begin

close the $IFNDEF WINCE7 with
Code: Pascal  [Select]
  1. {$endif}
whre the win32 ifndef ends....

cause Win7Embedded Compact is similar to Win32  ;)



That's it. I don't know if all is perfect, but it work's at the moment. Also Graphic32 is running. I will continue testing.... pls inform me if you have additional informations!

good luck and happy testing

rus.punk

  • Newbie
  • Posts: 4
Re: Applications for Windows 7 Embedded Compact
« Reply #2 on: March 12, 2016, 09:02:37 am »

Hello , could you release a patch for the conversion of the source code needed to build a windows CE 7.0 and back , and I use lazarus and code Typhon. In advance thank you !

vincococka

  • Full Member
  • ***
  • Posts: 101
Re: Applications for Windows 7 Embedded Compact
« Reply #3 on: March 12, 2016, 10:41:20 am »
Nice work Sonny.. KUDOZ!
---
  Guide me God and I`ll find you

rus.punk

  • Newbie
  • Posts: 4
Re: Applications for Windows 7 Embedded Compact
« Reply #4 on: March 12, 2016, 05:47:03 pm »
I need help to build a Windows CE 7.0 !!!

GutoGT

  • New member
  • *
  • Posts: 6
Re: Applications for Windows 7 Embedded Compact
« Reply #5 on: March 16, 2016, 08:29:36 pm »
what version of Lazarus ?
please post the files.
thank you

fduron

  • Newbie
  • Posts: 1
Re: Applications for Windows 7 Embedded Compact
« Reply #6 on: March 16, 2016, 10:06:00 pm »
what version of Lazarus ?
please post the files.
thank you

I try it with Lazarus 1.6 - FPC 3.0.0 - cross-arm-wince-win32, does not work  :o

rus.punk

  • Newbie
  • Posts: 4
Re: Applications for Windows 7 Embedded Compact
« Reply #7 on: March 20, 2016, 04:11:47 pm »
I use codetyphon 5.60

GutoGT

  • New member
  • *
  • Posts: 6
Re: Applications for Windows 7 Embedded Compact
« Reply #8 on: March 29, 2016, 07:36:11 pm »
Hi there,
since I have to do a project wit Windows 7 Embedded Compact (WinCE 7.0) and only found error descriptions on the www and I h.a.t.e to do programing in .NET I now figured out how to get applications compiled for CE7.0. Both native code without LCL and with LCL is running now, look at the screenshots. I will clean my code and then post it here, so that this can be included in a later official release of lazarus!

greatings!

FPC strikes once again :D


I could not run making these changes.
put your files please

rus.punk

  • Newbie
  • Posts: 4
Re: Applications for Windows 7 Embedded Compact
« Reply #9 on: April 03, 2016, 09:12:28 pm »
Put then please copy the necessary files

sergant

  • Newbie
  • Posts: 1
Re: Applications for Windows 7 Embedded Compact
« Reply #10 on: July 22, 2016, 01:32:20 pm »
Hello!
Lazarus 1.6, FRC 3.0.0.
 {$ifndef win32}{aygshell,}{$endif}
not compiled:
"Identifier not found: SHFindMenuBar"

 {$ifndef win32}aygshell,{$endif}
successfullyюю
Thank you.

felipemdc

  • Administrator
  • Hero Member
  • *
  • Posts: 3541
Re: Applications for Windows 7 Embedded Compact
« Reply #11 on: August 02, 2016, 06:38:55 am »
Why simply not copy the DLL aygshell to the same folder as your executable?

This library doesn't work in Windows CE 7?

beppe_1964

  • New member
  • *
  • Posts: 6
Re: Applications for Windows 7 Embedded Compact
« Reply #12 on: August 17, 2016, 05:57:55 pm »
which version of lazarus have you modified ? 1.6 or 1.44 ?

i tried to modify 1.6 + fpc 3.0.0 but not working

thanks Beppe

izio70

  • New member
  • *
  • Posts: 5
Re: Applications for Windows 7 Embedded Compact
« Reply #13 on: March 09, 2017, 08:10:05 pm »
modify 1.6 + fpc 3.0.0 not working
PLS HELP!!!

neopos

  • Newbie
  • Posts: 4
Re: Applications for Windows 7 Embedded Compact
« Reply #14 on: June 14, 2017, 11:09:27 am »
Any luck with this? Tried all the hints and suggestions shown but no luck.

I am using Lazarus 1.6 and lazarus-1.6.4-fpc-3.0.2-cross-arm-wince-win32. (on Windows 7 64 bit)

Tying to run a simple app on a Motorola MC3200 PDT with Windows CE7 using and ARM OMAP4 (Cortex A9) processor.
Getting EAccessViolation $00012708.

Previously running the same app on a Motorola MC3100 with Windows CE 6. No Problem.

Already spent a couple of days on this but no joy.
Any suggestions would be greatly appreciated.