Newbie MFC question about giving windows focus.

Sharky Forums


Results 1 to 2 of 2

Thread: Newbie MFC question about giving windows focus.

  1. #1
    Expensive Sushi
    Join Date
    Jul 2001
    Location
    Webster, NY, USA
    Posts
    8

    Angry Newbie MFC question about giving windows focus.

    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.

  2. #2
    Mako Shark dighn's Avatar
    Join Date
    Nov 2000
    Location
    Vancouver, BC Canada
    Posts
    3,171

    Post

    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
    Tesla coils are not weapons
    .

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •