1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74
|
{ $Id: wincewsgrids.pp 23636 2010-02-05 07:53:33Z paul $}
{
*****************************************************************************
* WinCEWSGrids.pp *
* --------------- *
* *
* *
*****************************************************************************
*****************************************************************************
This file is part of the Lazarus Component Library (LCL)
See the file COPYING.modifiedLGPL.txt, included in this distribution,
for details about the license.
*****************************************************************************
}
unit WinCEWSGrids;
{$mode objfpc}{$H+}
interface
uses
// RTL, FCL
Windows,
// LCL
LCLType, LazUTF8, Controls,
// Widgetset
WSGrids, WinCEWSControls, WinCEInt;
type
{ TWinCEWSCustomGrid }
TWinCEWSCustomGrid = class(TWSCustomGrid)
published
class function CreateHandle(const AWinControl: TWinControl;
const AParams: TCreateParams): TLCLIntfHandle; override;
// class procedure SendCharToEditor(AEditor:TWinControl; Ch: TUTF8Char); override;
end;
implementation
{ TWinCEWSCustomGrid }
// We need to implement this to remove WS_VSCROLL and WS_HSCROLL,
// which don't do anything useful under WinCE. The behavior changes
// according to platform and is somewhat bad. Probably substitute with
// adding a TScrollBar. See here:
// http://bugs.freepascal.org/view.php?id=16576
// http://social.msdn.microsoft.com/forums/en-US/vssmartdevicesnative/thread/af5813e7-236e-4a06-bda9-945d6f88e3c4/
class function TWinCEWSCustomGrid.CreateHandle(const AWinControl: TWinControl;
const AParams: TCreateParams): TLCLIntfHandle;
var
Params: TCreateWindowExParams;
begin
{$ifdef VerboseWinCE}
DebugLn(' TWinCEWSWinControl.CreateHandle ');
{$endif}
// general initialization of Params
PrepareCreateWindow(AWinControl, AParams, Params);
// customization of Params
with Params do
begin
pClassName := @ClsName;
WindowTitle := StrCaption;
SubClassWndProc := nil;
Flags := (Flags and not WS_VSCROLL) and not WS_HSCROLL;
end;
// create window
FinishCreateWindow(AWinControl, Params, false);
Result := Params.Window;
end;
end.
|