CodeGuru Home VC++ / MFC / C++ .NET / C# Visual Basic VB Forums Developer.com
Results 1 to 4 of 4
  1. #1
    Join Date
    Oct 2002
    Posts
    107

    Unhappy desktop modeless dialog problem

    hello, i have done something like that:

    BOOL CDialogList::OnInitDialog()
    {

    CDialog::OnInitDialog();
    SetParent(GetDesktopWindow());
    }

    to create it i do:
    CDialogList * pD== new CDialogList();
    pD->Create(IDD_DIALOG); //put ur ctrl id
    pD->ShowWindow(SW_SHOWNORMAL);

    HOWEVER I HAVE A PROBLEM:

    when i click on this child dialog, and move the mouse from A to B (keeping the mouse button clicked),
    during all the movement from a to b, the dialog stays at A, and then when i release the mouse button it appears suddenly ??!
    as well there is problem when i click the title bar, it is always becoming "blue" (active),

    any help ...?

  2. #2
    Join Date
    Dec 2002
    Posts
    47
    Why SetParent(GetDesktopWindow()); ??

    -rick

  3. #3
    Join Date
    Oct 2002
    Posts
    107
    hello Rick,

    i set the parent to desktop because i want to be able to minimize it in the toolbar of the desktop window,

    and i dont want the dialog to be limited in position to the mainFrame window)

    and if i dont do that i think there is plenty of displaying problem,

  4. #4
    Join Date
    Oct 2002
    Posts
    107

    fix

    yep thats because i used the child option for the dialog window style, i set it to Pop up and thats much better.
    As well i set the visible style, it may be another reason,
    but with those 2 options it seems fine,

    xx

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