Click here to Skip to main content
15,920,005 members
Home / Discussions / C / C++ / MFC
   

C / C++ / MFC

 
GeneralRe: Catching Exceptions in MFC Pin
AlexO7-Feb-03 5:34
AlexO7-Feb-03 5:34 
GeneralVisual C++ wizard Pin
De Nardis Andrea7-Feb-03 5:03
De Nardis Andrea7-Feb-03 5:03 
Questionhow to set CListbox row height variable? Pin
hamchoy7-Feb-03 4:52
hamchoy7-Feb-03 4:52 
AnswerRe: how to set CListbox row height variable? Pin
Roger Allen7-Feb-03 6:07
Roger Allen7-Feb-03 6:07 
GeneralCPen Pin
Ahmad997-Feb-03 3:55
Ahmad997-Feb-03 3:55 
GeneralRe: CPen Pin
Joaquín M López Muñoz7-Feb-03 4:00
Joaquín M López Muñoz7-Feb-03 4:00 
GeneralRe: CPen Pin
Ahmad997-Feb-03 4:09
Ahmad997-Feb-03 4:09 
GeneralRe: CPen Pin
Maximilien7-Feb-03 4:19
Maximilien7-Feb-03 4:19 
GeneralCTreeCtrl Pin
will13837-Feb-03 3:51
will13837-Feb-03 3:51 
GeneralRe: CTreeCtrl Pin
Joaquín M López Muñoz7-Feb-03 3:59
Joaquín M López Muñoz7-Feb-03 3:59 
GeneralRe: CTreeCtrl Pin
will13837-Feb-03 4:11
will13837-Feb-03 4:11 
GeneralRe: CTreeCtrl Pin
Joaquín M López Muñoz7-Feb-03 4:33
Joaquín M López Muñoz7-Feb-03 4:33 
GeneralRe: CTreeCtrl Pin
will13837-Feb-03 4:36
will13837-Feb-03 4:36 
The following code returns no errors and when running through the debugger the set item states all return True, but the Tree View still doesn't update. Any ideas what I'm doing wrong Confused | :confused:

// if we can't find a file then kaboom, dump an error
if ((hFind = ::FindFirstFile (strPath +_T("*.*"), &fd)) == INVALID_HANDLE_VALUE) {
CString temp = strPath + _T("is not accessible\n\nThe Device is not ready\n");
CString temp2 = _T("Exploring ") + strPath;
MessageBox(temp,temp2 ,MB_OK | MB_ICONERROR);
GetTreeCtrl ().SetItemState(GetTreeCtrl().GetSelectedItem(),
0,TVIF_SELECTEDIMAGE);
GetTreeCtrl ().SetItemState(m_prevSelection,TVIS_SELECTED,TVIF_SELECTEDIMAGE);
GetDocument ()->UpdateAllViews (this, 0x5A, (CObject*) (LPCTSTR) this->m_previousPath);
} else {
// If the selection is valid, then save the selection. If not valid, then
// default back to the previously saved item that was selected. this is to
// maintain consistancy with windows explorer.
this->m_prevSelection = GetTreeCtrl().GetSelectedItem();
this->m_previousPath = strPath;
GetDocument ()->UpdateAllViews (this, 0x5A, (CObject*) (LPCTSTR) strPath);
}

Any ideas? I'm not sure what is going on here, but otherwise my display gets updated just fine.

Dan Willis
GeneralRe: CTreeCtrl Pin
Joaquín M López Muñoz7-Feb-03 4:43
Joaquín M López Muñoz7-Feb-03 4:43 
GeneralRe: CTreeCtrl Pin
will13837-Feb-03 4:50
will13837-Feb-03 4:50 
GeneralRe: CTreeCtrl Pin
will13837-Feb-03 5:31
will13837-Feb-03 5:31 
GeneralRe: CTreeCtrl Pin
will13837-Feb-03 5:44
will13837-Feb-03 5:44 
GeneralCapturing stdout/stderr Pin
Chou7-Feb-03 3:40
Chou7-Feb-03 3:40 
GeneralRe: Capturing stdout/stderr Pin
Joaquín M López Muñoz7-Feb-03 3:43
Joaquín M López Muñoz7-Feb-03 3:43 
GeneralRe: Capturing stdout/stderr Pin
Chou7-Feb-03 3:51
Chou7-Feb-03 3:51 
GeneralConverting C++ project to MFC Pin
Jabir7-Feb-03 3:29
Jabir7-Feb-03 3:29 
GeneralRe: Converting C++ project to MFC Pin
Joaquín M López Muñoz7-Feb-03 3:45
Joaquín M López Muñoz7-Feb-03 3:45 
GeneralRe: Converting C++ project to MFC Pin
Jabir7-Feb-03 21:42
Jabir7-Feb-03 21:42 
GeneralVisio like MFC control Pin
loic7-Feb-03 2:57
loic7-Feb-03 2:57 
GeneralLibrary in Visual C++ .NET Pin
jongentje7-Feb-03 2:40
jongentje7-Feb-03 2:40 

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.