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 4141; idFrom : uptr
4242; code : i32
4343; }
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)
4460; }
4561
4662; If you're NOT using v2.1-alpha.9 or later, delete the section ABOVE.
@@ -264,10 +280,7 @@ class _BtnColor extends Gui.Button
264280 static DC_BRUSH := GetStockObject(18 )
265281 static DC_PEN := GetStockObject(19 )
266282
267- if IsSet(StructFromPtr)
268- try lpnmCD := StructFromPtr(NMCUSTOMDRAWINFO, lParam)
269-
270- lpnmCD := lpnmCD ?? NMCUSTOMDRAWINFO(lParam)
283+ lpnmCD := NMCUSTOMDRAWINFO(lParam)
271284
272285 if (lpnmCD.hdr.code ! = NM_CUSTOMDRAW || lpnmCD.hdr.hwndFrom ! = gCtrl.hwnd)
273286 return CDRF_DODEFAULT
You can’t perform that action at this time.
0 commit comments