![]() |
Quick Task Panel Question |
Post Reply
|
| Author | |
Warren
Groupie
Joined: 23 February 2005 Status: Offline Points: 64 |
Post Options
Thanks(0)
Quote Reply
Topic: Quick Task Panel QuestionPosted: 09 March 2006 at 8:07am |
|
I have a CXTPTaskPanel in my CMainFrame and I'm adding items like:
CXTPTaskPanelGroup* pGroupNew = m_taskPanel.AddGroup(...); pGroupNew->AddLinkItem(ID_FILE_OPEN, 0); pGroupNew->AddLinkItem(ID_FILE_NEW, 3); Question 1) All of the ID_ items I'm adding are already handled in my app (doc/frame/view), and I just want to have the click notifications handled as if they were picked off of the menu, so I added the following: LRESULT CMainFrame::OnTaskPanelNotify(WPARAM wParam, LPARAM lParam) { if(XTP_TPN_CLICK==wParam){ CXTPTaskPanelGroupItem* pItem = (CXTPTaskPanelGroupItem*)lParam; PostMessage(WM_COMMAND, pItem->GetID(), 0); } return 0; } a) Is this the correct way to do this? b) Is it okay to use SendMessage instead of PostMessage? c) The helps says: // If the application is to process this message, the return value should be TRUE, otherwise the return value is FALSE. but I wasn't sure what I should return in this case (i.e. what does "process this message" refer to in this context? as the default behaviour doens't seem to do anything?) Question 2) Since I'm re-using the IDs from my menus and toolbars, how do I get the images to get loaded from those toolbars? Right now I have to maintain a duplicate image list. Thanks Warren |
|
![]() |
|
Oleg
Senior Member
Joined: 21 May 2003 Location: United States Status: Offline Points: 11234 |
Post Options
Thanks(0)
Quote Reply
Posted: 09 March 2006 at 10:11am |
|
1. Yes, you can use SendMessage 2. Just something like XTPImageManager()->InternalAddRef(); m_wndTaskPanel.SetImageManager(XTPImageManager());
|
|
|
Oleg, Support Team
CODEJOCK SOFTWARE SOLUTIONS |
|
![]() |
|
Post Reply
|
|
|
Tweet
|
| Forum Jump | Forum Permissions ![]() You cannot post new topics in this forum You cannot reply to topics in this forum You cannot delete your posts in this forum You cannot edit your posts in this forum You cannot create polls in this forum You cannot vote in polls in this forum |