Click here to Skip to main content
15,881,776 members
Home / Discussions / C / C++ / MFC
   

C / C++ / MFC

 
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 
QuestionReturn from function Pin
Oliver12327-Oct-06 11:04
Oliver12327-Oct-06 11:04 
AnswerRe: Return from function Pin
led mike27-Oct-06 11:09
led mike27-Oct-06 11:09 
QuestionDWORD to LPCVOID Pin
Cyclone0227-Oct-06 9:27
Cyclone0227-Oct-06 9:27 
AnswerRe: DWORD to LPCVOID Pin
David Crow27-Oct-06 10:16
David Crow27-Oct-06 10:16 
QuestionRe: DWORD to LPCVOID [modified] Pin
Cyclone0228-Oct-06 7:07
Cyclone0228-Oct-06 7:07 
AnswerRe: DWORD to LPCVOID Pin
Mark Salsbery29-Oct-06 7:17
Mark Salsbery29-Oct-06 7:17 
GeneralRe: DWORD to LPCVOID Pin
Cyclone0229-Oct-06 8:59
Cyclone0229-Oct-06 8:59 
GeneralRe: DWORD to LPCVOID Pin
Mark Salsbery29-Oct-06 9:25
Mark Salsbery29-Oct-06 9:25 
GeneralRe: DWORD to LPCVOID Pin
Cyclone0230-Oct-06 5:57
Cyclone0230-Oct-06 5:57 
QuestionCan I use bits instead of bytes? Pin
Lord Kixdemp27-Oct-06 9:08
Lord Kixdemp27-Oct-06 9:08 
AnswerRe: Can I use bits instead of bytes? Pin
led mike27-Oct-06 9:16
led mike27-Oct-06 9:16 
GeneralRe: Can I use bits instead of bytes? Pin
Lord Kixdemp27-Oct-06 9:24
Lord Kixdemp27-Oct-06 9:24 
AnswerRe: Can I use bits instead of bytes? Pin
George L. Jackson27-Oct-06 12:07
George L. Jackson27-Oct-06 12:07 
GeneralRe: Can I use bits instead of bytes? Pin
Michael Dunn27-Oct-06 16:15
sitebuilderMichael Dunn27-Oct-06 16:15 
GeneralRe: Can I use bits instead of bytes? Pin
George L. Jackson27-Oct-06 16:48
George L. Jackson27-Oct-06 16:48 
GeneralRe: Can I use bits instead of bytes? Pin
Lord Kixdemp27-Oct-06 20:11
Lord Kixdemp27-Oct-06 20:11 

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.