+ Reply to Thread
Results 1 to 3 of 3

Thread: SetFocus does not work in MFC!

  1. #1

    SetFocus does not work in MFC!

    SetFocus does not work in MFC!

    I want to Set focus to specific dialog control on initial time based on input from user in another dialog.

    Thanks in advance.

  2. #2
    It is quite possible that you are returning TRUE from OnInitDialog handler.

    Code:
    BOOL CMyDialog::OnInitDialog()
    {
    	CDialog::OnInitDialog();
    
           //SetFocus(...) ; on any of the child control...
    
            return FALSE ; //this is important...
    }

  3. #3
    It worked. Great.

+ Reply to Thread

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts