OWLNext
7.0
Borland's Object Windows Library for the modern age
Toggle main menu visibility
Loading...
Searching...
No Matches
ipaddres.cpp
Go to the documentation of this file.
1
//----------------------------------------------------------------------------
2
// ObjectWindows
3
// Copyright (c) 1998 by Bidus Yura, All Rights Reserved
4
//
5
/// \file
6
/// Implementation of the TIPAddress class
7
//----------------------------------------------------------------------------
8
#include <
owl/pch.h
>
9
10
#include <
owl/ipaddres.h
>
11
12
13
namespace
owl
{
14
15
OWL_DIAGINFO
;
16
DIAG_DECLARE_GROUP
(OwlCommCtrl);
// Common Controls diagnostic group
17
18
//
19
//
20
//
21
TIPAddress::TIPAddress
(
TWindow
* parent,
int
id
,
int
x,
int
y,
int
w,
int
h,
22
TModule
* module)
23
:
24
TControl
(parent,id,
_T
(
""
),x,y,w,h,module)
25
{
26
InitializeCommonControls
(ICC_INTERNET_CLASSES);
27
}
28
29
30
//
31
//
32
//
33
TIPAddress::TIPAddress
(
TWindow
* parent,
int
resourceId,
TModule
* module)
34
:
35
TControl
(parent, resourceId, module)
36
{
37
InitializeCommonControls
(ICC_INTERNET_CLASSES);
38
}
39
40
//
41
/// Constructs a IP address object to encapsulate (alias) an existing control.
42
//
43
TIPAddress::TIPAddress
(
THandle
hWnd,
TModule
* module)
44
:
45
TControl
(hWnd, module)
46
{
47
InitializeCommonControls
(ICC_INTERNET_CLASSES);
48
}
49
50
//
51
//
52
//
53
TIPAddress::~TIPAddress
()
54
{
55
}
56
57
auto
TIPAddress::GetWindowClassName
() ->
TWindowClassName
58
{
59
return
TWindowClassName
{WC_IPADDRESS};
60
}
61
62
63
//
64
//
65
//
66
uint
67
TIPAddress::Transfer
(
void
* buffer,
TTransferDirection
direction)
68
{
69
if
(!buffer && direction !=
tdSizeData
)
return
0;
70
TIPAddressBits
* ipData =
static_cast<
TIPAddressBits
*
>
(buffer);
71
if
(direction ==
tdGetData
)
72
GetAddress
(*ipData);
73
else
if
(direction ==
tdSetData
)
74
SetAddress
(*ipData);
75
76
return
sizeof
(
TIPAddressBits
);
77
}
78
}
// OWL namespace
79
/* ========================================================================== */
owl::TControl::TControl
TControl(TWindow *parent, int id, LPCTSTR title, int x, int y, int w, int h, TModule *module=nullptr)
Invokes TWindow's constructor, passing it parent (parent window), title (caption text),...
Definition
control.cpp:43
owl::TIPAddressBits
Also used as transfer buffer.
Definition
ipaddres.h:32
owl::TIPAddress::TIPAddress
TIPAddress(TWindow *parent, int id, int x, int y, int w, int h, TModule *module=0)
Definition
ipaddres.cpp:21
owl::TIPAddress::~TIPAddress
~TIPAddress()
Definition
ipaddres.cpp:53
owl::TIPAddress::Transfer
uint Transfer(TIPAddressBits &address, TTransferDirection direction)
Safe overload.
Definition
ipaddres.h:86
owl::TIPAddress::SetAddress
void SetAddress(const TIPAddressBits &address)
Definition
ipaddres.h:117
owl::TIPAddress::GetWindowClassName
virtual auto GetWindowClassName() -> TWindowClassName
Definition
ipaddres.cpp:57
owl::TIPAddress::GetAddress
int GetAddress(TIPAddressBits &address) const
Definition
ipaddres.h:123
owl::TModule
ObjectWindows dynamic-link libraries (DLLs) construct an instance of TModule, which acts as an object...
Definition
module.h:78
owl::TWindowClassName
Type-safe encapsulation of a Windows class name, a union between ATOM and LPCTSTR.
Definition
module.h:50
owl::TWindow
TWindow, derived from TEventHandler and TStreamableBase, provides window-specific behavior and encaps...
Definition
window.h:414
owl::TWindow::THandle
HWND THandle
TWindow encapsulates an HWND.
Definition
window.h:418
_T
#define _T(x)
Definition
cygwin.h:51
owl::TTransferDirection
TTransferDirection
The TTransferDirection enum describes the constants that the transfer function uses to determine how ...
Definition
window.h:92
owl::tdSizeData
@ tdSizeData
Return the size of data transferred by the class.
Definition
window.h:95
owl::tdSetData
@ tdSetData
Set data from the buffer into the window.
Definition
window.h:94
owl::tdGetData
@ tdGetData
Get data from the window into the buffer.
Definition
window.h:93
pch.h
ipaddres.h
owl
Object Windows Library (OWLNext Core).
Definition
animctrl.h:22
owl::InitializeCommonControls
void InitializeCommonControls(uint controlFlags)
Wrapper for the Windows API function InitCommmonControlsEx.
Definition
commctrl.cpp:19
owl::OWL_DIAGINFO
OWL_DIAGINFO
Definition
animctrl.cpp:14
owl::uint
unsigned int uint
Definition
number.h:25
owl::DIAG_DECLARE_GROUP
DIAG_DECLARE_GROUP(OwlThread)
source
owlcore
ipaddres.cpp
Generated by
1.18.0