Display multiple lines on gui using setwindowtext win32?

  c++, win32gui, winapi
   I am having a problem with the simple edit box, here is the code:

         **textbox = CreateWindow(TEXT("Edit"), TEXT(" "),**
                        WS_VISIBLE | WS_CHILD | WS_BORDER | ES_AUTOVSCROLL | ES_MULTILINE,
                        525, 60, 325, 400,
                        hwnd, (HMENU) ID_TXT, NULL, NULL
                    );

                    
   Using the setwindowtext() command I am able to display the second line because it replaces the first line. 

            SetWindowText(textbox, TEXT("nStarting Automated BLT Test!!!n"));
            
            SetWindowText(textbox, TEXT("Listing Devices: n"));

    I know you can do it this way but it's not going to work for me because I eventually need to display the content from a buffer.

            SetWindowText(textbox, TEXT("nStarting Automated BLT Test!!!rnListing Devices: n"));

I am trying to display multiple lines on my gui using setwindowtext() but it only displays the last line because it replaces the previous lines and doesn’t append to the next line. Is there a way to display all the lines in the textbox? or an alternative way to display content on gui textbox?

Thank you.

Source: Windows Questions C++

LEAVE A COMMENT