Thread: Setting Focus

    #1
  1. No Profile Picture
    Junior Member
    Devshed Newbie (0 - 499 posts)

    Join Date
    Jan 2003
    Location
    Noblesville Indiana
    Posts
    2
    Rep Power
    0

    Setting Focus


    Alright I am new to this board, but I have a question that I haven't been able to find an answer for, for about a month. I have a program (SDI) using MFC and there are 5 panes. Three rows, with the middle row being a pointer to 3 other panes. Now the problem is, when the user is in either of the top or bottom rows, I can't get the focus to be set to the middle frame. This is causing problems because I need this for my menu to work properly as well, and the user can't close either of the pages that open when they click the banners (Top and Bottom rows). I hope that is specific enough.
  2. #2
  3. No Profile Picture
    Contributing User
    Devshed God 1st Plane (5500 - 5999 posts)

    Join Date
    Oct 2000
    Location
    Back in the real world.
    Posts
    5,966
    Rep Power
    190
    when the user is in either of the top or bottom rows, I can't get the focus to be set to the middle frame.
    what do you want to say, the user "is" in the row?
    is the input cursor blinking there? ... this is the definition of the "focus", like you were asking to make a circle with corners...
    watch some other windows programs, once you activate the menu, the input cursor is gone. it has to. or your menu would not work.
    but a menu will automatically take the focus once you click on it, if you didnīt take counter measures, so i canīt see a problem...

    you can set the focus to another panel , but you will loose the input cursor on the panel where the user "is".
    for this, have a look at "CWnd::SetFocus()"
  4. #3
  5. No Profile Picture
    Junior Member
    Devshed Newbie (0 - 499 posts)

    Join Date
    Jan 2003
    Location
    Noblesville Indiana
    Posts
    2
    Rep Power
    0
    umm I am not sure if I am understanding what your asking. Let me clarify. The top and bottom rows are banners. HTML views. so there is no cursor in them. When the user clicks on the banner, (focus is set) i called a web page to load in the back ground. but unless the user clicks in the middle or somewhere not in that pane the user can't close the web page. And my menus are similar to this, so I decided that if there was a way to fix that problem I could solve most of the problems I have. I hope that makes since. I have tried a couple different ways but none have worked because the pane is inside another frame.

IMN logo majestic logo threadwatch logo seochat tools logo