|
From: Ramana K. <ra...@my...> - 2002-07-02 12:21:42
|
Hi, I would like to use a control in my win32 app written in C++ using ONLY win32 API (i.e. not MFC) that lets me write text in different fonts or colours to the screen, but is read only, i.e. is for output only, not input. Before implementing the functionality of this control, i had made it a simple edit control, because the simple edit control for my input window is working fine, but it seems this will not work for output as edit controls set their text all at once (i need to be able to send text to the control as i need to, and have it appended) and edit controls cannot take text of more than one font. the next thing i thought of is to use the TextOut function, but i fear this will not be very easy, and may not be a complete solution, because i'll need the text to be scrollable after there is too much of it, and it needs to word wrap to the size the user makes the window. what i have been looking at tonight is the richedit control, which may do the job, but i cannot find any information about how to use it using win32 api calls in c++. is richedit the way to go? if so, how do i use it? can i create one using CreateWindowEx and send it messages using SendMessage or specialised functions? this is what i would like: HWND hOutput = CreateWindowEx(special edit control thingy details); HFONT hFont = CreateFont(... whatever) SendTextorSimilar(hOutput,hFont,char* text,etc...); GetTextorSimilar(hOutput,&text,etc...); something along those lines. is there a control for me? is there documentation? by control, obviously i mean a window which is going to be a child window of my app. also, all the functionality of the control has to be already written up so i can just call the functions, so does this mean it has to be a common control (i don't know how many of these there are)? my biggest fear right now is that there is no common rich text control (like there is no splitter control) and i'll have to write something myself like i wrote my splitter bar window, but it won't be so easy. so, anyone know how to use richedit in win32 api? thanks ramana p.s. i will probably not reply to (nor receive) any replies to this message for the next 14 days or so, because i'm going away so, yeah, (if anyone is interested lol) |