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
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.
You can position the dialog off screen to eliminate the flickering.
James
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.
Can't you change the style of the dialog, so it isn't visible to start with?
ie. Remove WS_VISIBLE
Mirno