Print Page | Close Window

OnTaskPanelNotify() - XTP_TPN_GROUPEXPANDING

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=8061
Printed Date: 29 April 2024 at 4:13am
Software Version: Web Wiz Forums 12.04 - http://www.webwizforums.com


Topic: OnTaskPanelNotify() - XTP_TPN_GROUPEXPANDING
Posted By: amitb
Subject: OnTaskPanelNotify() - XTP_TPN_GROUPEXPANDING
Date Posted: 18 September 2007 at 6:45am
Hello,
I have the following code:


LRESULT CMyBar::OnTaskPanelNotify(WPARAM wParam, LPARAM lParam)
{
    CXTPTaskPanelGroupItem* pItem = (CXTPTaskPanelGroupItem*)lParam;
CXTPTaskPanelGroup* pGroup = NULL;

    switch (wParam)
    {
    case XTP_TPN_CLICK:
        {
         int iHitItem = 0;
            iHitItem = pItem->GetIconIndex();
        }
    case XTP_TPN_GROUPEXPANDING:
        {
            pGroup = pItem->GetItemGroup();
            // this line gives a unhandled exception. reason ??


         }
}

In the case of GROUP EXPANDING i want to refresh my icon list in that group.




Replies:
Posted By: Oleg
Date Posted: 18 September 2007 at 7:06am
Hi,
lParam is XTP_TPNGROUPEXPANDING pointer for this notification.


-------------
Oleg, Support Team
CODEJOCK SOFTWARE SOLUTIONS


Posted By: amitb
Date Posted: 18 September 2007 at 8:34am
Thanks Oleg,
Got it


Posted By: amitb
Date Posted: 18 September 2007 at 11:18am
Oleg,
In case i want to have the RightClick Event to be handled, can i do it in OnTaskPanelNotify(...) Or do i have to derive a class from taskpanel and handle the rightclick event.

Thanks,
- Amit


Posted By: Oleg
Date Posted: 18 September 2007 at 1:37pm
Hi
 
Catch XTP_TPN_RCLICK handler. lParam is CXTPTaskPanelItem pointer.


-------------
Oleg, Support Team
CODEJOCK SOFTWARE SOLUTIONS


Posted By: amitb
Date Posted: 19 September 2007 at 3:36am
Hello Oleg,

This gives me the right click on the task panel item.

However i also want to capture the right click event on the any area of the taskpanel

How do i achieve this ?

Thanks,
- Amit


Posted By: Oleg
Date Posted: 19 September 2007 at 4:55am
Hello,
 
Only to override CXTPTaskPanel and cach WM_RBUTTONDOWN/UP.


-------------
Oleg, Support Team
CODEJOCK SOFTWARE SOLUTIONS


Posted By: amitb
Date Posted: 20 September 2007 at 5:43am
Thanks again Oleg,

I was able to do it.

One query is that if i have a group and say there are 5 items added to this group.

Now i want to delete these  5 items from the group and refresh the group
Which function should i use the clear / remove the items present in the group ??

Thanks.


Posted By: Oleg
Date Posted: 21 September 2007 at 1:17am
Hi,
 
try this
 
pGroup->GetItems()->Clear();


-------------
Oleg, Support Team
CODEJOCK SOFTWARE SOLUTIONS


Posted By: amitb
Date Posted: 21 September 2007 at 6:22am
Thanks. That helped 



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