Click here to Skip to main content
15,909,503 members
Home / Discussions / C / C++ / MFC
   

C / C++ / MFC

 
GeneralProblem using SwitchToView method Pin
ilgale29-May-03 22:42
ilgale29-May-03 22:42 
Generalproblem with modeless transparent window Pin
Member 40481329-May-03 22:40
Member 40481329-May-03 22:40 
GeneralChecking File Access Pin
Aenaos29-May-03 22:27
Aenaos29-May-03 22:27 
GeneralRe: Checking File Access Pin
David Crow30-May-03 2:54
David Crow30-May-03 2:54 
GeneralRe: Checking File Access Pin
Aenaos30-May-03 4:33
Aenaos30-May-03 4:33 
GeneralRe: Checking File Access Pin
valikac30-May-03 6:18
valikac30-May-03 6:18 
GeneralRe: Checking File Access Pin
basementman30-May-03 9:46
basementman30-May-03 9:46 
GeneralProblem with recursion - Please Help !! Pin
Snakebyte29-May-03 22:02
Snakebyte29-May-03 22:02 
Hi, I'm writing a function which will create a copy of a tree. The traversal code for source tree is fine, but there is some problem assigning parent node in the destination tree. Please Help!!
// Member Variables
extern const CTreeCtrl* m_pSourceTree;
CTreeCtrl m_DestTree;       
HTREEITEM m_hDest;

// Invocation
   TreeTraverse(m_pSourceTree->GetRootItem());

// Problematic function
TREEITEM CKleenCachePage::TreeTraverse(HTREEITEM hStart) 
{
    HTREEITEM theItem;

    if ( hStart == NULL )
        return NULL;

    if( m_pSourceTree->GetParentItem(hStart) == NULL)   
        m_hDest= NodeCopy(hStart,NULL);     // Creating the root node   

    if ((theItem = m_DestTree.GetChildItem(hStart)) != NULL)
    {   
        m_hDest = NodeCopy(theItem,m_hDest);
        theItem = TreeTraverse(theItem);
        if (theItem != NULL)
            return theItem;
    }

    if ((theItem = m_DestTree.GetNextSiblingItem(hStart)) != NULL)
    {
        m_hDest = NodeCopy(theItem,m_hDest);
        theItem = TreeTraverse(theItem);
        if (theItem != NULL)
            return theItem;
    }
    return theItem;
}
<BR>
HTREEITEM CKleenCachePage::NodeCopy(HTREEITEM hSource, HTREEITEM hDest)
{
    int nImage = 0, nSelectedImage = 0;
    CString csText = m_pSourceTree->GetItemText(hSource);
    m_pSourceTree->GetItemImage(hSource,nImage, nSelectedImage);
    return m_DestTree.InsertItem(csText,nImage,nSelectedImage,hDest,TVI_LAST);
}

QuestionHow to link project with mfc42 but not mfc70? Pin
kydfru29-May-03 21:18
kydfru29-May-03 21:18 
AnswerRe: How to link project with mfc42 but not mfc70? Pin
Joaquín M López Muñoz29-May-03 21:28
Joaquín M López Muñoz29-May-03 21:28 
GeneralNot acceptable in my situation.... Pin
kydfru29-May-03 22:22
kydfru29-May-03 22:22 
AnswerRe: How to link project with mfc42 but not mfc70? Pin
John R. Shaw30-May-03 8:33
John R. Shaw30-May-03 8:33 
Questionhow can i get the SQL Server name? Pin
Peter Keung29-May-03 21:17
Peter Keung29-May-03 21:17 
AnswerRe: how can i get the SQL Server name? Pin
auleaf30-May-03 2:53
auleaf30-May-03 2:53 
GeneralRe: how can i get the SQL Server name? Pin
Peter Keung30-May-03 4:49
Peter Keung30-May-03 4:49 
AnswerRe: how can i get the SQL Server name? Pin
David Crow30-May-03 2:59
David Crow30-May-03 2:59 
GeneralRe: how can i get the SQL Server name? Pin
Peter Keung30-May-03 3:32
Peter Keung30-May-03 3:32 
GeneralRe: how can i get the SQL Server name? Pin
David Crow30-May-03 3:58
David Crow30-May-03 3:58 
GeneralRe: how can i get the SQL Server name? Pin
basementman30-May-03 9:48
basementman30-May-03 9:48 
AnswerRe: how can i get the SQL Server name? Pin
auleaf2-Jun-03 21:54
auleaf2-Jun-03 21:54 
GeneralStandard mapping mode - MM_TEXT Pin
Daniel Strigl29-May-03 20:25
Daniel Strigl29-May-03 20:25 
GeneralQuestion about the new features in VS.Net 2003 Pin
Link260029-May-03 18:50
Link260029-May-03 18:50 
GeneralRe: Question about the new features in VS.Net 2003 Pin
valikac30-May-03 6:24
valikac30-May-03 6:24 
GeneralRe: Question about the new features in VS.Net 2003 Pin
MAAK30-May-03 11:25
MAAK30-May-03 11:25 
Questionhow to add,modify and delete data. Help me!!! Pin
siong29-May-03 17:15
siong29-May-03 17:15 

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.