Go Premium for a chance to win a PS4. Enter to Win

x
?
Solved

TV_INSERTSTRUCT

Posted on 1998-03-28
1
Medium Priority
?
399 Views
Last Modified: 2013-11-20
How do i assign a pointer to the below lParam...

CMyPoint *pPt = new CMYPoint;
TV_INSERTSTRUCT TreeCtrlItem;      
TreeCtrlItem.item.lParam =  ??? pPt ;

and how can i retrieve it ...

NM_TREEVIEW* pNMTreeView = (NM_TREEVIEW*)pNMHDR;
CMyPoint* pP =  ??? pNMTreeView->itemNew.lParam ;
0
Comment
Question by:engllf
1 Comment
 
LVL 7

Accepted Solution

by:
galkin earned 80 total points
ID: 1317314
To assign pointer

  TC_ITEM TCI;
  TCI.mask = TCIF_PARAM;
  CMyPoint *pPt = new CMYPoint;
  TCI.lParam = (LPARAM)pPt;
  VERIFY(m_TabCtrl.InsertItem(0, &TCI) != -1);

To retreive pointer

  TC_ITEM TCI;
  TCI.mask = TCIF_PARAM;
  m_TabCtrl.GetItem(nTab, &TCI);
  CMyPoint *pPt = (CMyPoint *)TCI.lParam;
ASSERT_KINDOF(CMyPoint, pPt);

0

Featured Post

Concerto's Cloud Advisory Services

Want to avoid the missteps to gaining all the benefits of the cloud? Learn more about the different assessment options from our Cloud Advisory team.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Introduction: Finishing the grid – keyboard support for arrow keys to manoeuvre, entering the numbers.  The PreTranslateMessage function is to be used to intercept and respond to keyboard events. Continuing from the fourth article about sudoku. …
If you use Adobe Reader X it is possible you can't open OLE PDF documents in the standard. The reason is the 'save box mode' in adobe reader X. Many people think the protected Mode of adobe reader x is only to stop the write access. But this fe…
This video will show you how to get GIT to work in Eclipse.   It will walk you through how to install the EGit plugin in eclipse and how to checkout an existing repository.
In response to a need for security and privacy, and to continue fostering an environment members can turn to for support, solutions, and education, Experts Exchange has created anonymous question capabilities. This new feature is available to our Pr…

916 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question