1234567891011121314151617181920212223242526272829303132333435363738394041 |
- // TestApp1.cpp : Defines the entry point for the application.
- //
-
- #ifdef _WIN32
- #include "Win32/stdafx.h"
- #endif
-
- #include <DK.h>
- #include <functional>
- class TestApp1 : public DKApplication
- {
- public:
-
- };
-
- #ifdef _WIN32
- int APIENTRY wWinMain(_In_ HINSTANCE hInstance,
- _In_opt_ HINSTANCE hPrevInstance,
- _In_ LPWSTR lpCmdLine,
- _In_ int nCmdShow)
- #else
- int main(int argc, const char * argv[])
- #endif
- {
- TestApp1 app;
- app.EventLoop()->Post(DKFunction([&]()
- {
- DKLog("test1");
- })->Invocation(), 2);
- app.EventLoop()->Post(DKFunction([&]()
- {
- DKLog("test2");
- })->Invocation(), 4);
- app.EventLoop()->Post(DKFunction([&]()
- {
- DKLog("Terminate!!");
- app.Terminate(0);
- })->Invocation(), 6);
-
- return app.Run();
- }
|