Solved

TV_INSERTSTRUCT

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

Technology Partners: We Want Your Opinion!

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

Question has a verified solution.

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

Suggested Solutions

Title # Comments Views Activity
Need a Shell script to start a service checking the port 6 55
How to determine file rename from EventLog ? 2 58
sumNumber challenge 16 140
Problem to event 3 114
Introduction: Ownerdraw of the grid button.  A singleton class implentation and usage. Continuing from the fifth article about sudoku.   Open the project in visual studio. Go to the class view – CGridButton should be visible as a class.  R…
Exception Handling is in the core of any application that is able to dignify its name. In this article, I'll guide you through the process of writing a DRY (Don't Repeat Yourself) Exception Handling mechanism, using Aspect Oriented Programming.
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.

730 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