Click here to Skip to main content
15,887,596 members
Home / Discussions / C / C++ / MFC
   

C / C++ / MFC

 
GeneralRe: How to call method inside another method.. Pin
Shah Satish5-Feb-07 5:09
Shah Satish5-Feb-07 5:09 
GeneralRe: How to call method inside another method.. Pin
Maximilien5-Feb-07 8:20
Maximilien5-Feb-07 8:20 
AnswerRe: How to call method inside another method.. Pin
benjymous5-Feb-07 5:04
benjymous5-Feb-07 5:04 
GeneralRe: How to call method inside another method.. Pin
Shah Satish5-Feb-07 5:09
Shah Satish5-Feb-07 5:09 
AnswerRe: How to call method inside another method.. Pin
Hamid_RT5-Feb-07 7:53
Hamid_RT5-Feb-07 7:53 
GeneralRe: How to call method inside another method.. Pin
Shah Satish5-Feb-07 7:55
Shah Satish5-Feb-07 7:55 
GeneralRe: How to call method inside another method.. Pin
Hamid_RT5-Feb-07 19:17
Hamid_RT5-Feb-07 19:17 
QuestionRight-click on Tree Control gives bad values. Pin
Maximilien5-Feb-07 4:22
Maximilien5-Feb-07 4:22 
I'm getting a bad value when doing a drag-right-click ( doing a selection with the right mouse button) in a CTreeCtrl.

This is the callback for the NM_RCLICK notification.

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

	if ( hSelItem == NULL )
	{
		return;
	}
}


Sometimes, the hSelItem tree item is not a valid item ( for example : 0x0000008d ) which is not valid.

I alse tried this where ptDrag is supposed to be the "structure that contains the client coordinates of the mouse at the time the event occurred that caused the notification message to be sent. (from MSDN) "

CPoint point( pNMTreeView->ptDrag );
UINT uHF;
HTREEITEM hItem;
hItem = m_Tree.HitTest( point, &uHF );   // hit test

But the point is mostly invalid.

I also use which works, but seems not to be the right way to do it.
UINT uHF;
HTREEITEM hItem;
CPoint point;

GetCursorPos( &point );
m_Tree.ScreenToClient( &point );
hItem = m_Tree.HitTest( point, &uHF );   // hit test


Thanks for you help and/or suggestions.

Max.



Maximilien Lincourt
Your Head A Splode - Strong Bad

AnswerRe: Right-click on Tree Control gives bad values. Pin
Gary R. Wheeler5-Feb-07 12:57
Gary R. Wheeler5-Feb-07 12:57 
QuestionUnable to export a public static member. Pin
tntlei5-Feb-07 3:30
tntlei5-Feb-07 3:30 
AnswerRe: Unable to export a public static member. Pin
tntlei5-Feb-07 3:32
tntlei5-Feb-07 3:32 
QuestionCDBVariant problem Pin
prithaa5-Feb-07 3:16
prithaa5-Feb-07 3:16 
QuestionINADDR_ANY with second socket? Pin
Dave_5-Feb-07 2:41
Dave_5-Feb-07 2:41 
AnswerRe: INADDR_ANY with second socket? Pin
Mark Salsbery5-Feb-07 5:46
Mark Salsbery5-Feb-07 5:46 
GeneralRe: INADDR_ANY with second socket? Pin
Dave_5-Feb-07 6:01
Dave_5-Feb-07 6:01 
GeneralRe: INADDR_ANY with second socket? Pin
Mark Salsbery5-Feb-07 6:26
Mark Salsbery5-Feb-07 6:26 
AnswerRe: INADDR_ANY with second socket? Pin
malaugh5-Feb-07 9:06
malaugh5-Feb-07 9:06 
QuestionReading CSV file using C Pin
rp_suman5-Feb-07 1:57
rp_suman5-Feb-07 1:57 
QuestionRe: Reading CSV file using C Pin
David Crow5-Feb-07 2:57
David Crow5-Feb-07 2:57 
AnswerRe: Reading CSV file using C Pin
rp_suman5-Feb-07 17:46
rp_suman5-Feb-07 17:46 
GeneralRe: Reading CSV file using C Pin
David Crow6-Feb-07 3:03
David Crow6-Feb-07 3:03 
GeneralRe: Reading CSV file using C Pin
rp_suman19-Feb-07 0:07
rp_suman19-Feb-07 0:07 
AnswerRe: Reading CSV file using C Pin
ThatsAlok6-Feb-07 20:10
ThatsAlok6-Feb-07 20:10 
QuestionSizing controls Pin
baerten5-Feb-07 1:55
baerten5-Feb-07 1:55 
AnswerRe: Sizing controls Pin
Waldermort5-Feb-07 2:10
Waldermort5-Feb-07 2:10 

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.