Codejock Forums Homepage
Forum Home Forum Home > Codejock Products > Visual C++ MFC > Toolkit Pro
  New Posts New Posts RSS Feed - CXTPTabControl::InsertItem() question
  FAQ FAQ  Forum Search   Events   Register Register  Login Login

CXTPTabControl::InsertItem() question

 Post Reply Post Reply
Author
Message
stephen View Drop Down
Newbie
Newbie
Avatar

Joined: 06 December 2005
Status: Offline
Points: 3
Post Options Post Options   Thanks (0) Thanks(0)   Quote stephen Quote  Post ReplyReply Direct Link To This Post Topic: CXTPTabControl::InsertItem() question
    Posted: 06 January 2006 at 3:20pm
Hi all,

To insert a CWnd object into my TabControl, I use the following code:

m_TabControl.InsertItem (nItem, strName, pObjCwnd->GetSafeHwnd(), nIcon);

That works fine only if pObjCwnd has the m_TabControl object as its parent. If not, the pObjCwnd won't show at all, and the user can only see the tab item. Why should that relationship matter? Is there a workaround, since my pObjCwnd already has another parent?

Thanks.
Back to Top
Oleg View Drop Down
Senior Member
Senior Member


Joined: 21 May 2003
Location: United States
Status: Offline
Points: 11234
Post Options Post Options   Thanks (0) Thanks(0)   Quote Oleg Quote  Post ReplyReply Direct Link To This Post Posted: 07 January 2006 at 2:01pm

Just be sure pObjCwnd is at top in z-order than m_TabControl.

Don't see problems with it...

Oleg, Support Team
CODEJOCK SOFTWARE SOLUTIONS
Back to Top
stephen View Drop Down
Newbie
Newbie
Avatar

Joined: 06 December 2005
Status: Offline
Points: 3
Post Options Post Options   Thanks (0) Thanks(0)   Quote stephen Quote  Post ReplyReply Direct Link To This Post Posted: 10 January 2006 at 12:22pm
Thanks for the reply oleg. I have tried several ways to bring the pObjCwnd to the top, however it still doesn't show.

Can you show me a way perhaps?

thanks
Back to Top
Oleg View Drop Down
Senior Member
Senior Member


Joined: 21 May 2003
Location: United States
Status: Offline
Points: 11234
Post Options Post Options   Thanks (0) Thanks(0)   Quote Oleg Quote  Post ReplyReply Direct Link To This Post Posted: 11 January 2006 at 11:20am

Use SetWindowPos to bring it to top,

attach little sample and I will fix it.

Oleg, Support Team
CODEJOCK SOFTWARE SOLUTIONS
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.047 seconds.