Hello World
Lets start with getting neoWidgets to run at all. The following code is the most barebones program which just starts a message loop and creates a window with some text in it. This should be a good example for how we do things here.
using namespace neo;
class HelloNeo :
public Window
{
public:
HelloNeo()
{
Bind(WM_DESTROY, &HelloNeo::OnDestroy, this);
.InnerSize(300, 300)
.Text(L"Hello World!"));
Show();
}
{
PostQuitMessage(0);
}
};
int WINAPI WinMain(HINSTANCE instance, HINSTANCE prevInstance, LPSTR cmdLine, int cmdShow)
{
InitCommonControls();
HelloNeo main;
MSG msg;
while(GetMessage(&msg, 0, 0, 0))
{
TranslateMessage(&msg);
DispatchMessage(&msg);
}
return msg.wParam;
}