Создание нового компонента на базе элементов управления из библиотеки ComCtl32
(Message.CharCode = VK_TAB) and (GetKeyState(VK_CONTROL) < 0) then
begin
if GetKeyState (VK_SHIFT) 00 then
CurrentField: = (CurrentField – 1+4) mod 4
else
CurrentField: = (CurrentField + 1) ir.oci 4; Message.Result: = 1;
end else
inherited; end; }
function TCustomlPEdit.GetIP(Index: Integer): Byte;
begin
SendMessage
(Handle,IPM_GETADDRESS,0,longint(@FipAddress));
case Index of
1: Result: = FIRST_IPADDRESS(FipAddress);
2: Result: = SECOND_IPADDRESS(FipAddress);
3: Result: = THIRD_IPADDRESS(FipAddress);
4: Result: = FOURTH_IPADDRESS(FipAddress); else Result: = 0;
end;
end;
procedure TCustomlPEdit.SetIP(Index: Integer; Value: Byte);
begin
case Index of
1: FIPAddress: = FIPAddress AND $FFFFFF or DWORD(Value) shl 24;
2: FIPAddress: = FIPAddress AND $FFOOFFFF or DWORD(Value) shl 16;
3: FIPAddress: = FIPAddress AND $FFFFOOFF or DWORD(Value) shl 8;
4: FIPAddress: = FIPAddress AND $FFFFFFOO or DWORD(Value);
else Exit;
end;
SendMessage(Handle, IPM_SETADDRESS, 0, FIPAddress);
end;
function TCustomlPEdit.GetMinIP(Index: Integer): Byte; begin if (Index<0) or (Index>3) then
Result: = 0
else
Result: = LoByte(FIPLimits[Index]);
end;
procedure TCustomlPEdit.SetMinIP(Index: Integer; Value: Byte);
begin
if (Index<0) or (Index>3)
then Exit;
FIPLimits[Index]: = MAKEIPRANGE(HiByte(FIPLimits[Index]), Value);
SendMessage(Handle, IPM_SETRANGE, Index, FIPLimits[Index]);
end;
function TCustomlPEdit.GetMaxIP(Index: Integer): Byte; begin if (Index<0) or (Index>3)
then
Result: = 0
else
Result: = HiByte(FIPLimits[Index]);
end;
procedure TCustomlPEdit.SetMaxIP(Index: Integer; Value: Byte);
begin
if (Index<0) or (Index>3) then Exit;
FIPLimits[Index]: = MAKEIPRANGE(Value, LoByte(FIPLimits[Index]));
SendMessage(Handle, IPM_SETRANGE, Index, FIPLimits[Index]);
end;
procedure TCustomlPEdit.Clear,
begin
SendMessage(Handle, IPM_CLEARADDRESS, 0, 0);
end;