Codejock Forums Homepage
Forum Home Forum Home > Codejock Products > Visual C++ MFC > Task Panel
  New Posts New Posts RSS Feed - I have no idea.   please~ help me..
  FAQ FAQ  Forum Search   Events   Register Register  Login Login

I have no idea. please~ help me..

 Post Reply Post Reply
Author
Message
copycdx2 View Drop Down
Groupie
Groupie


Joined: 17 September 2008
Status: Offline
Points: 20
Post Options Post Options   Thanks (0) Thanks(0)   Quote copycdx2 Quote  Post ReplyReply Direct Link To This Post Topic: I have no idea. please~ help me..
    Posted: 02 October 2008 at 1:26am

 please,  I will inquire my question.

 i had created my code
 Cg3OutlookBarContainer* pNewObj = new Cg3OutlookBarContainer();
 pNewObj->Create( wnd );

 file attach
 uploads/20081002_011741_g3ByClick.zip



 first question.
 ON_MESSAGE(XTPWM_TASKPANEL_NOTIFY, OnTaskPanelNotify)
 message is not received.


 second question.
code line 688
 pImage->SetIcons((IDR_TOOLBAR1));
 that line insert and  memory exception error when class destroy function.

 third question.
 I hope chage backgroundcolor of panel .


 thank you!!
Back to Top
Oleg View Drop Down
Admin Group
Admin Group


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: 02 October 2008 at 4:07am
Hi,
1. TaskPanel send XTPWM_TASKPANEL_NOTIFY to its parent - so you have catch it in its parent.
Or override virtuaL LRESULT CXTPTaskPanel::NotifyOwner(WPARAM wParam, LPARAM lParam);
 
2. Need to trace your code to understand what "class destroy function" means.
Oleg, Support Team
CODEJOCK SOFTWARE SOLUTIONS
Back to Top
copycdx2 View Drop Down
Groupie
Groupie


Joined: 17 September 2008
Status: Offline
Points: 20
Post Options Post Options   Thanks (0) Thanks(0)   Quote copycdx2 Quote  Post ReplyReply Direct Link To This Post Posted: 02 October 2008 at 6:19am

  thank you.
  I succeeded first question that you tell me.
 virtuaL LRESULT MyClassl::NotifyOwner(WPARAM wParam, LPARAM lParam);

 why not receive overrided function.
BOOL Myclass::OnNotify(WPARAM wParam, LPARAM lParam, LRESULT* pResult)

-------------------------------------------------------------------------
 but my second question is...

 my.h
 class myClass: public CTaskPanelBase
{
    public:
   CXTPPopupBar*    m_pPopupBar;
}
 
 my.cpp

 myClass :: TestFuc()
{
   m_pPopupBar = (CXTPPopupBar*)CXTPPopupToolBar::CreateObject();
   pCtrl = m_pPopupBar->GetControls()->Add( xtpControlButton, ID_FILE_TEST01 );
  pCtrl->SetCaption(_T("Test button"));
 pCtrl->GetImageManager()->SetIcons(IDR_TOOLBAR1);
}
 
 good run.
 Icon show.
 but,  Access violatio error when myclass destroy..
 
exception red line code and good run.
 but not show icon.

MyClass::~MyClass()
{    if( m_pPopupBar )
    {
        AFX_MANAGE_STATE(AfxGetStaticModuleState());
        m_pPopupBar->InternalRelease();
        m_pPopupBar = NULL;
    }
}


--------out put--------------------------------
Afxwin1.inl
_AFXWIN_INLINE BOOL AFXAPI AfxGetAmbientActCtx()
    {     return afxAmbientActCtx; }


void CXTPImageManagerIconSet::RemoveAll()


 
Back to Top
Oleg View Drop Down
Admin Group
Admin Group


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: 03 October 2008 at 1:55am

if you have some ActiveX or dll project, try manaully remove all icons:

call XTPImageManager()->RemoveAll();
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.154 seconds.