BCGSoft Forums
BCGSoft Forums
Home | Profile | Register | Active Topics | Members | Search | FAQ
Username:
Password:
Save Password
Forgot your Password?

 All Forums
 BCGSuite for MFC
 BCGSuite for MFC
 OnKillFocus with CBCGPPopup
 New Topic  Topic Locked
Author Previous Topic Topic Next Topic  

JohnH

2 Posts

Posted - 04/09/2020 :  2:21:05 PM  Show Profile
I want to create a popup dialog that does not automatically close and instead closes whenever the popup loses focus.

I've got the dialog to stay open indefinitely but, now I want to make it close when i click outside of the popup.

my code is:
void WorksheetSelectorDlg::OnKillFocus(CWnd* new_window) {
CBCGPPopupDlg::OnKillFocus(new_window);
CloseWindow();
DestroyWindow();
}
}


Instead, this message is only received when I click on (focus) the popup window, so the window is destroyed without ever being able to click on any of the controls in the popup window.

I need to destroy the window when it loses focus. Any suggestions?

Support

4175 Posts

Posted - 04/09/2020 :  2:53:15 PM  Show Profile  Visit Support's Homepage
Hi,

Please take a look at our forum rules:
https://www.bcgsoft.com/cgi-bin/forum/topic.asp?TOPIC_ID=5662

Waiting for your repro sample.

Best regards,

BCGSoft Technical Support
Go to Top of Page
  Previous Topic Topic Next Topic  
 New Topic  Topic Locked
Jump To:
BCGSoft Forums © Copyright (c) 1998-2022 BCGSoft Co Ltd Go To Top Of Page
Snitz Forums 2000