Click here to Skip to main content
11,803,019 members (60,288 online)
Rate this: bad
Please Sign up or sign in to vote.
See more: C++ VisualC++

I have a host window. on top of that host window i create an another window/control. this is done by calling Create function. for example

Class A :
public CComObjectRootEx<CComMultiThreadModel>,
    public CComCoClass<CSchOrderDlg, &CLSID_SchOrderDlg>,
    public ISupportErrorInfo,
    public IConnectionPointContainerImpl<CSchOrderDlg>,
    public IDispatchImpl<ISchOrderDlg, &IID_ISchOrderDlg, &LIBID_SCHORDERSLib>,
    public CDialogImpl<CSchOrderDlg>,
    public _ISchEventOrdersEvents,
    public CProxy_ISchOrderDlgEvents<CSchOrderDlg>
CContainedWindow m_bContain;

LRESULT Func( UINT uMSg, WPARAM wParam, LPARAm lParam, BOOL &bHandled)
Message_Handler(WM_ERASEBAKGRND, Func)

The above code is in .h file.
In .cpp file for this in constructor i give m_bContain(_T("SYS TAbControl"),this,1)
down the line i create

now i am not able to change the background color of the contained window.

any thoughts how to proceed?

One option i tries is create a new class which is a derivative of CContainedWindow

Class B ::CContainedWindow

and where ever i am using CContained window i am using B and have declared message maps within this class. but still this did not work.

Please let me know how to solve this
Posted 7-May-13 10:08am

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)

  Print Answers RSS
0 OriginalGriff 335
1 KrunalRohit 291
2 F-ES Sitecore 270
3 CPallini 270
4 Sergey Alexandrovich Kryukov 234
0 OriginalGriff 2,950
1 Maciej Los 1,910
2 KrunalRohit 1,862
3 CPallini 1,735
4 Richard MacCutchan 1,157

Advertise | Privacy | Mobile
Web03 | 2.8.151002.1 | Last Updated 7 May 2013
Copyright © CodeProject, 1999-2015
All Rights Reserved. Terms of Service
Layout: fixed | fluid

CodeProject, 503-250 Ferrand Drive Toronto Ontario, M3C 3G8 Canada +1 416-849-8900 x 100