Click to See Complete Forum and Search --> : Newbie MFC question about giving windows focus.


Vacindak
07-08-2001, 03:42 PM
Ok, I've written a program that minimizes to the system tray, however, I want it to pop up a dialog box when it receives a WM_TIMER message. At the moment, it works just fine except for one thing. The dialog box only pops up if the program isn't minimized. I know the program created the dialog because I put a MessageBeep(0); in the OnInitDialog() function and I hear it go off, but no window pops up.

I tried using the SetActiveWindow() function but that didn't work. I think that only applies to the multiple windows that a single application can open.

Note: I want the application to stay minimized, just the one dialog box to pop up.

I'm also wondering if making the dialog modeless instead of modal might help.

dighn
07-08-2001, 06:45 PM
try calling .ShowWindow() on the dialog if that doesn't work try modaless dialoguebox

------------------
So easy to use, no wonder it's number one!!!
Where do you want to go today?
Member of NT Jocks (http://yoconsoft.hypermart.net/images/ntjockdighn.gif)
Tesla coils are not weapons