CodeGuru Home VC++ / MFC / C++ .NET / C# Visual Basic VB Forums Developer.com
Results 1 to 2 of 2
  1. #1
    Join Date
    May 1999
    Posts
    34

    Activating and Focus...

    Hi !

    I use a CFrameWnd as the main-window and now I want to have a toolwindow (like the ones you have, when you float a docked controlbar). The toolwindow owns the styles WS_POPUP, WS_EX_TOOLWINDOW and some others and is a child of the frame.

    The problem:
    When activating the toolwindow, the frame is deactivated.
    When activating the frame, the toolwindow is deactivated.

    Of cource, I want that both, frame and toolwindow, are activated (this is the caption is blue) and deactivated (this is the caption is gray) at the same time.

    How can I do this ?

    Regards

    Martin



  2. #2
    Join Date
    May 1999
    Location
    Farnborough, Hants, England
    Posts
    710

    Re: Activating and Focus...

    By design, if the second window is not an MDI child of the main window, then they will gain / lose the focus in a mutually-exclusive manner (only one can have the focus at any given time).

    The docked toolbar cannot be an MDI child, as it can move outside of the main window; there must be some other technique here, perhaps unique to control bars. Why not create your tool window as a control bar with the tool window style bit set? I don't know if this would work, though.

    Why does it matter if the main window loses focus anyway?



    --
    Jason Teagle
    [email protected]

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