| | |
Add Text To multiline textbox
Please support our C++ advertiser: Intel Parallel Studio Home
![]() |
•
•
Join Date: Jul 2008
Posts: 134
Reputation:
Solved Threads: 14
0
#2 Oct 13th, 2009
The edit box has to be created with the appropriate style to act as a multi-line text box. Look up the styles - off the top of my head I just don't have them memorized. But if the right style wasn't used at creation time - it just ain't gonna ever be a multi-line edit box.
added later - from Api CreateWindow() docs...
ES_MULTILINE Designates a multiline edit control. The default is single-line edit control.
Here would be what a CreateWindowEx() call to create such an edit control would look like...
added later - from Api CreateWindow() docs...
ES_MULTILINE Designates a multiline edit control. The default is single-line edit control.
Here would be what a CreateWindowEx() call to create such an edit control would look like...
C++ Syntax (Toggle Plain Text)
hEdit= CreateWindowEx ( WS_EX_CLIENTEDGE, "edit", "", WS_CHILD|WS_VISIBLE|ES_AUTOHSCROLL|ES_MULTILINE|WS_VSCROLL, 60,80,620,24, hWnd, (HMENU)IDC_EDIT, ghInst, 0 );
Last edited by Frederick2; Oct 13th, 2009 at 12:04 pm. Reason: add cast
•
•
Join Date: Oct 2009
Posts: 2
Reputation:
Solved Threads: 0
0
#3 Oct 13th, 2009
I just need a way to add text to it but not the
~Cha0sBG
c Syntax (Toggle Plain Text)
SetDlgItemText
~Cha0sBG
Last edited by ChaosBG; Oct 13th, 2009 at 11:56 am.
•
•
Join Date: Jul 2008
Posts: 134
Reputation:
Solved Threads: 14
0
#4 Oct 13th, 2009
It wouldn't hurt to be clearer in your question then. To add additional text to a text box (multiline or otherwise), you need to retrieve the text already in the text box into a string variable/buffer within your program using GetWindowText() or some such, then concatenate your additional text onto it, then finally replace the entirety of the original text in the text box with the new.
•
•
Join Date: Apr 2008
Posts: 118
Reputation:
Solved Threads: 12
-1
#5 Oct 13th, 2009
•
•
•
•
To add additional text to a text box (multiline or otherwise), you need to retrieve the text already in the text box into a string variable/buffer
It's a very old Win16-Win32 FAQ, see (Win32 grp) with EM
![]() |
Similar Threads
- how to add the text in text boxes. (ASP.NET)
- Firefox, Multiline Textbox Issue (ASP.NET)
- Removing First Line Of Text From multiline textbox (VB.NET)
- multiline textbox to .doc (C#)
- Printing multiline textbox content with PDFSharp (C#)
- Placing a Multiline textbox over a datagrid (VB.NET)
- can't concatenate variables and add text (ASP.NET)
Other Threads in the C++ Forum
- Previous Thread: Spot stack errors
- Next Thread: Why `system("pause")' shouldn't be used?
| Thread Tools | Search this Thread |
api array beginner binary bitmap c++ c/c++ calculator char char* class classes coding compile compiler console conversion count data database delete desktop developer directshow dll download dynamic email encryption error file forms fstream function functions game getline google graph gui homeworkhelper iamthwee ifstream input int integer java lib linkedlist linker linux loop looping loops map math matrix memory multiple news node number numbertoword output parameter pointer problem program programming project proxy python random read recursion recursive reference return rpg sorting string strings struct template templates test text text-file tree unix url vector video visualstudio win32 windows winsock word wordfrequency wxwidgets





