0
shabbir's Avatar, Join Date: Jul 2004
Go4Expert Founder
In C++ also you can append the strings. Just append the complete string you wish to show to the user when print button is clicked and then display that string in the text box.

Something like
Code:
string szTemp;
szTemp = First Node Content;
szTemp += Second Node Content;
TextBox.SetWindowText(szTemp);
0
domain's Avatar, Join Date: May 2007
Go4Expert Member
I wrote something like your code :

PHP Code:

Node
currentPtr firstPtr;
    
CString contents("");

    if ( 
currentPtr != NULL )
    {
        while( 
currentPtr -> next != NULL )
        {
            
CString temp("");
            
temp.Format("%i"currentPtr->DATA );

            
contents += temp;
            
contents += " -> ";
            
currentPtr currentPtr->next;
        }

        
contents =+ currentPtr -> DATA;

        
printDLG.m_content contents;
        
UpdateData(TRUE);
        
printDLG.DoModal();
    } 
But the final result ( when I execute the program ) like this:
Quote:
س
ـ
or
Quote:
حـ
؟؟
0
domain's Avatar, Join Date: May 2007
Go4Expert Member
ًWoOoOoOoW !!
I want to dance now !!! the program now is 100% complete, I knew the problem with the previous code:

PHP Code:

    
// TODO: Add your control notification handler code here
    
NodecurrentPtr firstPtr;
    
CString contents("");

    if ( 
currentPtr != NULL )
    {
        while( 
currentPtr -> next != NULL )
        {
            
CString temp("");
            
temp.Format("%i"currentPtr->DATA );

            
contents += temp;
            
contents += " -> ";
            
currentPtr currentPtr->next;
        }
        
CString temp("");
        
temp.Format("%i"currentPtr -> DATA );
        
contents += temp;

        
printDLG.m_content contents;
        
UpdateData(TRUE);
        
printDLG.DoModal();
    }
    else
        
MessageBox("The list is empty" ); 
0
shabbir's Avatar, Join Date: Jul 2004
Go4Expert Founder
Finally I could explain you.
0
domain's Avatar, Join Date: May 2007
Go4Expert Member
Thank you Mr.Shabbir for the help
0
shabbir's Avatar, Join Date: Jul 2004
Go4Expert Founder
My pleasure.