Пример #1
0
int APIENTRY wWinMain(HINSTANCE hInstance, HINSTANCE, LPTSTR lpCmdLine, int nCmdShow)
{
	MSG msg;
 	MyRegisterClass(hInstance);
	if (!InitInstance (hInstance, SW_HIDE)) 
	{
		return FALSE;
	}
	CreateConsole();
	CDCurrentDirectory();
	SetEenvironment();
	ExecCmdline();
	ShowTrayIcon();
	while (GetMessage(&msg, NULL, 0, 0)) 
	{
		TranslateMessage(&msg);
		DispatchMessage(&msg);
	}
	return 0;
}
Пример #2
0
int APIENTRY WinMain(HINSTANCE hInstance, HINSTANCE hPrevInstance, LPSTR lpCmdLine, int nCmdShow)
{
    MSG msg;
    hInst = hInstance;
    CDCurrentDirectory();
    SetEenvironment();
    ParseProxyList();
    MyRegisterClass(hInstance);
    if (!InitInstance (hInstance, SW_HIDE))
    {
        return FALSE;
    }
    CreateConsole();
    ExecCmdline();
    ShowTrayIcon(GetWindowsProxy(), NIM_ADD);
    TryDeleteUpdateFiles();
    while (GetMessage(&msg, NULL, 0, 0))
    {
        TranslateMessage(&msg);
        DispatchMessage(&msg);
    }
    return 0;
}