Codejock Forums Homepage
Forum Home Forum Home > Codejock Products > Visual C++ MFC > Task Panel
  New Posts New Posts RSS Feed - OnTaskPanelNotify()  - XTP_TPN_GROUPEXPANDING
  FAQ FAQ  Forum Search   Events   Register Register  Login Login

OnTaskPanelNotify() - XTP_TPN_GROUPEXPANDING

 Post Reply Post Reply
Author
Message
amitb View Drop Down
Groupie
Groupie
Avatar

Joined: 13 September 2006
Status: Offline
Points: 50
Post Options Post Options   Thanks (0) Thanks(0)   Quote amitb Quote  Post ReplyReply Direct Link To This Post Topic: OnTaskPanelNotify() - XTP_TPN_GROUPEXPANDING
    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.

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: 18 September 2007 at 7:06am
Hi,
lParam is XTP_TPNGROUPEXPANDING pointer for this notification.
Oleg, Support Team
CODEJOCK SOFTWARE SOLUTIONS
Back to Top
amitb View Drop Down
Groupie
Groupie
Avatar

Joined: 13 September 2006
Status: Offline
Points: 50
Post Options Post Options   Thanks (0) Thanks(0)   Quote amitb Quote  Post ReplyReply Direct Link To This Post Posted: 18 September 2007 at 8:34am
Thanks Oleg,
Got it
Back to Top
amitb View Drop Down
Groupie
Groupie
Avatar

Joined: 13 September 2006
Status: Offline
Points: 50
Post Options Post Options   Thanks (0) Thanks(0)   Quote amitb Quote  Post ReplyReply Direct Link To This Post 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
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: 18 September 2007 at 1:37pm
Hi
 
Catch XTP_TPN_RCLICK handler. lParam is CXTPTaskPanelItem pointer.
Oleg, Support Team
CODEJOCK SOFTWARE SOLUTIONS
Back to Top
amitb View Drop Down
Groupie
Groupie
Avatar

Joined: 13 September 2006
Status: Offline
Points: 50
Post Options Post Options   Thanks (0) Thanks(0)   Quote amitb Quote  Post ReplyReply Direct Link To This Post 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
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: 19 September 2007 at 4:55am
Hello,
 
Only to override CXTPTaskPanel and cach WM_RBUTTONDOWN/UP.
Oleg, Support Team
CODEJOCK SOFTWARE SOLUTIONS
Back to Top
amitb View Drop Down
Groupie
Groupie
Avatar

Joined: 13 September 2006
Status: Offline
Points: 50
Post Options Post Options   Thanks (0) Thanks(0)   Quote amitb Quote  Post ReplyReply Direct Link To This Post 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.
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: 21 September 2007 at 1:17am
Hi,
 
try this
 
pGroup->GetItems()->Clear();
Oleg, Support Team
CODEJOCK SOFTWARE SOLUTIONS
Back to Top
amitb View Drop Down
Groupie
Groupie
Avatar

Joined: 13 September 2006
Status: Offline
Points: 50
Post Options Post Options   Thanks (0) Thanks(0)   Quote amitb Quote  Post ReplyReply Direct Link To This Post Posted: 21 September 2007 at 6:22am
Thanks. That helped 
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.141 seconds.