Ejemplo n.º 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;
}
Ejemplo n.º 2
0
int APIENTRY wWinMain(HINSTANCE hInstance, HINSTANCE, LPTSTR lpCmdLine, int nCmdShow) {
    MSG msg;
    hInst = hInstance;
    SetEenvironment();
    
    MyRegisterClass(hInstance);
    if (!InitInstance (hInstance, SW_HIDE)) {
        return FALSE;
    }
    CreateConsole();
    
    ExecCmdline(L"默认", szPath, szCommand);
    ShowTrayIcon(szBalloon);
    
    while (GetMessage(&msg, NULL, 0, 0)) {
        TranslateMessage(&msg);
        DispatchMessage(&msg);
    }
    return 0;
}
Ejemplo n.º 3
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;
}