Solved

TV_INSERTSTRUCT

Posted on 1998-03-28
1
386 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
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
1 Comment
 
LVL 7

Accepted Solution

by:
galkin earned 20 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

What does it mean to be "Always On"?

Is your cloud always on? With an Always On cloud you won't have to worry about downtime for maintenance or software application code updates, ensuring that your bottom line isn't affected.

Question has a verified solution.

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

Introduction: Dialogs (1) modal - maintaining the database. Continuing from the ninth article about sudoku.   You might have heard of modal and modeless dialogs.  Here with this Sudoku application will we use one of each type: a modal dialog …
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.
Monitoring a network: why having a policy is the best policy? Michael Kulchisky, MCSE, MCSA, MCP, VTSP, VSP, CCSP outlines the enormous benefits of having a policy-based approach when monitoring medium and large networks. Software utilized in this v…
Suggested Courses

630 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