// Standard initialization
// If you are not using these features and wish to reduce the size
// of your final executable, you should remove from the following
// the specific initialization routines you do not need.
#ifdef _AFXDLL
Enable3dControls(); // Call this when using MFC in a shared DLL
#else
Enable3dControlsStatic(); // Call this when linking to MFC statically
#endif
// Creation
CTimeNetDlg *pDlg;
pDlg = new CTimeNetDlg();
m_pMainWnd = pDlg;
int hWnd = pDlg->Create(IDD_TIMENET_DIALOG, NULL);
pDlg->ShowWindow(SW_HIDE);
pDlg->TrayShow();
y'a un post par le passé (pas si lointain, qui repond à ta question). En gros faut pas utiliser le DoModal...
slashp
Salut,
je voudrais que, automatiquement au démarrage de mon appli (générée avec App Wizard en tant que Dialog based), la fenêtre principale sois cachée.
J'ai essayé plusieurs trucs comme ShowWindow(SW_HIDE) dans OnInitDialog, ou alors de décocher la case "visible" de la boite de dialogue dans l'éditeur de resources.
Rien n'y fait.
Quel message windows faut il traiter pour appeler ShowWindow(SW_HIDE)?