Click here to Skip to main content
16,014,294 members
Home / Discussions / C / C++ / MFC
   

C / C++ / MFC

 
AnswerRe: Ownerdraw detect XP or Win9x? Pin
4-Apr-02 18:22
suss4-Apr-02 18:22 
GeneralBYTE and CString Pin
Mazdak3-Apr-02 19:04
Mazdak3-Apr-02 19:04 
GeneralRe: BYTE and CString Pin
Joaquín M López Muñoz3-Apr-02 20:45
Joaquín M López Muñoz3-Apr-02 20:45 
GeneralJoaquín M López Muñoz ,this is for you!! Pin
Mazdak3-Apr-02 21:46
Mazdak3-Apr-02 21:46 
GeneralRe: Joaquín M López Muñoz ,this is for you!! Pin
Joaquín M López Muñoz3-Apr-02 22:49
Joaquín M López Muñoz3-Apr-02 22:49 
GeneralRe: Joaquín M López Muñoz ,this is for you!! Pin
Mazdak3-Apr-02 23:54
Mazdak3-Apr-02 23:54 
QuestionHow to use function "OnDeleteitem(NMHDR* pNMHDR, LRESULT* pResult) " on ctreectrl? Pin
Feng Qin3-Apr-02 18:16
Feng Qin3-Apr-02 18:16 
AnswerRe: How to use function "OnDeleteitem(NMHDR* pNMHDR, LRESULT* pResult) " on ctreectrl? Pin
Derek Waters3-Apr-02 18:41
Derek Waters3-Apr-02 18:41 
Huh?

Do you mean how to add a DeleteItem notification handler, or what to do when you get it?

To add the notification, you need to add

afx_msg void OnDeleteTreeItem(NMHDR *pNMHDR, LRESULT *pResult);


to your header, then add:

ON_NOTIFY(TVN_DELETEITEM, IDC_MY_TREE_CTRL, OnDeleteTreeItem)


to your message map. Finally, add the handler to your .cpp file:

void CMyClass::OnDeleteTreeItem(NMHDR *pNMHDR, LRESULT *pResult)
{
  NMTREEVIEW *pTreeNotify = (NMTREEVIEW *)pNMHDR;

  // Now pTreeNotify->itemOld.hItem is the HTREEITEM of the deleted tree item
}


As to what you do in the handler, that's up to you...


------------------------
Derek Waters
derek@lj-oz.com
GeneralRe: How to use function "OnDeleteitem(NMHDR* pNMHDR, LRESULT* pResult) " on ctreectrl? Pin
Feng Qin3-Apr-02 19:14
Feng Qin3-Apr-02 19:14 
Generalwin32 app with msg loop but no window Pin
Dorion3-Apr-02 16:53
Dorion3-Apr-02 16:53 
GeneralRe: win32 app with msg loop but no window Pin
Joaquín M López Muñoz3-Apr-02 19:04
Joaquín M López Muñoz3-Apr-02 19:04 
GeneralDisabling "Ready" & Other Auto Status Bar Updates :: MFC Pin
valikac3-Apr-02 16:03
valikac3-Apr-02 16:03 
GeneralGetting Size & Location of ChildView :: MFC Pin
valikac3-Apr-02 14:26
valikac3-Apr-02 14:26 
GeneralRe: Getting Size & Location of ChildView :: MFC Pin
Prem Kumar3-Apr-02 15:00
Prem Kumar3-Apr-02 15:00 
GeneralRe: Getting Size & Location of ChildView :: MFC Pin
valikac3-Apr-02 16:01
valikac3-Apr-02 16:01 
GeneralTrivial File Transfer Protocol Pin
MarkPQ3-Apr-02 13:30
MarkPQ3-Apr-02 13:30 
GeneralRe: Trivial File Transfer Protocol Pin
Jon Hulatt3-Apr-02 21:13
Jon Hulatt3-Apr-02 21:13 
QuestionBest method for creating a Wizard w/ VC++ and MFC? Pin
Robert Mooney3-Apr-02 13:07
Robert Mooney3-Apr-02 13:07 
AnswerRe: Best method for creating a Wizard w/ VC++ and MFC? Pin
Derek Waters3-Apr-02 15:56
Derek Waters3-Apr-02 15:56 
GeneralSHGetFileInfo and icons... problems with .HTML files Pin
Roman Nurik3-Apr-02 12:40
Roman Nurik3-Apr-02 12:40 
GeneralRe: SHGetFileInfo and icons... problems with .HTML files Pin
Prem Kumar3-Apr-02 12:54
Prem Kumar3-Apr-02 12:54 
GeneralRe: SHGetFileInfo and icons... problems with .HTML files Pin
Roman Nurik3-Apr-02 12:52
Roman Nurik3-Apr-02 12:52 
GeneralRe: SHGetFileInfo and icons... problems with .HTML files Pin
Roman Nurik3-Apr-02 13:36
Roman Nurik3-Apr-02 13:36 
GeneralRe: SHGetFileInfo and icons... problems with .HTML files Pin
Prem Kumar3-Apr-02 14:57
Prem Kumar3-Apr-02 14:57 
GeneralRe: SHGetFileInfo and icons... problems with .HTML files Pin
Roman Nurik3-Apr-02 15:04
Roman Nurik3-Apr-02 15:04 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.