
Dialog-based app, always minimized
Well, if you want a program that runs in the system tray, there is an
excellent class for this at www.codeguru.com. But to do this, you start
with an SDI application and strip out the CDoc and CView classes.
If you want to stick with the minimize dialog idea, try making the dialog
modeless. Create the dialog but keep it invisible, minimize it, and then
show it. There is code for modeless dialogs all over the place, including
www.codeguru.com and VC online docs.
Quote:
>I'm creating a server-only application that I'd like to use the
dialog-based
>AppWizard for. I want to start the application invisible (actually as a
>system tray icon) and it should stay that way for its lifetime. I added a
>NOTIFYICONDATA member to the CDialog-based class and init it during
>OnInitDialog(). I've cleared the Visible checkbox from the dialog
>Properties - More Styles tab.
>From ::OnInitDialog() I've tried:
>ShowWindow( SW_MINIMIZE );
> PostMessage( WM_SIZE, SW_MINIMIZE, 0L);
>Neither work - the main dialog shows up as visible. Should this be located
>in a different event handler? Sugestions?