Click here to Skip to main content
15,902,189 members
Home / Discussions / C / C++ / MFC
   

C / C++ / MFC

 
AnswerRe: Spell Checker API? Pin
Steve Schaneville7-Sep-04 5:20
professionalSteve Schaneville7-Sep-04 5:20 
AnswerRe: Spell Checker API? Pin
David Crow7-Sep-04 5:49
David Crow7-Sep-04 5:49 
GeneralRe: Spell Checker API? Pin
Steve Schaneville7-Sep-04 6:36
professionalSteve Schaneville7-Sep-04 6:36 
GeneralRe: Spell Checker API? Pin
Nemanja Trifunovic7-Sep-04 8:37
Nemanja Trifunovic7-Sep-04 8:37 
GeneralRe: Spell Checker API? Pin
David Crow7-Sep-04 8:56
David Crow7-Sep-04 8:56 
AnswerRe: Spell Checker API? Pin
Graham Bradshaw7-Sep-04 6:21
Graham Bradshaw7-Sep-04 6:21 
GeneralRe: Spell Checker API? Pin
Steve Schaneville7-Sep-04 6:35
professionalSteve Schaneville7-Sep-04 6:35 
GeneralCTreeCtrl Right Click question... Pin
Maximilien7-Sep-04 5:04
Maximilien7-Sep-04 5:04 
I handle the right click in a CTreeCtrl with
ON_NOTIFY( NM_RCLICK, IDC_TREE1, OnTreeRclick )


and

void CTestTreeDlg::OnTreeRclick( NMHDR* pNMHDR, LRESULT* pResult )
{
 NM_TREEVIEW* pNMTreeView = (NM_TREEVIEW*)pNMHDR;
 HTREEITEM hSelItem = pNMTreeView->itemNew.hItem;
}


When I right click on the tree background, not on a leaf or node, the hSelItem is not valid, and is not a "simple" value like NULL or zero.

Is there a way to check to see if the HTREEITEM item is valid ?

I tried the following to see if I can get the item based on the hitem the notification message gave back, it could "work" but it gives a "First-chance exception" when passing a bad hitem.

TVITEM item;
TCHAR szText[1024];
item.hItem = hSelItem;
item.mask = TVIF_TEXT | TVIF_HANDLE;
item.pszText = szText;
item.cchTextMax = 1024;
BOOL bWorked = m_Tree->GetItem(&item);


Thanks.

Max.



Maximilien Lincourt
Your Head A Splode - Strong Bad
GeneralRe: CTreeCtrl Right Click question... Pin
Hans Ruck7-Sep-04 6:00
Hans Ruck7-Sep-04 6:00 
GeneralRe: CTreeCtrl Right Click question... Pin
Maximilien7-Sep-04 6:43
Maximilien7-Sep-04 6:43 
GeneralImage Processing problem Pin
fenter_ren7-Sep-04 3:56
fenter_ren7-Sep-04 3:56 
General[MFC] ActiveX Pin
chrone7-Sep-04 3:26
chrone7-Sep-04 3:26 
GeneralLocked Computer and Hooking Pin
caykahve7-Sep-04 2:09
caykahve7-Sep-04 2:09 
GeneralRe: Locked Computer and Hooking Pin
gamitech7-Sep-04 10:01
gamitech7-Sep-04 10:01 
GeneralGet URL via Drag'n'Drop Pin
e-DJ7-Sep-04 1:44
e-DJ7-Sep-04 1:44 
QuestionHow to know which module has handles in a process Pin
Takanobu Maekawa7-Sep-04 1:14
Takanobu Maekawa7-Sep-04 1:14 
AnswerRe: How to know which module has handles in a process Pin
Arsalan Malik7-Sep-04 1:25
Arsalan Malik7-Sep-04 1:25 
GeneralRe: How to know which module has handles in a process Pin
Takanobu Maekawa7-Sep-04 2:08
Takanobu Maekawa7-Sep-04 2:08 
QuestionHow to create a program cannot be kill by anyway ? Pin
chauhoangtrung7-Sep-04 1:11
chauhoangtrung7-Sep-04 1:11 
AnswerRe: How to create a program cannot be kill by anyway ? Pin
User 127828-Sep-04 19:27
User 127828-Sep-04 19:27 
GeneralGraphics (Help!) Pin
txpablo7-Sep-04 0:38
txpablo7-Sep-04 0:38 
GeneralRe: Graphics (Help!) Pin
jmkhael7-Sep-04 0:48
jmkhael7-Sep-04 0:48 
GeneralIs this possible? not clicked, always on top window. Pin
gaesabal7-Sep-04 0:20
gaesabal7-Sep-04 0:20 
GeneralCSplitterWnd question... Pin
GerhardC7-Sep-04 0:19
GerhardC7-Sep-04 0:19 
GeneralDirectory-tree in a Combobox Pin
GDavy7-Sep-04 0:00
GDavy7-Sep-04 0:00 

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.