view dwtestoo.cpp @ 2864:939fbceec13f

Win: Add support for building the C++ dwtestoo with Visual C. Need to use dwmain() macro instead of standard main() entrypoint for Windows. Had to move the _dw_convertargs() definition outside of the dwmain() macro. The macro can be called from C++ code changing the function definition.
author bsmith@81767d24-ef19-dc11-ae90-00e081727c95
date Sat, 17 Dec 2022 01:50:26 +0000
parents ef7a414f9b71
children fd32dce7fecd
line wrap: on
line source

#include <dw.hpp>

class MyWindow : public DW::Window
{
public:
  MyWindow();
};

MyWindow::MyWindow()
{
  SetText("Basic application");
  SetSize(200, 200);
}

int dwmain(int argc, char* argv[])
{
  DW::App *app = new DW::App(argc, argv, "org.dbsoft.dwindows.dwtestoo");
  MyWindow *window = new MyWindow();

  window->Show();

  app->Main();
  app->Exit(0);

  return 0;
}