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

C / C++ / MFC

 
GeneralRe: Thread abnormal behavior Pin
mt_samiei27-Oct-06 22:11
mt_samiei27-Oct-06 22:11 
GeneralRe: Thread abnormal behavior Pin
Prakash Nadar27-Oct-06 22:13
Prakash Nadar27-Oct-06 22:13 
GeneralRe: Thread abnormal behavior Pin
mt_samiei27-Oct-06 22:14
mt_samiei27-Oct-06 22:14 
GeneralRe: Thread abnormal behavior Pin
Prakash Nadar27-Oct-06 22:15
Prakash Nadar27-Oct-06 22:15 
AnswerRe: Thread abnormal behavior Pin
Eytukan28-Oct-06 4:48
Eytukan28-Oct-06 4:48 
GeneralRe: Thread abnormal behavior Pin
Hamid_RT28-Oct-06 8:38
Hamid_RT28-Oct-06 8:38 
GeneralRe: Thread abnormal behavior Pin
Eytukan28-Oct-06 19:10
Eytukan28-Oct-06 19:10 
AnswerRe: Thread abnormal behavior Pin
Stephen Hewitt29-Oct-06 14:41
Stephen Hewitt29-Oct-06 14:41 
Questionflash in vc++ Pin
irudayam27-Oct-06 20:44
irudayam27-Oct-06 20:44 
AnswerRe: flash in vc++ Pin
Hamid_RT27-Oct-06 21:39
Hamid_RT27-Oct-06 21:39 
AnswerRe: flash in vc++ Pin
Prakash Nadar27-Oct-06 22:06
Prakash Nadar27-Oct-06 22:06 
QuestionShell Context Menu Pin
kiranin27-Oct-06 20:37
kiranin27-Oct-06 20:37 
Questionhow to copy subdirectory recursively in windows SDK Pin
madhav mane27-Oct-06 20:31
madhav mane27-Oct-06 20:31 
AnswerRe: how to copy subdirectory recursively in windows SDK Pin
Hamid_RT27-Oct-06 21:26
Hamid_RT27-Oct-06 21:26 
GeneralRe: how to copy subdirectory recursively in windows SDK Pin
Prakash Nadar27-Oct-06 22:05
Prakash Nadar27-Oct-06 22:05 
Questionhow to create vertical toolbar using windows SDK programming. Pin
madhav mane27-Oct-06 20:26
madhav mane27-Oct-06 20:26 
AnswerRe: how to create vertical toolbar using windows SDK programming. Pin
Hamid_RT27-Oct-06 21:28
Hamid_RT27-Oct-06 21:28 
AnswerRe: how to create vertical toolbar using windows SDK programming. Pin
Mark Salsbery29-Oct-06 7:09
Mark Salsbery29-Oct-06 7:09 
QuestionIs LPTSTR a char pointer? Pin
Lord Kixdemp27-Oct-06 17:41
Lord Kixdemp27-Oct-06 17:41 
AnswerRe: Is LPTSTR a char pointer? Pin
Waldermort27-Oct-06 17:59
Waldermort27-Oct-06 17:59 
GeneralRe: Is LPTSTR a char pointer? Pin
Lord Kixdemp27-Oct-06 20:03
Lord Kixdemp27-Oct-06 20:03 
GeneralRe: Is LPTSTR a char pointer? Pin
Prakash Nadar27-Oct-06 22:16
Prakash Nadar27-Oct-06 22:16 
GeneralRe: Is LPTSTR a char pointer? Pin
Lord Kixdemp28-Oct-06 12:18
Lord Kixdemp28-Oct-06 12:18 
QuestionCTreeCtrl CheckBox Pin
JBAK_CP27-Oct-06 15:19
JBAK_CP27-Oct-06 15:19 
Hi...I have a dialog box with a tree control that has check-boxes in it. What I need to do is, when any of the check-boxes in the tree control is checked, I need to do some processing, and for now let's just say, I need to put up a messagebox. I added a function for the 'NM_CLICK' message to intercept the left button clicks in the tree control, then I do a 'GetCheck' to see if the button is checked.

When I check the box, the 'GetCheck' function returns a 0 but a checkmark appers in the box. When I uncheck the box, the 'GetCheck' function returns a 1, and the checkmark is removed from the box. So this isn't really helping me figure out when the box is checked and not.

Any help would be greatly appericated.

Here is my code for the 'NM_CLICK'

void CDirectoryCheckDlg::OnClickTree1(NMHDR* pNMHDR, LRESULT* pResult)
{
CPoint pt;
GetCursorPos(&pt);
m_testTree.ScreenToClient(&pt);
UINT uFlags;

HTREEITEM ht = m_testTree.HitTest(pt, &uFlags);

if(ht != NULL)
{
// There is an item under the cursor.
m_testTree.SelectItem(ht);

// See what exactly was under the cursor:
switch(uFlags)
{
case TVHT_ONITEMSTATEICON:
{
// It is the icon (checkbox)
BOOL chkbox = m_testTree.GetCheck(ht);
if(chkbox)
MessageBox("Button is checked");

//CString str;
//str.Format("%d",chkbox);
//MessageBox(str,NULL,NULL);
break;
}
case TVHT_ONITEMBUTTON:
// It is the button
break;

}


}



*pResult = 0;
}
AnswerRe: CTreeCtrl CheckBox Pin
Gary R. Wheeler29-Oct-06 1:54
Gary R. Wheeler29-Oct-06 1:54 

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.