Hello there , Is there another message that a dialog window receive after WM_INITDIALOG and only one time after it is displayed, 'cause i want to minimize it to the tray icon. I've tried to post a user defined Message WM_USER+1 but don't work. thanks
Posted on 2001-03-03 21:45:00 by blackhorus
Hey, I had the same prob. After WM_INITDIALOG, WM_SHOWWINDOW will appear when the window is going to be displayed. Then WM_WINDOWPOSCHANGED appears after the window has been displayed, you can do a ShowWindow, hwndDlg, SW_HIDE (or whatever) at this point. The downside is that the window is initially displayed, so you may see a slight flicker when the window is being hidden. I'm sure there has to be a better way than this, I just dont know it.
Posted on 2001-03-04 02:07:00 by Dee-Jon Bryce
You can position the dialog off screen to eliminate the flickering. James
Posted on 2001-03-04 07:03:00 by jcfuller
Thanks to replying, The Message WM_WINDOWPOSCHANGED is sent after the function SetWinPos has been called, and not only one time. I'm lookin' for a way to minimize my application to tray icon just after the first start.
Posted on 2001-03-05 08:42:00 by BlackHorus
Can't you change the style of the dialog, so it isn't visible to start with? ie. Remove WS_VISIBLE Mirno
Posted on 2001-03-05 08:55:00 by Mirno