Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • World
  • Users
  • Groups
Skins
  • Light
  • Cerulean
  • Cosmo
  • Flatly
  • Journal
  • Litera
  • Lumen
  • Lux
  • Materia
  • Minty
  • Morph
  • Pulse
  • Sandstone
  • Simplex
  • Sketchy
  • Spacelab
  • United
  • Yeti
  • Zephyr
  • Dark
  • Cyborg
  • Darkly
  • Quartz
  • Slate
  • Solar
  • Superhero
  • Vapor

  • Default (No Skin)
  • No Skin
Collapse
Code Project
  1. Home
  2. General Programming
  3. C / C++ / MFC
  4. Child Windows

Child Windows

Scheduled Pinned Locked Moved C / C++ / MFC
helpquestion
5 Posts 4 Posters 0 Views 1 Watching
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • L Offline
    L Offline
    Lost User
    wrote on last edited by
    #1

    :confused: Hi can anyone help? I have dervied a class from CWnd to be a child window. When i create multiple windows via the CWnd::Create function it doesnt show the active window. Normall if a window is selected doesnt it darken to indicate it has focus. Not matter which child window i select they all keep the lighter, not in focus, colour. If any one could help or shed light on the subject i'd be grateful. Cheers Will

    C F 3 Replies Last reply
    0
    • L Lost User

      :confused: Hi can anyone help? I have dervied a class from CWnd to be a child window. When i create multiple windows via the CWnd::Create function it doesnt show the active window. Normall if a window is selected doesnt it darken to indicate it has focus. Not matter which child window i select they all keep the lighter, not in focus, colour. If any one could help or shed light on the subject i'd be grateful. Cheers Will

      C Offline
      C Offline
      Cathy
      wrote on last edited by
      #2

      you could try CWnd::SetActiveWindow

      W 1 Reply Last reply
      0
      • C Cathy

        you could try CWnd::SetActiveWindow

        W Offline
        W Offline
        Will Nolan
        wrote on last edited by
        #3

        I have tried that and it doesnt seem to do anything. Any OTher Ideas?

        1 Reply Last reply
        0
        • L Lost User

          :confused: Hi can anyone help? I have dervied a class from CWnd to be a child window. When i create multiple windows via the CWnd::Create function it doesnt show the active window. Normall if a window is selected doesnt it darken to indicate it has focus. Not matter which child window i select they all keep the lighter, not in focus, colour. If any one could help or shed light on the subject i'd be grateful. Cheers Will

          F Offline
          F Offline
          F Dost
          wrote on last edited by
          #4

          -get parent frame of your child view -call ActiveFrame() on method on parent frame CMDIFrameWnd *pFrame = (CMDIFrameWnd*)yourChildView->GetParentFrame(); pFrame->ActivateFrame(); hope it works for you, i did for me. F.Dost

          1 Reply Last reply
          0
          • L Lost User

            :confused: Hi can anyone help? I have dervied a class from CWnd to be a child window. When i create multiple windows via the CWnd::Create function it doesnt show the active window. Normall if a window is selected doesnt it darken to indicate it has focus. Not matter which child window i select they all keep the lighter, not in focus, colour. If any one could help or shed light on the subject i'd be grateful. Cheers Will

            C Offline
            C Offline
            Cathy
            wrote on last edited by
            #5

            This is what I do: hwnd = CreateWindow("STATIC", pMessage, WS_POPUP | WS_VISIBLE | WS_DLGFRAME | SS_CENTER | DS_SETFOREGROUND, (rectMainWnd.right-rectMainWnd.left-iWidth)/2+rectMainWnd.left, (rectMainWnd.bottom-rectMainWnd.top-iHeight)/2+rectMainWnd.top, iWidth, iHeight, NULL, NULL, hi_app, NULL); SetWindowText(hwnd, pMessage); ShowWindow(hwnd, SW_SHOW); UpdateWindow(hwnd);

            1 Reply Last reply
            0
            Reply
            • Reply as topic
            Log in to reply
            • Oldest to Newest
            • Newest to Oldest
            • Most Votes


            • Login

            • Don't have an account? Register

            • Login or register to search.
            • First post
              Last post
            0
            • Categories
            • Recent
            • Tags
            • Popular
            • World
            • Users
            • Groups