xtd 0.2.0
Loading...
Searching...
No Matches
window_definitions.hpp
Go to the documentation of this file.
1
4#pragma once
6#if !defined(__XTD_FORMS_NATIVE_LIBRARY__)
7#error "Do not include this file: Internal use only"
8#endif
10
11#include "../window_messages.hpp"
12
13#if !defined(HFILE_ERROR)
14struct HWND__ {};
15typedef struct HWND__* HWND;
16
17struct NMHDR {
18 HWND hwndFrom;
19 xtd::uintptr idFrom;
20 xtd::uint32 code;
21};
22
23struct POINT {
24 xtd::int32 x;
25 xtd::int32 y;
26};
27
28struct HELPINFO {
29 xtd::uint32 cbSize;
30 xtd::int32 iContextType;
31 xtd::int32 iCtrlId;
32 HWND hItemHandle;
33 xtd::uintptr dwContextId;
34 POINT MousePos;
35};
36
37template<typename type1_t, typename type2_t>
38xtd::uint16 MAKEWORD(type1_t a, type2_t b) {
39 return static_cast<xtd::uint16>((static_cast<xtd::uint16>((static_cast<xtd::uint32>(a)) & 0xff)) | (static_cast<xtd::uint16>(static_cast<xtd::uint16>((static_cast<xtd::uint32>(b)) & 0xff))) << 8);
40}
41
42template<typename type1_t, typename type2_t>
43xtd::uint32 MAKELONG(type1_t a, type2_t b) {
44 return static_cast<xtd::uint32>((static_cast<xtd::uint16>((static_cast<xtd::uint32>(a)) & 0xffff)) | (static_cast<xtd::uint32>(static_cast<xtd::uint16>((static_cast<xtd::uint32>(b)) & 0xffff))) << 16);
45}
46
47template<typename type_t>
48inline xtd::uint16 LOWORD(type_t value) {
49 return static_cast<xtd::uint16>(static_cast<xtd::uint32>(value) & 0xFFFF);
50}
51
52template<typename type_t>
53inline xtd::uint16 HIWORD(type_t value) {
54 return static_cast<xtd::uint16>((static_cast<xtd::uint32>(value) >> 16) & 0xFFFF);
55}
56
57template<typename type_t>
58inline xtd::uint16 LOBYTE(type_t value) {
59 return static_cast<xtd::byte>(static_cast<xtd::uint32>(value) & 0xFF);
60}
61
62template<typename type_t>
63inline xtd::byte HIBYTE(type_t value) {
64 return static_cast<xtd::byte>((static_cast<xtd::uint32>(value) >> 8) & 0xFF);
65}
66#endif
int32_t int32
Represents a 32-bit signed integer.
Definition int32.hpp:23
uint32_t uint32
Represents a 32-bit unsigned integer.
Definition uint32.hpp:23
uintmax_t uintptr
Represent a pointer or a handle.
Definition uintptr.hpp:23
uint8_t byte
Represents a 8-bit unsigned integer.
Definition byte.hpp:23
uint16_t uint16
Represents a 16-bit unsigned integer.
Definition uint16.hpp:23
@ a
The A key.
@ b
The B key.
Definition window_definitions.hpp:28
Definition window_definitions.hpp:14
Definition window_definitions.hpp:17
Definition window_definitions.hpp:23