Announcement

Collapse
No announcement yet.

How to stop a ListBox from taking focus when new line is added?

Collapse
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

  • How to stop a ListBox from taking focus when new line is added?

    How to stop a ListBox from taking focus when new line is added?

    Subclass, catch and block the message?


  • #2
    Actually, it is not the ListBox grabbing focus, it is the second dialog I open.
    Even if the second dialog is hidden! So it looks like the last dialog created gets focus.

    I am thinking I need to catch and block the second dialog take focus message??

    Comment


    • #3
      Looks like this will fix it:
      Code:
            CASE %WM_INITDIALOG
              CONTROL SET FOCUS GL_hDlg, %BUTTON_1
      How do you set the dialog to have focus without giving a particular control focus?

      Comment


      • #4
        SetFocus API?

        Code:
        SetFocus hDlg
        I've not tried it ....

        Comment


        • #5
          The Old New Thing by Raymond Chen
          How to set focus in a dialog box

          Comment


          • #6
            Wow, super! Thanks Pierre!

            Comment

            Working...
            X