CodeGuru Home VC++ / MFC / C++ .NET / C# Visual Basic VB Forums Developer.com
Results 1 to 6 of 6
  1. #1
    Join Date
    Feb 2004
    Posts
    82

    modeless dialog question

    I added a modeless dialog in my project. But I found the dialog window covered top of the main frame window, so that I cannot use alt+tab to switch to show the main window. I tried to add codes in CMyDialog::PreCreateWindow like below:

    cs.dwExStyle &= ~WS_EX_TOPMOST;

    But it didn't work. could anyone know how to fix that? thanks!

  2. #2
    Join Date
    Feb 2000
    Location
    San Diego, CA
    Posts
    10,354

    Re: modeless dialog question

    What is the behavior you want ? Do you want the mainframe AND the modeless dialog window to be available as 2 different options in the Alt-tab window ?

  3. #3
    Join Date
    Feb 2002
    Posts
    5,757

    Re: modeless dialog question

    not easy

    icon in taskbar?

    Kuphryn

  4. #4
    Join Date
    Feb 2004
    Posts
    82

    Re: modeless dialog question

    Quote Originally Posted by kirants
    What is the behavior you want ? Do you want the mainframe AND the modeless dialog window to be available as 2 different options in the Alt-tab window ?
    yes, i want them to be 2 options in the alt-tab window. is the only way to do this to use a multi-thread?

  5. #5
    Join Date
    Mar 2003
    Location
    India {Mumbai};
    Posts
    3,871

    Re: modeless dialog question

    I'm sure this is not perfect solution, since better solution must exist.

    Make the destop window (GetDesktopWindow) parent of dialog box. Try it out.
    My latest article: Explicating the new C++ standard (C++0x)

    Do rate the posts you find useful.

  6. #6
    Join Date
    Feb 2000
    Location
    San Diego, CA
    Posts
    10,354

    Re: modeless dialog question

    That should do it, pass the desktop window as second param to Create method of your modeless dialog object.

Posting Permissions

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





Click Here to Expand Forum to Full Width

Featured