Re:hidden dialog
I'm using Shell_NotifyIcon. I've got the tray icon working fine. The
problem is that I want the tray icon to be the only thing that starts (from
the user's perspective), but the tray icon needs a window with which to
interface. That window is my main dialog. So I need the main dialog to
start first, but not to show itself. Currently, CMainApp::InitInstance()
ends with:
INT_PTR nResponse = dlg.DoModal();
The system tray icon is actually set up from within the OnInitDialog()
function in the dialog. So I need the dialog to be created and initialized,
and then go into its message loop without ever becoming visible. Is there
some combination of method calls and/or flags that can produce that effect?
Thanks,
Chris
"David Crow [MCSD]" <
david.no.spam.crow@pbsnow.no.spam.com>wrote in message
Quote
Look at Shell_NotifyIcon().
"Chris Ellis" <chriseAtStompsoftDotCom>wrote in message
news:euInxp9UEHA.1164@tk2msftngp13.phx.gbl...
>Hi,
>
>I am working on an MFC application created by the app wizard as a
dialog
>application. I have put a tray icon down in the system tray and I would
>like the main dialog to only appear based on interaction with the tray
icon.
>I need the dialog to be created and running, but not to show itself at
all
>(not even flash, preferably). In CMainApp::InitInstance(), it creates
the
>dialog and calls dlg.DoModal() - surely there's got to be a way to start
the
>dialog invisibly, no?
>
>Thanks in advance!
>Chris
>
>
-