SubclassWindow of CXTPMDiframeWnd fails |
Post Reply |
Author | |
alistair.m
Groupie Joined: 14 January 2008 Location: United Kingdom Status: Offline Points: 12 |
Post Options
Thanks(0)
Posted: 14 January 2008 at 9:41am |
No, I derive my CMainFrame from CXTPMDIFrameWnd. The document type we use is a fixed size dialog so doesn't really work with a tabbed client format.
Thanks Al. |
|
Oleg
Admin Group Joined: 21 May 2003 Location: United States Status: Offline Points: 11234 |
Post Options
Thanks(0)
|
Hi,
Do you use CXTPTabClientWnd ?
|
|
Oleg, Support Team
CODEJOCK SOFTWARE SOLUTIONS |
|
alistair.m
Groupie Joined: 14 January 2008 Location: United Kingdom Status: Offline Points: 12 |
Post Options
Thanks(0)
|
Hi all
I'm trying to get a subclass working that used to work in my non CodeJock app. Now CMainFrame is derived from CXTPMDIFrameWnd, it asserts at the FromHandlePermanent(hWndNew) in CWnd::Attach(). I assume this is because the CodeJock parent class already has some form of subclassing and you can't subclass twice. The subclassed class simply overrides OnEraseBkgnd and OnSize and paints text to the MDI frame background as described in many tutorials and examples on the net. In my CMainFrame::OnCreate() I call: //subclass to allow erasebkgnd to repaint colour of mainframe CWnd* pChildWnd = GetWindow(GW_CHILD); if (pChildWnd) { if (!m_wndMDIClient.SubclassWindow (pChildWnd -> m_hWnd)) { TRACE ("Failed to subclass MDI client window\n"); return (-1); } } Any thoughts on how I can re-implement this functionality. Thanks Al. |
|
Post Reply | |
Tweet
|
Forum Jump | Forum Permissions You cannot post new topics in this forum You cannot reply to topics in this forum You cannot delete your posts in this forum You cannot edit your posts in this forum You cannot create polls in this forum You cannot vote in polls in this forum |