+ void setTimer(UINT interval, std::function<void()> cb)\r
+ {\r
+ SetTimer(this->hwnd, timers.size() + 1000, interval, [](HWND hwnd, UINT uMsg, UINT_PTR uIdEvent, DWORD dwTime) {\r
+ Window *window = (Window*)GetWindowLongPtrA(hwnd, 0);\r
+ if (window == nullptr)\r
+ return;\r
+\r
+ window->timers[uIdEvent-1000].f();\r
+ });\r
+ Timer t;\r
+ t.f = cb;\r
+ timers.push_back(t);\r
+ }\r