Thread: How to SetFocus to the ChildDialog when move to another application and come in MFC

Threaded View

Previous Post Previous Post   Next Post Next Post
  1. #1
    Registered User
    Join Date
    Nov 2016
    Posts
    26

    Lightbulb How to SetFocus to the ChildDialog when move to another application and come in MFC

    Hi,
    I have the CDialog ModelDialog Application , say ParentDialog 'A', and Dialog 'A' creates Child Dialog 'B'.
    I click on another application and then open the 'B'.But focus is not in the Dialog.I need to click on somewhere on the 'B'.
    Without clicking anywhere how do i set the focus.

    In the Child Dialog, I have the button which will display the Tooltips when the user move the cursor over the button.
    But when i click on the other application and come to this application, Focus is not set.

    I found out the example which is exactly I am looking to explain you[Attachment which is example without tooltip ].
    In the attachment you can get the code for Model Dialog. In this app, in the second window lets assume I have included the tool-tip for the button(Cancel). It is working.But when i click on another application and come this application Focus is not in the application. I need to set the focus on the window.so when i move the cursor over the button, Tooltip should display. I tried to set the focus.But it is focusing .I enclosed my attachment

    Regards,
    Senthil
    Attached Files Attached Files

Popular pages Recent additions subscribe to a feed

Similar Threads

  1. Replies: 11
    Last Post: 06-23-2015, 02:50 AM
  2. Replies: 2
    Last Post: 05-18-2012, 04:20 AM
  3. SetFocus and WM_SETFOCUS
    By Rare177 in forum Windows Programming
    Replies: 5
    Last Post: 10-21-2004, 05:38 AM
  4. SetFocus error
    By mayhem in forum Windows Programming
    Replies: 15
    Last Post: 09-07-2003, 12:10 AM
  5. Move cursor in console application
    By alfa in forum C# Programming
    Replies: 2
    Last Post: 02-09-2003, 02:58 PM

Tags for this Thread