Print Page | Close Window

I have no idea. please~ help me..

Printed From: Codejock Forums
Category: Codejock Products
Forum Name: Task Panel
Forum Description: Topics Related to Codejock Task Panel
URL: http://forum.codejock.com/forum_posts.asp?TID=12312
Printed Date: 28 April 2024 at 2:28pm
Software Version: Web Wiz Forums 12.04 - http://www.webwizforums.com


Topic: I have no idea. please~ help me..
Posted By: copycdx2
Subject: I have no idea. please~ help me..
Date 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 - 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!!



Replies:
Posted By: Oleg
Date 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


Posted By: copycdx2
Date 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()


 


Posted By: Oleg
Date 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



Print Page | Close Window

Forum Software by Web Wiz Forums® version 12.04 - http://www.webwizforums.com
Copyright ©2001-2021 Web Wiz Ltd. - https://www.webwiz.net