Work at SourceForge, help us to make it a better place! We have an immediate need for a Support Technician in our San Francisco or Denver office.

Close

#116 hide log window for service

open
nobody
None
5
2010-01-27
2009-11-10
daemonui
No

the service doesn't start with hidden log-window
--service should imply start minimized
(at least, it should automatically minimize)

Is suggest to modify w32log.c(252): BOOL InitLogWindow(void):
replace g_hwndLogFrame = CreateLogWindow(g_hInstance, g_nCmdShow);
by g_hwndLogFrame = CreateLogWindow(g_hInstance, bRunAsService ? SW_HIDE : g_nCmdShow);

or add this to WinMain right after g_nCmdShow = nCmdShow, and patch the service commandline to --service --tray;

int argc_pos;
for(argc_pos=1, argc_pos<__argc; argc_pos++)
{
if (strcmp(__argv[argc_pos], "--service" ) == 0 // serv
|| strcmp(__argv[argc_pos], "--tray" ) == 0
{
g_nCmdShow = SW_SHOWMINNOACTIVE; // used in InitLogWindow
break;
}
}

this would also add commandline option --tray solving a different request

Discussion

  • Fabian Keil
    Fabian Keil
    2010-01-27

    Thanks a lot for the suggestions.

    I agree that this would be an improvement and will try to look into this after the next release.

     
  • Fabian Keil
    Fabian Keil
    2010-01-27

    • labels: 332885 -->