Print Page | Close Window

Problem with Focus when inserting CDialog as Child

Printed From: Codejock Forums
Category: Codejock Products
Forum Name: Shortcut Bar
Forum Description: Topics Related to Codejock Shortcut Bar
URL: http://forum.codejock.com/forum_posts.asp?TID=5249
Printed Date: 03 December 2024 at 12:09pm
Software Version: Web Wiz Forums 12.04 - http://www.webwizforums.com


Topic: Problem with Focus when inserting CDialog as Child
Posted By: Moritz
Subject: Problem with Focus when inserting CDialog as Child
Date Posted: 09 October 2006 at 7:37am
Hi Codejock,
 
I want to insert a CDialog into a CXTPShortcutbarPane. I did the following
 

BOOL CShortcutPaneStartseite::Create(LPCTSTR lpszCaption, CXTPShortcutBar* pParent)
{
if (!CXTPShortcutBarPane::Create(lpszCaption, pParent))
{
   return FALSE;
}

VERIFY(m_dlg.Create(IDD_SHORTCUTPANE_STARTSEITE, this));

SetIndent(0,0,0,0);

CXTPShortcutBarPaneItem *pItem = AddItem("Test", &m_dlg, 0);

pItem->ShowCaption(FALSE);

m_dlg.ShowWindow(SW_SHOW);

return TRUE;

}
 
My dialog is derived from CXTPDialogBase<CXTResizeDlg>
 
The Pane is create correct and the dialog is displayed, but the focus of an inserted editcontrol isn't lost. If I click into the editbox inside the dialog it is focused. Now if i press TAB nothing happens.
 
I checked your sample ShortcutBar, there none of the inserted controls gets or loses focus. I checked Outlook, where it gets and loses focus.
 
Isn't it implemented or do i have to set some kind of windowstyle like WS_EX_CONTROLPARENT?
 
Also I would like to have some better support for Dialog insertion like with CXTPDockingPane. There focus also doesn't work but insertion is much easier!
 
Thank you for your help!!



Replies:
Posted By: Gianni
Date Posted: 22 August 2011 at 3:30am
Hi,
I have the same problem, whth the same "CXTPDialogBase<CXTResizeDlg>".
The only difference is that I have inserted it in a CView


Posted By: astoyan
Date Posted: 24 August 2015 at 11:26pm
Thank you for reporting this. Please try to build and upload a small sample with all dialog insetions you are having issues with and we'll try to debug and fix it or provide a workaround.
Regards,
  Alex



Print Page | Close Window

Forum Software by Web Wiz Forums® version 12.04 - http://www.webwizforums.com
Copyright ©2001-2021 Web Wiz Ltd. - https://www.webwiz.net