Go4Expert Founder
20May2007,18:42   #11
shabbir's Avatar
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);
Go4Expert Member
20May2007,18:48   #12
domain's Avatar
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:
حـ
؟؟
Go4Expert Member
20May2007,18:51   #13
domain's Avatar
ً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" ); 
Go4Expert Founder
20May2007,22:04   #14
shabbir's Avatar
Finally I could explain you.
Go4Expert Member
20May2007,22:54   #15
domain's Avatar
Thank you Mr.Shabbir for the help
Go4Expert Founder
21May2007,08:39   #16
shabbir's Avatar
My pleasure.