Click here to Skip to main content
15,890,527 members
Home / Discussions / C / C++ / MFC
   

C / C++ / MFC

 
GeneralRe: Dialog screen freezes Pin
Mahesh Varma9-May-03 18:11
Mahesh Varma9-May-03 18:11 
QuestionCalling a pure "C" function from a class: How? Pin
Cesario Simoes, jr9-May-03 8:14
Cesario Simoes, jr9-May-03 8:14 
AnswerRe: Calling a pure "C" function from a class: How? Pin
David Crow9-May-03 8:24
David Crow9-May-03 8:24 
GeneralRe: Calling a pure "C" function from a class: How? Pin
Cesario Simoes, jr9-May-03 8:37
Cesario Simoes, jr9-May-03 8:37 
GeneralRe: Calling a pure "C" function from a class: How? Pin
David Crow9-May-03 8:53
David Crow9-May-03 8:53 
GeneralRe: Calling a pure "C" function from a class: How? Pin
Cesario Simoes, jr9-May-03 9:12
Cesario Simoes, jr9-May-03 9:12 
GeneralRe: Calling a pure "C" function from a class: How? Pin
Cesario Simoes, jr9-May-03 9:34
Cesario Simoes, jr9-May-03 9:34 
GeneralNM_RCLICK Pin
MemLeak9-May-03 7:51
MemLeak9-May-03 7:51 
Hi!,

I use this code to get the column number of a CListControl into a CFormView. It works fine.

But It work for right click. I cannot find a Handler for left click. Something like NM_LCLICK unstead of NM_RCLICK.

BOOL CDataBaseManagerView::OnNotify(WPARAM wParam, LPARAM lParam, LRESULT* pResult)
{
HD_NOTIFY *pHDN = (HD_NOTIFY*)lParam;

LPNMHDR pNH = (LPNMHDR) lParam;
// wParam is zero for Header ctrl
if( wParam == 0 && pNH->code == NM_RCLICK )
{
// Right button was clicked on header
CPoint pt(GetMessagePos());
CHeaderCtrl* pHeader =(CHeaderCtrl*)m_wndListCtrl.GetHeaderCtrl();
pHeader->ScreenToClient(&pt);

// Determine the column index
int index = 0;
CRect rcCol;
for( int i = 0 ; Header_GetItemRect(pHeader->m_hWnd, i, &rcCol) ; i++ )
{
if( rcCol.PtInRect( pt ) )
{
index = i;
break;
}
}

CString str;

str.Format("Column no: %d", index);

AfxMessageBox(str);
}


return CFormView::OnNotify(wParam, lParam, pResult);
}

any ideas?

Thanks

Everything's beautiful if you look at it long enough...
GeneralRe: NM_RCLICK Pin
MemLeak9-May-03 8:09
MemLeak9-May-03 8:09 
GeneralRe: NM_RCLICK Pin
Hari Krishnan (Noida)11-May-03 18:52
Hari Krishnan (Noida)11-May-03 18:52 
Generalprinting VC++ files Pin
Makover9-May-03 7:31
Makover9-May-03 7:31 
GeneralRe: printing VC++ files Pin
David Crow9-May-03 7:49
David Crow9-May-03 7:49 
GeneralRe: printing VC++ files Pin
Makover9-May-03 7:53
Makover9-May-03 7:53 
GeneralRe: printing VC++ files Pin
David Crow9-May-03 7:56
David Crow9-May-03 7:56 
GeneralRe: printing VC++ files Pin
Makover9-May-03 8:00
Makover9-May-03 8:00 
GeneralRe: printing VC++ files Pin
Mahesh Varma9-May-03 18:18
Mahesh Varma9-May-03 18:18 
Generalinclude issues Pin
Themis9-May-03 7:27
Themis9-May-03 7:27 
GeneralRe: include issues Pin
Joseph Dempsey9-May-03 7:39
Joseph Dempsey9-May-03 7:39 
Generalchar[] problem Pin
Mazdak9-May-03 6:53
Mazdak9-May-03 6:53 
GeneralRe: char[] problem Pin
valikac9-May-03 7:11
valikac9-May-03 7:11 
GeneralRe: char[] problem Pin
Mazdak9-May-03 7:21
Mazdak9-May-03 7:21 
GeneralRe: char[] problem Pin
David Crow9-May-03 7:12
David Crow9-May-03 7:12 
GeneralRe: char[] problem Pin
Mazdak9-May-03 7:24
Mazdak9-May-03 7:24 
GeneralRe: char[] problem Pin
David Crow9-May-03 7:47
David Crow9-May-03 7:47 
GeneralRe: char[] problem Pin
jason999-May-03 7:27
jason999-May-03 7:27 

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.