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

  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

  2. #2
    Registered User
    Join Date
    Nov 2015
    Posts
    119
    I have CodeBlocks, not a visual studio, and there is no MFC. Also, the compiled file does not work for me, I swear that
    (The application could not start because MFC42D.DLL was not found!)

    It would be nice to have any binary without DLL.

  3. #3
    Registered User
    Join Date
    Nov 2016
    Posts
    26
    I guess i might not be able to share the dll.
    But i can see there is already a problem raised by one person and link is given below.But I am not sure how to do in MFC.
    WM_ACTIVATE woes...

    Please help

  4. #4
    Registered User
    Join Date
    Jul 2017
    Posts
    7
    Hello SAP, I was checking the information which is you share, but I can't understand why are you asking for help? There is too many posts for the help. Can you please check again which is you share here?

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