Implements RemoveProp in wince

git-svn-id: trunk@25203 -
This commit is contained in:
sekelsenmat 2010-05-05 07:49:44 +00:00
parent 99fd4180ad
commit 5854a0f095
3 changed files with 21 additions and 14 deletions

View File

@ -22,7 +22,7 @@ unit AllLCLUnits;
{ At least 2.4.0 is required, except for wince which supports fpc 2.2.0+ too } { At least 2.4.0 is required, except for wince which supports fpc 2.2.0+ too }
{$ifdef Wince} {$ifdef Wince}
{$if defined(ver1) or (defined(ver2) and (fpc_release<2))}// or (defined(ver2_2) and (fpc_patch<4))} {$if defined(ver1) or (defined(ver2) and (fpc_release<2))}
{$fatal Lazarus for WinCE requires at least FPC 2.2.0} {$fatal Lazarus for WinCE requires at least FPC 2.2.0}
{$endif} {$endif}
{$else} {$else}

View File

@ -2460,18 +2460,6 @@ begin
Result := Boolean(Windows.RectVisible(DC, LPRECT(@ARect)^)); Result := Boolean(Windows.RectVisible(DC, LPRECT(@ARect)^));
end; end;
{------------------------------------------------------------------------------
Function: RemoveProp
Params: Handle: Handle of the object
Str: Name of the property to remove
Returns: The handle of the property (0=failure)
------------------------------------------------------------------------------}
{function TWinCEWidgetSet.RemoveProp(Handle: hwnd; Str: PChar): THandle;
begin
Result:=inherited RemoveProp(Handle, Str);
end;}
{function TWinCEWidgetSet.RegroupMenuItem(hndMenu: HMENU; GroupIndex: integer {function TWinCEWidgetSet.RegroupMenuItem(hndMenu: HMENU; GroupIndex: integer
): Boolean; ): Boolean;
begin begin
@ -2506,6 +2494,25 @@ begin
Assert(False, Format('Trace:< [TWinCEWidgetSet.ReleaseDC] DC:0x%x', [DC])); Assert(False, Format('Trace:< [TWinCEWidgetSet.ReleaseDC] DC:0x%x', [DC]));
end; end;
{------------------------------------------------------------------------------
Function: RemoveProp
Params: Handle: Handle of the object
Str: Name of the property to remove
Returns: The handle of the property (0=failure)
------------------------------------------------------------------------------}
function TWinCEWidgetSet.RemoveProp(Handle: hwnd; Str: PChar): THandle;
var
WideStr: widestring;
begin
WideStr := UTF8Decode(String(str));
{$ifdef win32}
Result := THandle(Windows.RemovePropW(Handle, PWideChar(WideStr)));
{$else}
Result := THandle(Windows.RemoveProp(Handle, PWideChar(WideStr)));
{$endif}
end;
{------------------------------------------------------------------------------ {------------------------------------------------------------------------------
Method: RestoreDC Method: RestoreDC
Params: DC - handle of device context Params: DC - handle of device context

View File

@ -184,7 +184,7 @@ function RedrawWindow(Wnd: HWND; lprcUpdate: PRECT; hrgnUpdate: HRGN; flags: UIN
{function RegroupMenuItem(hndMenu: HMENU; GroupIndex: integer): Boolean; override;} {function RegroupMenuItem(hndMenu: HMENU; GroupIndex: integer): Boolean; override;}
function ReleaseCapture : Boolean; override; function ReleaseCapture : Boolean; override;
function ReleaseDC(Window: HWND; DC: HDC): Integer; override; function ReleaseDC(Window: HWND; DC: HDC): Integer; override;
//function RemoveProp(Handle: hwnd; Str: PChar): THandle; override; function RemoveProp(Handle: hwnd; Str: PChar): THandle; override;
function RestoreDC(DC: HDC; SavedDC: Integer): Boolean; override; function RestoreDC(DC: HDC; SavedDC: Integer): Boolean; override;
function RoundRect(DC : hDC; X1, Y1, X2, Y2: Integer; RX,RY : Integer): Boolean; override; function RoundRect(DC : hDC; X1, Y1, X2, Y2: Integer; RX,RY : Integer): Boolean; override;