Forum > Windows CE

Applications for Windows 7 Embedded Compact

(1/5) > >>

SonnyBoyXXl:
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:
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  [+][-]window.onload = function(){var x1 = document.getElementById("main_content_section"); if (x1) { var x = document.getElementsByClassName("geshi");for (var i = 0; i < x.length; i++) { x[i].style.maxHeight='none'; x[i].style.height = Math.min(x[i].clientHeight+15,306)+'px'; x[i].style.resize = "vertical";}};} ---{$DEFINE WINCE7}
comment the reference to aygshell out

--- Code: Pascal  [+][-]window.onload = function(){var x1 = document.getElementById("main_content_section"); if (x1) { var x = document.getElementsByClassName("geshi");for (var i = 0; i < x.length; i++) { x[i].style.maxHeight='none'; x[i].style.height = Math.min(x[i].clientHeight+15,306)+'px'; x[i].style.resize = "vertical";}};} ---{$ifndef win32}{aygshell,}{$endif}
in the procedure CeSetMenu make the following change:

--- Code: Pascal  [+][-]window.onload = function(){var x1 = document.getElementById("main_content_section"); if (x1) { var x = document.getElementsByClassName("geshi");for (var i = 0; i < x.length; i++) { x[i].style.maxHeight='none'; x[i].style.height = Math.min(x[i].clientHeight+15,306)+'px'; x[i].style.resize = "vertical";}};} ---{$IFNDEF WINCE7}  mbi: SHMENUBARINFO;  {$ENDIF}and out comment the whole procedure:


--- Code: Pascal  [+][-]window.onload = function(){var x1 = document.getElementById("main_content_section"); if (x1) { var x = document.getElementsByClassName("geshi");for (var i = 0; i < x.length; i++) { x[i].style.maxHeight='none'; x[i].style.height = Math.min(x[i].clientHeight+15,306)+'px'; x[i].style.resize = "vertical";}};} ---begin(*  {$ifdef VerboseWinCEMenu}...//DrawMenuBar(wnd);*)end; 

In the file wincecallback.inc change as follow:

Add again a definition of
--- Code: Pascal  [+][-]window.onload = function(){var x1 = document.getElementById("main_content_section"); if (x1) { var x = document.getElementsByClassName("geshi");for (var i = 0; i < x.length; i++) { x[i].style.maxHeight='none'; x[i].style.height = Math.min(x[i].clientHeight+15,306)+'px'; x[i].style.resize = "vertical";}};} ---  {$DEFINE WINCE7} 
modify around line 207

--- Code: Pascal  [+][-]window.onload = function(){var x1 = document.getElementById("main_content_section"); if (x1) { var x = document.getElementsByClassName("geshi");for (var i = 0; i < x.length; i++) { x[i].style.maxHeight='none'; x[i].style.height = Math.min(x[i].clientHeight+15,306)+'px'; x[i].style.resize = "vertical";}};} ---{$ifndef win32}  {$IFNDEF WINCE7}  Info: SHRGINFO; // used by SHRecognizeGesture in WM_LBUTTONDOWN  {$endif}  {$endif}
also around line 257


--- Code: Pascal  [+][-]window.onload = function(){var x1 = document.getElementById("main_content_section"); if (x1) { var x = document.getElementsByClassName("geshi");for (var i = 0; i < x.length; i++) { x[i].style.maxHeight='none'; x[i].style.height = Math.min(x[i].clientHeight+15,306)+'px'; x[i].style.resize = "vertical";}};} ---if PopupMenu <> nil then //processing popup menu    begin      WindowInfo^.PopupMenu := nil;      // LOWORD(WParam) = MENUITEM_ID      Result := PopupMenu.FindItem(LOWORD(WParam), fkCommand);    end;    {$ifndef win32}    {$ifndef WinCE7}    if Result = nil then //if Result is still nil, process main menu    begin      MainMenuHandle := SHFindMenuBar(Window);
and


--- Code: Pascal  [+][-]window.onload = function(){var x1 = document.getElementById("main_content_section"); if (x1) { var x = document.getElementsByClassName("geshi");for (var i = 0; i < x.length; i++) { x[i].style.maxHeight='none'; x[i].style.height = Math.min(x[i].clientHeight+15,306)+'px'; x[i].style.resize = "vertical";}};} ---WM_LBUTTONDOWN:    begin      {$ifndef win32}      {$IFNDEF WINCE7}      // Gesture recognition process to enable popup menus.      if (lWinControl.PopupMenu <> nil) then      begin
close the $IFNDEF WINCE7 with
--- Code: Pascal  [+][-]window.onload = function(){var x1 = document.getElementById("main_content_section"); if (x1) { var x = document.getElementsByClassName("geshi");for (var i = 0; i < x.length; i++) { x[i].style.maxHeight='none'; x[i].style.height = Math.min(x[i].clientHeight+15,306)+'px'; x[i].style.resize = "vertical";}};} ---{$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:

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:
Nice work Sonny.. KUDOZ!

rus.punk:
I need help to build a Windows CE 7.0 !!!

Navigation

[0] Message Index

[#] Next page

Go to full version