mirror of
https://github.com/irungentoo/toxcore.git
synced 2024-03-22 13:30:51 +08:00
33 lines
543 B
C++
33 lines
543 B
C++
|
#include <wx\wx.h>
|
||
|
#include "home\Home.h"
|
||
|
|
||
|
class Tox : public wxApp
|
||
|
{
|
||
|
public:
|
||
|
virtual bool OnInit();
|
||
|
};
|
||
|
|
||
|
|
||
|
|
||
|
bool Tox::OnInit()
|
||
|
{
|
||
|
Home *home = new Home(wxT("Tox"));
|
||
|
home->Show(true);
|
||
|
|
||
|
return true;
|
||
|
}
|
||
|
|
||
|
int WINAPI wWinMain(HINSTANCE hInstance, HINSTANCE prevInstance, LPWSTR lpCmdLine, int nShowCmd)
|
||
|
{
|
||
|
char *buf;
|
||
|
|
||
|
buf = new char[wcslen(lpCmdLine) + 1];
|
||
|
|
||
|
wcstombs(buf, lpCmdLine, wcslen(lpCmdLine) +1);
|
||
|
|
||
|
wxApp::SetInstance( new Tox());
|
||
|
|
||
|
wxEntry(hInstance, prevInstance, buf, nShowCmd);
|
||
|
|
||
|
wxEntryCleanup();
|
||
|
}
|