File tree Expand file tree Collapse file tree 1 file changed +17
-4
lines changed Expand file tree Collapse file tree 1 file changed +17
-4
lines changed Original file line number Diff line number Diff line change 41
41
; idFrom : uptr
42
42
; code : i32
43
43
; }
44
+
45
+ ; __New(ptr?) {
46
+ ; if (ptr??0) {
47
+ ; scc := StructFromPtr(NMCUSTOMDRAWINFO, ptr?)
48
+ ; for p, v in scc.Props() {
49
+ ; if IsObject(v) {
50
+ ; for p2, v2 in v.Props()
51
+ ; try this.%p%.%p2% := v2
52
+ ; } else
53
+ ; try this.%p% := v
54
+ ; }
55
+ ; }
56
+ ; }
57
+
58
+ ; ptr => ObjGetDataPtr(this)
59
+ ; size => ObjGetDataSize(this)
44
60
; }
45
61
46
62
; If you're NOT using v2.1-alpha.9 or later, delete the section ABOVE.
@@ -264,10 +280,7 @@ class _BtnColor extends Gui.Button
264
280
static DC_BRUSH := GetStockObject(18 )
265
281
static DC_PEN := GetStockObject(19 )
266
282
267
- if IsSet(StructFromPtr)
268
- try lpnmCD := StructFromPtr(NMCUSTOMDRAWINFO, lParam)
269
-
270
- lpnmCD := lpnmCD ?? NMCUSTOMDRAWINFO(lParam)
283
+ lpnmCD := NMCUSTOMDRAWINFO(lParam)
271
284
272
285
if (lpnmCD.hdr.code ! = NM_CUSTOMDRAW || lpnmCD.hdr.hwndFrom ! = gCtrl.hwnd)
273
286
return CDRF_DODEFAULT
You can’t perform that action at this time.
0 commit comments