Solved

TV_INSERTSTRUCT

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

Live: Real-Time Solutions, Start Here

Receive instant 1:1 support from technology experts, using our real-time conversation and whiteboard interface. Your first 5 minutes are always free.

Question has a verified solution.

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

Suggested Solutions

Title # Comments Views Activity
Prevent this page from creating additional dialogs. 3 525
sumHeights2  challenge 7 103
Fibonacci challenge 11 121
Path of Workbook 3 77
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: 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. …
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.
Two types of users will appreciate AOMEI Backupper Pro: 1 - Those with PCIe drives (and haven't found cloning software that works on them). 2 - Those who want a fast clone of their boot drive (no re-boots needed) and it can clone your drive wh…

776 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