Recent

Author Topic: Some examples for WinCE 5.0 by KOL-CE  (Read 12297 times)

oranke

  • New member
  • *
  • Posts: 8
    • Really poor developer...
Some examples for WinCE 5.0 by KOL-CE
« on: January 28, 2009, 08:16:04 am »
1. Fix for SIP area

I made application for wince 5.0 core and it has SIP area like this.

(http://forum.lazarus.freepascal.org/index.php?action=dlattach;topic=6221.0;attach=21;image)

Open KOL.pas and goto line number 33,847. (KOL-CE ver 2.80.3)

  - or 2.80.2 : Line No. 33,845
  - or 2.80.1 : Line No. 33,837


Find code


       if CePlatform <> cpSmartphone then begin


and Fix it to


       if CePlatform = cpPocketPC then begin


The result is

(http://forum.lazarus.freepascal.org/index.php?action=dlattach;topic=6221.0;attach=23;image)


2. Command bar API

Add commctrl in uses.


uses
  commctrl;



Create "OnFormCreate" event of KOLForm and write code.


procedure TForm1.KOLForm1FormCreate(Sender: PObj);
var
  CmdBar: THandle;
  MainMenu: HMENU;
begin
  Form.CreateWindow;

  // Try Command bar
  CmdBar := CommandBar_Create(HInstance, Form.Handle, 1000);
  CommandBar_AddAdornments(CmdBar, 1, 0); // ? and X Buttons

  MainMenu:= CreateMenu();
  AppendMenu(MainMenu, MF_STRING, 1, '&File');
  AppendMenu(MainMenu, MF_STRING, 2, '&Edit');

  CommandBar_InsertMenubarEx(CmdBar, 0, Pointer(MainMenu), 0);
end;


and the result is

(http://forum.lazarus.freepascal.org/index.php?action=dlattach;topic=6221.0;attach=25;image)

Is it goot for you? :)

« Last Edit: January 28, 2009, 01:25:33 pm by oranke »

yuriy_sydorov

  • Full Member
  • ***
  • Posts: 158
Re: Some examples for WinCE 5.0 by KOL-CE
« Reply #1 on: January 30, 2009, 04:20:46 pm »
Please post patches on KOL-CE project page on sourceforge: http://sourceforge.net/projects/kol-ce

jabu

  • New Member
  • *
  • Posts: 14
Re: Some examples for WinCE 5.0 by KOL-CE
« Reply #2 on: January 31, 2009, 12:03:02 am »
To oranke

please show little example how to process menu click action in your example with CommandBarAPI.

Regards

jabu

oranke

  • New member
  • *
  • Posts: 8
    • Really poor developer...
Re: Some examples for WinCE 5.0 by KOL-CE
« Reply #3 on: January 31, 2009, 02:41:43 pm »
Please post patches on KOL-CE project page on sourceforge: http://sourceforge.net/projects/kol-ce

I create new acount for sourceforge.net and post a very very little patch just now :)

and yury, I allways thank you for your great library  ;)

I hope god may blesses you  ;D


isaac_cm

  • New Member
  • *
  • Posts: 43
Re: Some examples for WinCE 5.0 by KOL-CE
« Reply #4 on: September 29, 2009, 03:52:46 pm »
I have similar problem but I dont use KOL-CE, is there a fix for this ?

 

TinyPortal © 2005-2018