Solved

TV_INSERTSTRUCT

Posted on 1998-03-28
1
367 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 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

IT, Stop Being Called Into Every Meeting

Highfive is so simple that setting up every meeting room takes just minutes and every employee will be able to start or join a call from any room with ease. Never be called into a meeting just to get it started again. This is how video conferencing should work!

Join & Write a Comment

Suggested Solutions

Title # Comments Views Activity
sameEnds challenge 3 107
maxBlock challenge 30 101
matchUp  challenge 9 72
Problem to open Excel file 15 44
Introduction: Load and Save to file, Document-View interaction inside the SDI. Continuing from the second article about sudoku.   Open the project in visual studio. From the class view select CSudokuDoc and double click to open the header …
Introduction: Hints for the grid button.  Nested classes, templated collections.  Squash that darned bug! Continuing from the sixth article about sudoku.   Open the project in visual studio. First we will finish with the SUD_SETVALUE messa…
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.
This demo shows you how to set up the containerized NetScaler CPX with NetScaler Management and Analytics System in a non-routable Mesos/Marathon environment for use with Micro-Services applications.

747 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

Need Help in Real-Time?

Connect with top rated Experts

9 Experts available now in Live!

Get 1:1 Help Now