Codejock Forums Homepage
Forum Home Forum Home > Codejock Products > Visual C++ MFC > Shortcut Bar
  New Posts New Posts RSS Feed - Problem with Focus when inserting CDialog as Child
  FAQ FAQ  Forum Search   Events   Register Register  Login Login

Problem with Focus when inserting CDialog as Child

 Post Reply Post Reply
Author
Message
Moritz View Drop Down
Groupie
Groupie
Avatar

Joined: 22 December 2005
Location: Germany
Status: Offline
Points: 11
Post Options Post Options   Thanks (0) Thanks(0)   Quote Moritz Quote  Post ReplyReply Direct Link To This Post Topic: Problem with Focus when inserting CDialog as Child
    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!!
Back to Top
Gianni View Drop Down
Newbie
Newbie
Avatar

Joined: 22 August 2011
Status: Offline
Points: 1
Post Options Post Options   Thanks (0) Thanks(0)   Quote Gianni Quote  Post ReplyReply Direct Link To This Post 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
Back to Top
astoyan View Drop Down
Admin Group
Admin Group
Avatar

Joined: 24 August 2013
Status: Offline
Points: 304
Post Options Post Options   Thanks (0) Thanks(0)   Quote astoyan Quote  Post ReplyReply Direct Link To This Post 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
Back to Top
 Post Reply Post Reply
  Share Topic   

Forum Jump Forum Permissions View Drop Down

Forum Software by Web Wiz Forums® version 12.04
Copyright ©2001-2021 Web Wiz Ltd.

This page was generated in 0.141 seconds.