1. This site uses cookies. By continuing to use this site, you are agreeing to our use of cookies. Learn More.

focus

Discussion in 'Win32' started by johny_1015_1981, Mar 23, 2009.

  1. johny_1015_1981

    johny_1015_1981 New Member

    Joined:
    Oct 5, 2008
    Messages:
    19
    Likes Received:
    0
    Trophy Points:
    0
    1. how can I get focus on child window
    2. exactly why a child window cannot receive any keboard message.

    please i need these stupid info

    Thank you
     
  2. NewsBot

    NewsBot New Member

    Joined:
    Dec 2, 2008
    Messages:
    1,267
    Likes Received:
    2
    Trophy Points:
    0
    What do you mean by that ?
     
  3. johny_1015_1981

    johny_1015_1981 New Member

    Joined:
    Oct 5, 2008
    Messages:
    19
    Likes Received:
    0
    Trophy Points:
    0
    I have Created a child window under main window and i cant get focus in that window as well as i dont receive wm_keyup or wm_keydown and some other keyboard message
     
  4. NewsBot

    NewsBot New Member

    Joined:
    Dec 2, 2008
    Messages:
    1,267
    Likes Received:
    2
    Trophy Points:
    0
    Child window is by default on focus and I think there is something really wrong about that.

    Try creating a simple small project and see if its working as parent child windows
     
  5. johny_1015_1981

    johny_1015_1981 New Member

    Joined:
    Oct 5, 2008
    Messages:
    19
    Likes Received:
    0
    Trophy Points:
    0
    Dear Sabbir,
    The program is one of the simplest program in the world.

    It just a main window
    in the main window I created a Child window (class name is "myCustomClass").
    which mean its not built in class (like "edit", "static" or "button").
    my child winodw actually work almost like "static". can you help me.
    I am halting in this shit for long time
     
  6. NewsBot

    NewsBot New Member

    Joined:
    Dec 2, 2008
    Messages:
    1,267
    Likes Received:
    2
    Trophy Points:
    0
    Try using the SetWindowPos API to set the focus to the newly created window
     
  7. johny_1015_1981

    johny_1015_1981 New Member

    Joined:
    Oct 5, 2008
    Messages:
    19
    Likes Received:
    0
    Trophy Points:
    0
    Hello Everybody,
    I found my won solution.
    The problem I made was I totally Missed
    SetActiveWindow function.
    Actuall until I set the child window as active window it wont receive any keyboard message.
     

Share This Page