Skip to content

Commit 5da82dc

Browse files
committed
Updates control-properties/using-macros-to-getset-properties.md
Auto commit by GitBook Editor
1 parent 72c1d50 commit 5da82dc

File tree

1 file changed

+1
-18
lines changed

1 file changed

+1
-18
lines changed

control-properties/using-macros-to-getset-properties.md

Lines changed: 1 addition & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -17,14 +17,6 @@ The macros then called the [GetWindowLong](https://msdn.microsoft.com/en-us/libr
1717
Here is and example of some macros used to get and set the various 'properties' as defined above as constants:
1818

1919
```x86asm
20-
_GetFont MACRO hControl:REQ
21-
Invoke GetWindowLong, hControl, @ControlFont
22-
ENDM
23-
24-
_SetFont MACRO hControl:REQ, ptrControlData:REQ
25-
Invoke SetWindowLong, hControl, @ControlFont, ptrControlData
26-
ENDM
27-
2820
_GetMouseOverFlag MACRO hControl:REQ
2921
Invoke GetWindowLong, hControl, @MouseOverFlag
3022
ENDM
@@ -45,15 +37,6 @@ ENDM
4537
The macros could then be placed in code and used like so:
4638

4739
```x86asm
48-
...
49-
_GetFont hControl
50-
mov hFont, eax
51-
...
52-
53-
...
54-
_SetFont hControl, hFont
55-
...
56-
5740
...
5841
_SetMouseOverFlag hControl, TRUE
5942
...
@@ -64,7 +47,7 @@ mov bState, eax
6447
...
6548
```
6649

67-
Using macros to get and set our control's properties is still a valid technique if the amount of data store for these properties is less than 40 bytes \(see the [Control Properties](/control-properties.md) section and [here](https://msdn.microsoft.com/en-us/library/ms633574%28VS.85%29.aspx#extra_window_memory) for why\).
50+
Using macros to get and set our control's properties is still a valid technique if the amount of data store for these properties is less than 40 bytes \(see the [Control Properties](/control-properties.md) section and [here](https://msdn.microsoft.com/en-us/library/ms633574%28VS.85%29.aspx#extra_window_memory) for why\).
6851

6952
It is also possible to make use of the [GetProp](https://msdn.microsoft.com/en-us/library/windows/desktop/ms633564%28v=vs.85%29.aspx) / [SetProp](https://msdn.microsoft.com/en-us/library/windows/desktop/ms633568%28v=vs.85%29.aspx) api calls, which make use of [integer atoms](https://msdn.microsoft.com/en-us/library/windows/desktop/ms649053%28v=vs.85%29.aspx#_win32_Integer_Atoms) - which is faster than [GetProp](https://msdn.microsoft.com/en-us/library/windows/desktop/ms633564%28v=vs.85%29.aspx) / [SetProp](https://msdn.microsoft.com/en-us/library/windows/desktop/ms633568%28v=vs.85%29.aspx) with a [string atoms](https://msdn.microsoft.com/en-us/library/windows/desktop/ms649053%28v=vs.85%29.aspx#_win32_String_Atoms), but use of [GetProp](https://msdn.microsoft.com/en-us/library/windows/desktop/ms633564%28v=vs.85%29.aspx) / [SetProp](https://msdn.microsoft.com/en-us/library/windows/desktop/ms633568%28v=vs.85%29.aspx) with both atoms types are still slower than [GetWindowLong](https://msdn.microsoft.com/en-us/library/windows/desktop/ms633584%28v=vs.85%29.aspx) / [SetWindowLong](https://msdn.microsoft.com/en-us/library/windows/desktop/ms633591%28v=vs.85%29.aspx) as far as I am aware.
7053

0 commit comments

Comments
 (0)